Samuel Colvin

Results 1267 comments of Samuel Colvin

I think `pyo3_build_config::get().executable` will be right more often than just guessing at `'python3'`. Given that #764 was introduced a year ago, and AFAIK this is the first issue reported, I...

See #514 which is related. You could implement this now in a custom model, I think that's how [`MistralModel`](https://github.com/pydantic/pydantic-ai/blob/main/pydantic_ai_slim/pydantic_ai/models/mistral.py) works. I don't think there's any reason to move or copy...

We should support structured outputs as well as tool calls for the `result_type` where the model supports it. * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs) * [Gemini structured outputs](https://ai.google.dev/gemini-api/docs/structured-output?lang=rest)

In preparation for this work, I did a short survey how structured outputs work in different models: There are three ways to support structured outputs: * using tool calls -...

> [@samuelcolvin](https://github.com/samuelcolvin) not sure I follow what you're saying about Gemini's lacking structured output support "with tools" -- AFAIU tool calling and (forced-JSON-schema-based) structured output are fundamentally mutually exclusive. If...

> For Groq I'd recommend using function calls, here's a modified example that seems to work well: Okay @ricklamers, we'll stick to tool calls with groq, that minimises the change...

I've written up #239 with proposed rules for when to add new models, feedback welcome.

I've decided to adopt the rules set out in #239, so we won't be able to accept a SambaNova model at this time. Sorry to disappoint.

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...

@sambarnes definitely happy to add that example to the docs. I also think we could add `base_url` as a kwarg to `OpenAIModel` so you can simplify it to just ```py...