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

feat: add Max Tokens and Context Window Setting Options for Ollama Channel #1694

Merged
merged 9 commits into from
Aug 6, 2024
Prev Previous commit
Next Next commit
Update main.go
MotorBottle authored Jul 25, 2024

Verified

This commit was signed with the committer’s verified signature.
woodruffw William Woodruff
commit 8f04f448171e8c539f19b6376a0759ab1a5f00a3
2 changes: 2 additions & 0 deletions relay/adaptor/ollama/main.go
Original file line number Diff line number Diff line change
@@ -119,6 +119,8 @@ 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 + "}"