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

Server support stream #346

Merged
merged 8 commits into from
Aug 28, 2023
Merged

Server support stream #346

merged 8 commits into from
Aug 28, 2023

Conversation

Montagon
Copy link
Contributor

@Montagon Montagon commented Aug 23, 2023

This PR modifies the chat/completions endpoint to support the stream option. Now this endpoint uses a Ktor client to send the information directly to OpenAI and returns the output in the same format as received.

raulraja
raulraja previously approved these changes Aug 23, 2023
Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

We could test this change live by creating our xef-client, which uses the OpenAI Models we have in Xef but instead uses our server URL. Sending a streaming request like the SpaceCraft example that streams the response will show if this integration is wired the same as Open AIs. Let's discuss it tomorrow to see how we can approach it and if we can already write some tests for it.

Copy link
Contributor

@javipacheco javipacheco left a comment

Choose a reason for hiding this comment

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

Just a minor suggestion. Please, let me know your opinion about that

@javipacheco
Copy link
Contributor

@raulraja the last changes added to this PR add the possibility to change the host in order to use the xef-server in the call is SpaceCraftLocalexample

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

thank you @Montagon @javipacheco !

@javipacheco javipacheco merged commit 0da389c into main Aug 28, 2023
@javipacheco javipacheco deleted the server-support-stream branch August 28, 2023 12:38
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