-
Notifications
You must be signed in to change notification settings - Fork 384
feat: add AIMLAPI provider integration and example #1217
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
Introduces AIMLAPIProvider in marvin.providers for AI/ML API support, including provider registration in __init__.py. Adds an example script demonstrating agent usage with AIMLAPI in examples/provider_specific/aimlapi/run_agent.py.
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.
Pull Request Overview
This PR adds support for AI/ML API as a new provider in Marvin, enabling access to 300+ models through an OpenAI-compatible interface.
- Introduces
AIMLAPIProvider
class that extends Pydantic AI's provider system - Provides example usage demonstrating how to configure and use the AI/ML API provider with Marvin agents
- Updates documentation to include AI/ML API as a supported provider option
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/marvin/providers/aimlapi.py | New provider implementation with OpenAI-compatible interface for AI/ML API |
src/marvin/providers/init.py | Exports the new AIMLAPIProvider class |
examples/provider_specific/aimlapi/run_agent.py | Example demonstrating AI/ML API usage with Marvin agents |
docs/installation.mdx | Adds AI/ML API setup instructions including environment variable configuration |
docs/guides/configure-llms.mdx | Lists AI/ML API among supported providers |
README.md | Updates description to mention AI/ML API support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
@D1m7asis @OctavianTheI i appreciate the effort going into the PR
i guess i was not anticipating your request in #1171 would require a new providers
module
i am not really keen on the new module nor the readme change. it seems like if you're an openai compatible shim for providers, you could use one of the existing providers from pydantic ai and change the base url
why is that not the case? i.e. why not just add an example to examples
?
This PR introduces AI/ML API support as a provider in Marvin.
Changes:
Added
AIMLAPIProvider
inmarvin.providers
, extending Pydantic AI’s provider system.Registered provider in
__init__.py
.New example:
examples/provider_specific/aimlapi/run_agent.py
shows how to run an agent with AI/ML API.Docs updated:
AIML_API_KEY
environment variable.Features:
marvin.Agent
and Pydantic AI models.Reference: #1171
Screenshot: