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

anthropic: less pydantic for client #28823

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

efriis
Copy link
Member

@efriis efriis commented Dec 19, 2024

No description provided.

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 3:43pm

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 19, 2024
Comment on lines -544 to -546
_client: anthropic.Client = PrivateAttr(default=None) # type: ignore[assignment]
_async_client: anthropic.AsyncClient = PrivateAttr(default=None) # type: ignore[assignment]

Copy link
Member Author

Choose a reason for hiding this comment

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

these create mypy issues because we want the type to be not-None, but by default it's None

return client_params

@cached_property
def _client(self) -> anthropic.Client:
Copy link
Member Author

Choose a reason for hiding this comment

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

if we don't have it at top-level, it doesn't matter, and also removes a validator

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 19, 2024
@efriis efriis merged commit ff7b01a into master Dec 19, 2024
28 checks passed
@efriis efriis deleted the erick/anthropic-less-pydantic-for-client branch December 19, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants