-
Notifications
You must be signed in to change notification settings - Fork 15
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
Added embeddings endpoint to server #374
Conversation
server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/Routes.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to finish this endpoint we should be sure that the embeddings are working fine. For that, we are using the SpaceCraftLocal
example
We should change this example using the local embedding. Something like that
val localOpenAi = OpenAI(host = "http://localhost:8081/")
val model = localOpenAi.DEFAULT_SERIALIZATION
val scope =
Conversation(LocalVectorStore(OpenAIEmbeddings(localOpenAi.DEFAULT_EMBEDDING)))
....
server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/Routes.kt
Show resolved
Hide resolved
server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/Routes.kt
Outdated
Show resolved
Hide resolved
@Montagon have you tested streaming? when I tested that earlier, it hang forever. probably something was just wrong with my setup. |
In which example did you try? I tried the |
I used Postman, the response hanging and never finished. |
As I found out, whether the request hangs or not depends on the length of the response from OpenAI: I haven't figured out why this is. |
This reverts commit 1ffe687.
… server-embeddings-endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're set. Venga!
My issue with long prompts is going to be targeted in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This PR include the endpoint for the embeddings in the same way that OpenAI supports it.