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

Pydantic v2 support for OpenAPI Specs #11936

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

kreneskyp
Copy link
Contributor

The root cause was that openapi-schema-pydantic hasn't been updated in some time but openapi-pydantic forked and updated the project.

@vercel
Copy link

vercel bot commented Oct 17, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2023 8:54pm

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label Oct 17, 2023
- switching to openapi-pydantic, a fork of openapi-schema-pydantic that was updated for pydantic v2
- overridding OpenApiSpec.openapi typehint to support older specs (e.g. klarna is 3.0.1)
- removing Pydantic v1/v2 branching logic
@kreneskyp kreneskyp mentioned this pull request Oct 18, 2023
11 tasks
@eyurtsev eyurtsev self-assigned this Oct 18, 2023
@eyurtsev
Copy link
Collaborator

Thanks @kreneskyp will review tomorrow

@eyurtsev eyurtsev self-requested a review October 19, 2023 02:22
@eyurtsev eyurtsev merged commit 8425f33 into langchain-ai:master Oct 19, 2023
32 checks passed
@kreneskyp
Copy link
Contributor Author

Thanks @eyurtsev! 🚀

hoanq1811 pushed a commit to hoanq1811/langchain that referenced this pull request Feb 2, 2024
- **Description:** Adding Pydantic v2 support for OpenAPI Specs 

- **Issue:**
- OpenAPI spec support was disabled because `openapi-schema-pydantic`
doesn't support Pydantic v2:
     langchain-ai#9205
     
     - Caused errors in `get_openapi_chain`
   
    - This may be the cause of langchain-ai#9520.

- **Tag maintainer:** @eyurtsev
- **Twitter handle:** kreneskyp


The root cause was that `openapi-schema-pydantic` hasn't been updated in
some time but
[openapi-pydantic](https://github.com/mike-oakley/openapi-pydantic)
forked and updated the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants