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

Streaming end point for server API #83

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

jpodivin
Copy link
Collaborator

Implements new endpoint for streaming model outputs.

Responses follow the same structure as the existing API, with a caveat, that each token has it's own structure, with probability etc. returned separately, as part of the stream.

Implements new endpoint for streaming model outputs.

Responses follow the same structure as the existing API,
with a caveat, that each token has it's own structure, with
probability etc. returned separately, as part of the stream.

Signed-off-by: Jiri Podivin <[email protected]>
@jpodivin jpodivin requested a review from TomasTomecek October 25, 2024 14:30
@@ -5,8 +5,8 @@

from llama_cpp import CreateCompletionResponse
from fastapi import FastAPI, HTTPException, Depends, Header
from fastapi.responses import StreamingResponse

Check warning

Code scanning / vcs-diff-lint

Unable to import 'fastapi.responses' Warning

Unable to import 'fastapi.responses'
Copy link
Collaborator

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Copy link
Collaborator

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

logdetective/server.py Show resolved Hide resolved
@jpodivin jpodivin merged commit ae70254 into fedora-copr:main Oct 30, 2024
2 of 3 checks passed
@jpodivin jpodivin deleted the streamapi branch October 30, 2024 10:05
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.

3 participants