Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Why is pydantic 2 not supported for open api doc generation? #597

Closed
555chy opened this issue Apr 9, 2024 · 1 comment
Closed

Why is pydantic 2 not supported for open api doc generation? #597

555chy opened this issue Apr 9, 2024 · 1 comment

Comments

@555chy
Copy link

555chy commented Apr 9, 2024

LANGSERVE: ⚠️ Using pydantic 2.6.4. OpenAPI docs for invoke, batch, stream, stream_log endpoints will not be generated. API endpoints and playground should work as expected. If you need to see the docs, you can downgrade to pydantic 1. For example, pip install pydantic==1.10.13. See fastapi/fastapi#10360 for details.

图片

I use pydantic 2.6.4 to run this,but web and doc both not work!

@eyurtsev
Copy link
Collaborator

@555chy you can support documentation on your own by providing a second implementation for the endpoints and declaring its documentation as a workaround. We're not going to provide an adapter here since it's on FastAPIs road-map and that seems like the easiest place to support it. LangChain itself will be upgrading entirely to pydantic v2 around 2024 July.

@eyurtsev eyurtsev changed the title why not adapter pydantic 2 ? Why is pydantic 2 not supported for open api doc generation? Apr 12, 2024
@langchain-ai langchain-ai locked and limited conversation to collaborators Apr 12, 2024
@eyurtsev eyurtsev converted this issue into discussion #607 Apr 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants