-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Expose raw openai client in OpenAIChatCompletionClient, etc. #5441
Comments
I like this and generally agree. My shallow thinking on this is that
|
@victordibia This is why I wanted to bring it up. I of course could just make a specialized agent that takes an OpenAI client rather than an OpenAIChatCompletion client, and just go to town with this.... BUT! Then I lose other neat features like the component spec and ability to serialize or store/load configs. Right now our abstractions both give us a generic model interface AND the ability to fit with AGStudio plus other neat stuff that comes from a declarative spec... but in many cases, its only the later I want. |
One thing I am getting from this is that we probably need more COMPLETE examples of custom agents showing:
We can do all of these today, we just need to show examples. our current custom agents example falls short in these things. What other useful things should the example show? |
I agree. I think custom agent should be moved outside of tutorial, and deserve a longer version with what you described. Created issue: #5450 too kepp track of the changes. |
Custom agents that use custom message types. An example of that could also be useful. But compatibility w/ in built agents would be tricky. |
We can close this as it is resolved by providing example of custom client implementation. |
What feature would you like to be added?
Advanced agents are increasingly needing more direct access to the underlying clients. For example, Gemini models are able to both accept AND produce images, but there is no way to express this generally with ChatCompletionClient. Likewise R1 and other reasoning models expose reasoning tokens. Anthropic clients allow prefix completion etc. etc. etc. We could add these things to the general superclass interface, but then every client will need to handle every feature from every provider (even if just to throw an NotImplementedError)
To access these features, we would benefit from direct client access. As an example, use of Guidance all but requires the underlying client.
This feature proposal is to expose a property in ChatCompletionClient, or its subclasses, that returns the underlying client -- whatever type or class it is.
Why is this needed?
See above.
The text was updated successfully, but these errors were encountered: