Skip to content

Commit

Permalink
Pydantic v2 support for OpenAPI Specs (langchain-ai#11936)
Browse files Browse the repository at this point in the history
- **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.
  • Loading branch information
kreneskyp authored and HoaNQ9 committed Feb 2, 2024
1 parent 9e8b9ac commit d6d5f19
Show file tree
Hide file tree
Showing 6 changed files with 1,911 additions and 1,848 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from langchain.utils.input import get_colored_text

if TYPE_CHECKING:
from openapi_schema_pydantic import Parameter
from openapi_pydantic import Parameter


def _get_description(o: Any, prefer_short: bool) -> Optional[str]:
Expand Down
Loading

0 comments on commit d6d5f19

Please sign in to comment.