Skip to content
Discussion options

You must be logged in to vote

I see that you are using the OpenAI API. As we already have a LanguageModel implementation for OpenAI you should not need to implement your own version, instead you can reuse the existing one.

However the current one has a shortcoming which you might already have ran into: The non-streaming request implementation does not support tool calls yet. So if you need this support, then at the moment you need to implement it yourself. I would like to suggest copying the current OpenAI LanguageModel and modifying the non-streaming request code.

As @eneufeld indicated, the best place to see how to do this is the Ollama LanguageModel.

If you manage to do so, it would be great if you could contribute…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@sdirix
Comment options

sdirix Sep 9, 2025
Collaborator

Comment options

You must be logged in to vote
3 replies
@eneufeld
Comment options

eneufeld Sep 9, 2025
Collaborator

@sdirix
Comment options

sdirix Sep 9, 2025
Collaborator

Answer selected by sowjanyagunupuru
@sowjanyagunupuru
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants