Closed aitoehigie closed 11 months ago
There's no way to swap pydantic version from cli, but this option exists.
Just clone the repo, add this line context.pydanticv1 = True
here https://github.com/s3rius/FastAPI-template/blob/master/fastapi_template/__main__.py#L20, right before the actual generation.
I'll make an option later. Actually, you can make a PR that adds this option, I'd really appreciate this.
@s3rius PR opened: https://github.com/s3rius/FastAPI-template/pull/184
I am trying to use this template to create a FastAPI + Langchain project, however, Langchain only supports Pydantic < v2 while Pydantic-settings which is tightly coupled with Pydantic + FastAPI depends on Pydantic v2.0+.
Any tips on how to swap it out?