Feature request: Supports OpenAI compatible model
Currently, only Gemini and Claude are supported.
We are evaluating a few options, but if you are interested contributing an initial draft, please take a look at https://github.com/google/adk-java/blob/main/contrib/README.md
@x3bits https://github.com/google/adk-java/pull/102/ might be one solution A better solution is similar to the AntropicModel, create an OpenAIModel.java
@x3bits #102 might be one solution A better solution is similar to the AntropicModel, create an OpenAIModel.java
@cornellgit Thanks very much. I changed the AntropicModel to OpenAIModel and it works. It's really a good solution.
OAI models are quite useful, if you have a working copy, please feel free to merge into contrib/ @x3bits It may help as an example to how to do "Bring Your Own Model"
Are there any updates on this issue by any chance? If not, I would like to contribute
@DreamerChaserHAH feel free to submit PRs, happy to iterate on this. One ask is to use okhttp, I think it's already part of their official SDK.
I'm really looking forward to this feature. @x3bits Could you share a sample code?
I'm really looking forward to this feature. @x3bits Could you share a sample code?
https://github.com/google/adk-java/pull/102/commits/ea9223c7a09e79890a0728149e8e5a056403efba
Here is the sample code. Just change the AnthropicChatModel in the test code to OpenAiModel, and it will work.
@x3bits this is now available via the LangChain4j connector in contrib/ - have you seen and tried it out?
I'll mark this issue as pending your feedback. We'll close it if we don't hear back from you within ~1 month.