- Add spring-boot-starter-webflux dependency
- Implement OpenAiEmbeddingWebClient, extending EmbeddingClient with WebClient
- Add spring-boot-starter-webflux dependency
OpenAiEmbeddingWebClient
replaces the existing OpenAiEmbeddingClient, removing the dependency on openai-java. The goal is to merge this alongside #118, ensuring that the in-house OpenAI client mentioned in #116 becomes the only remaining client, setting the stage for the eventual removal of the openai-java dependency.
Comment From: markpollack
Thank you very much for this, I hope we can get it into 0.8.0 release as well as the streaming support.
Comment From: JM-Lab
Thanks! Excited about the potential inclusion in 0.8.0 release. Let me know if there's anything else.
Comment From: tzolov
@JM-Lab, thank you for the help.
I've refactored the spring-ai-openai
to replace the theokanning
client with OpenAiApi - build on spring ecosystem (e.g. WebClient and RestClient) and solving few issues that theokanning imposed.
In the process I refactored the OpenAiClient
and the OpenEmbeddingClient
so that both are using the native OpenAiApi.
I'm afraid that those changes could make this PR redundant. Please review an let me know. If you have time you can review my flux implementation as well (not my forte) ;)
Comment From: tzolov
@JM-Lab, since you did't reply i'm assuming that there is nothing more to do. So I'm closing this PR as resolved by e30be94a564fe751bf2a2e316925d8cb12ba2224
Comment From: JM-Lab
@tzolov Please review the contents of https://github.com/spring-projects/spring-ai/pull/172 Additionally, can you share guidelines on how to perform reviews for this project?
Thank you.