Update main.go
This commit is contained in:
parent
8f04f44817
commit
d6033eb906
@ -119,10 +119,7 @@ func StreamHandler(c *gin.Context, resp *http.Response) (*model.ErrorWithStatusC
|
||||
common.SetEventStreamHeaders(c)
|
||||
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
fmt.Println("Scanned line:", line)
|
||||
data := strings.TrimPrefix(scanner.Text(), "}")
|
||||
data = data + "}"
|
||||
data := scanner.Text()
|
||||
|
||||
var ollamaResponse ChatResponse
|
||||
err := json.Unmarshal([]byte(data), &ollamaResponse)
|
||||
|
Loading…
Reference in New Issue
Block a user