Skip to content

refactor: Enhance streaming chat completion with structured SSEvent handling and validation #3

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

edenreich
Copy link
Collaborator

@edenreich edenreich commented May 26, 2025

Summary

Enhance streaming chat completion with structured SSEvent handling and validation.

Simplify the code, Server Sent Events is the default for streaming by any provider that follows OpenAI API - it's compatible, that's why I removed the use_sse.

In previous versions of Ollama there was no OpenAI Compatible API and the response was a raw JSON instead of data: JSON.

use_sse was redundant.

…andling and validation

Simplify the code, Server Sent Events is the default for streaming by any provider that follows OpenAI API - it's compatible, i.e why I removed the use_sse.

In previous versions of Ollama there was no OpenAI Compatible API and the response was a raw JSON instead of data: <JSON>

Signed-off-by: Eden Reich <eden.reich@gmail.com>
@edenreich edenreich merged commit cfcf147 into main May 26, 2025
1 check passed
@edenreich edenreich deleted the refactor/deprecate-use-sse-flag branch May 26, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant