Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve "bufio.Scanner: token too long" error by increasing buff… #2128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qistchan
Copy link

close #1982


在请求包含了如联网搜索、知识库查询等接口时,在流式接口的第一行往往会带上大量的references内容。

如请求火山引擎进行天气查询时,首行返回的文本 ~75kb
image
超过缓冲区大小
image

默认bufio.Scanner的缓冲区只有64kb,适当调整至256kb,兼容该场景。


我已确认该 PR 已自测通过,相关截图如下:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error reading stream: bufio.Scanner: token too long
1 participant