Skip to content
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

feat: add optional base_url kwarg to OpenAIModel #243

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

sambarnes
Copy link
Contributor

hihi ✌️ regarding the short exchange over on this issue:
#215 (comment)

noticed that the proposed syntax wasnt actually available on OpenAIModel yet, so i figured that's the PR you meant you'd be open to?

if you'd rather not introduce the API addition rn, i also have a purely docs change in this branch:

main...sambarnes:pydantic-ai:sam/openrouter-example

totally open to driving this PR home tho if this is along the lines of what ya were thinkin :)

@sambarnes sambarnes force-pushed the sam/openaimodel-base_url branch from 3b8a981 to 495d1a8 Compare December 13, 2024 23:13
@sambarnes
Copy link
Contributor Author

docs running locally:
image

image

Copy link
Contributor

@dmontagu dmontagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor copy edits but this looks good to me.

docs/install.md Outdated Show resolved Hide resolved
pydantic_ai_slim/pydantic_ai/models/openai.py Outdated Show resolved Hide resolved
pydantic_ai_slim/pydantic_ai/models/openai.py Outdated Show resolved Hide resolved
sambarnes and others added 3 commits December 13, 2024 16:23
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
@samuelcolvin samuelcolvin merged commit 9cf0f06 into pydantic:main Dec 14, 2024
15 checks passed
@samuelcolvin
Copy link
Member

thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants