-
Notifications
You must be signed in to change notification settings - Fork 329
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
Sambanova models support #215
Conversation
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.
2 files reviewed, 1 total issue(s) found.
Hi @jhpiedrahitao, I've never heard of Sambanova. Please can you start by creating an issue and see if we get significant interest from the community, before we consider adding this to Alternatively if you want to use or even distribute this without waiting, you can always create a new package, e.g. |
we've got a number of sambanova provided models at openrouter, and there is support for that already in pydantic-ai i actually just saw this recent issue, after hearing users ask if it works with our services: would you be open to a quick docs pr adding another example at the end of here? from openai import AsyncOpenAI
from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIModel
client = AsyncOpenAI(
base_url='https://openrouter.ai/api/v1',
api_key='your-api-key',
)
model = OpenAIModel('anthropic/claude-3.5-sonnet', openai_client=client)
agent = Agent(model)
... we're considering making pydantic-ai the default in our quickstart docs as well, considering a lot of people really love the devx so far |
Hi @samuelcolvin I created the issue here #218 You can find more information here https://sambanova.ai/ |
b48cbd3
to
ba6be28
Compare
@sambarnes definitely happy to add that example to the docs. I also think we could add model = OpenAIModel(
'anthropic/claude-3.5-sonnet',
base_url='https://openrouter.ai/api/v1',
api_key='your-api-key',
) PR welcome to add that. |
@@ -383,3 +383,50 @@ agent = Agent(model) | |||
To use [Ollama](https://ollama.com/), you must first download the Ollama client, and then download a model. | |||
|
|||
You must also ensure the Ollama server is running when trying to make requests to it. For more information, please see the [Ollama documentation](https://github.com/ollama/ollama/tree/main/docs) | |||
|
|||
### SambaNova |
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.
You may also need to add Sambanova LLM API to the list at the top of this document:
This installs the
pydantic_ai
package, core dependencies, and libraries required to use the following LLM APIs:
- OpenAI API
- Google VertexAI API for Gemini models
- Anthropic API
- Groq API
- SambaNova API
Closing as per #218 (comment) |
PR implementing SambaNovaModel and allowing access to SambaNovaCloudModels.
includes, model, base tests and docs