Skip to content

Conversation

jdubois
Copy link

@jdubois jdubois commented Oct 21, 2025

This follows the discussion on ticket #3368

This is a draft PR as the work is pretty big, I'll start with the simpler implementations (Embeddings) and finish with the more complex one (Chat).

- Add support for ImageModel
- Refactor the existing code now that we have support for 2 models

Signed-off-by: Julien Dubois <[email protected]>
@jdubois
Copy link
Author

jdubois commented Oct 22, 2025

With today's commit, we now have:

  • Support for EmbeddingModel
  • Support for ImageModel

And some basic shared configuration, that will be improved next, so we're ready for the more complex stuff (ChatModel).

@jdubois
Copy link
Author

jdubois commented Oct 23, 2025

The setup logic for the OpenAI SDK should be very similar to this class from LangChain4, because it's basically doing the same thingj:

https://github.com/langchain4j/langchain4j/blob/main/langchain4j-open-ai-official/src/main/java/dev/langchain4j/model/openaiofficial/InternalOpenAiOfficialHelper.java

I'm very careful before taking code from another project, but I believe this is fine: I'm the author of that other class, so I have the copyright on this code. Also, it's simple logic to connect to Azure/GitHub Models/OpenAI, nothing that is very specific or critical.

However, if this causes problems:

  • I can talk to OpenAI to check if that can be included into their code (I don't think they'll agree as they try to have something generic)
  • I can create my own library, but having both projects depend on a small library that I would maintain doesn't seem a good idea to me

Happy to discuss this if needed.

- Added support for authentication with OpenAI, Azure OpenAI and GitHub models.
- Added support for complex OpenAI client configuration
- Refactored the existing code to use those new methods

Signed-off-by: Julien Dubois <[email protected]>
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