Merge 3db8eb6de3
into b4bfa418a8
This commit is contained in:
commit
448a39f0b9
@ -119,7 +119,9 @@ func StreamHandler(c *gin.Context, resp *http.Response) (*model.ErrorWithStatusC
|
||||
|
||||
for scanner.Scan() {
|
||||
data := strings.TrimPrefix(scanner.Text(), "}")
|
||||
if !strings.HasSuffix(data, "}") {
|
||||
data = data + "}"
|
||||
}
|
||||
|
||||
var ollamaResponse ChatResponse
|
||||
err := json.Unmarshal([]byte(data), &ollamaResponse)
|
||||
|
Loading…
Reference in New Issue
Block a user