Relative Content

Tag Archive for pydanticlangchain

ChatPromptTemplate Not Working with PyDantic

I used this code with langchain 0.2.8 and it worked fine. I have to move the code to a new environment where I am limited to using langchain 0.1.12. When I run this code in the new environment I keep getting an error that .init takes 1 positional argument but 2 were provided. The error gets thrown with this line -> propositioning_llm = self.llm.with_structured_output(Sentences).

ChatPromptTemplate Not Working with PyDantic

I used this code with langchain 0.2.8 and it worked fine. I have to move the code to a new environment where I am limited to using langchain 0.1.12. When I run this code in the new environment I keep getting an error that .init takes 1 positional argument but 2 were provided. The error gets thrown with this line -> propositioning_llm = self.llm.with_structured_output(Sentences).

Langchain and pydantic compatibility

I have gone through previous posts and tried updating langchain and pydantic to respective different compatible versions, however I keep getting the same error message when I do an import :

Langchain and pydantic compatability

I have gone through previous posts and tried updating langchain and pydantic to respective different compatible versions, however I keep on getting the same error message when I do an import :