-
Notifications
You must be signed in to change notification settings - Fork 71
Migrate openai
framework to use any_llm
#828
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
... and 47 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ies with Mistral (#535) Current support is limited to `params.response_format` being a Pydantic Model. This PR enables using openAI schema. Will be useful when migrating openai agents framework to use any-llm: mozilla-ai/any-agent#828
Integration tests passing on CI: https://github.com/mozilla-ai/any-agent/actions/runs/18492592870 Status of running [OPENAI] framework integration tests locally:
@daavoo I guess Gemini and XAI not supporting OpenAI structured output format is something that we cannot fix. |
@HareeshBahuleyan I don't think we can fix it in |
@daavoo Do you mean implementing a helper function in any-llm to convert openAI JSON schema format to Pydantic? |
no, I mean that any-llm should support receiving as |
Sounds reasonable, created issues in any-llm to track this: mozilla-ai/any-llm#541 and mozilla-ai/any-llm#542 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I run the tests with the debugger and implementation looks good.
We weed to update pyproject.toml
and would be great to try the class-based AnyLLM API.
…ools can be auto-parsed
bc7c97e
to
0a8b73b
Compare
74a470c
to
daa8b42
Compare
Rerun of integration tests after class-based AnyLLM definition: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the comments @HareeshBahuleyan 🙏
AnyllmModel
based onLitellmModel
from openai agents SDK: https://github.com/openai/openai-agents-python/blob/main/src/agents/extensions/models/litellm_model.py#L64