mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-12 06:35:44 +08:00
fix(go-models): increase JieKouAI SSE scanner buffer (#15737)
## Summary - Raise the JieKouAI streaming SSE scanner buffer to handle larger data chunks without truncation.
This commit is contained in:
@@ -292,6 +292,7 @@ func (j *JieKouAIModel) ChatStreamlyWithSender(modelName string, messages []Mess
|
||||
|
||||
// SSE parsing: read line by line
|
||||
scanner := bufio.NewScanner(resp.Body)
|
||||
scanner.Buffer(make([]byte, 64*1024), 1024*1024)
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ func TestChatStreamLargeChunkNotTruncated(t *testing.T) {
|
||||
{"lmstudio", build(func(b map[string]string, s URLSuffix) chatStreamer { return NewLmStudioModel(b, s) })},
|
||||
{"gitee", build(func(b map[string]string, s URLSuffix) chatStreamer { return NewGiteeModel(b, s) })},
|
||||
{"tokenhub", build(func(b map[string]string, s URLSuffix) chatStreamer { return NewTokenHubModel(b, s) })},
|
||||
{"jiekouai", build(func(b map[string]string, s URLSuffix) chatStreamer { return NewJieKouAIModel(b, s) })},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
||||
Reference in New Issue
Block a user