-
I have a Python project that uses spaCy, which currently doesn't support pydantic v2. So I currently have pydantic version 1.9.2 installed. I wanted to make a quick server like this (no idea if this code is correct): from litestar import Litestar, get
from russian_text_stresser.text_stresser import RussianTextStresser
# Create an instance of the RussianTextStresser class
stresser = RussianTextStresser()
# Define a route for the stress_text function
@get("/stress_text/{text}}")
async def stress_text(text: str) -> str:
# Return the output text as a JSON object
return stresser.stress_text(text)
app = Litestar([stress_text]) But when I run it using
How could I fix this? Thanks for the help! Python: 3.10.2 |
Beta Was this translation helpful? Give feedback.
Answered by
Goldziher
Jul 25, 2023
Replies: 1 comment 1 reply
-
Please update to pydantic 1.10.12 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Vuizur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please update to pydantic 1.10.12