mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 17:16:38 +08:00
Merge pull request #29 from qistchan/fix-#1982
fix: resolve "bufio.Scanner: token too long" error by increasing buff…
This commit is contained in:
commit
c2a0318e7b
@ -29,6 +29,8 @@ func StreamHandler(c *gin.Context, resp *http.Response, relayMode int) (*model.E
|
||||
responseText := ""
|
||||
reasoningText := ""
|
||||
scanner := bufio.NewScanner(resp.Body)
|
||||
buffer := make([]byte, 256*1024)
|
||||
scanner.Buffer(buffer, len(buffer))
|
||||
scanner.Split(bufio.ScanLines)
|
||||
var usage *model.Usage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user