jina-ai / thinkgpt

Agent techniques to augment your LLM and push it beyong its limits
Apache License 2.0
1.53k stars 134 forks source link

Error - Pydantic, memory.py #3

Open ebowwa opened 1 year ago

ebowwa commented 1 year ago

Traceback (most recent call last): File "main.py", line 1, in from thinkgpt.llm import ThinkGPT File "/home/runner/thinkgpt-1/thinkgpt/llm.py", line 14, in from thinkgpt.memory import MemoryMixin, ExecuteWithContextChain File "/home/runner/thinkgpt-1/thinkgpt/memory.py", line 9, in embeddings_model = OpenAIEmbeddings() File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for OpenAIEmbeddings

The error is caused by a pydantic validation error in the OpenAIEmbeddings initialization on line 9 of memory.py. To fix this, you need to check the pydantic documentation to be sure of the correct way to initialize the OpenAIEmbeddings or reach out to the package maintainers.

alaeddine-13 commented 1 year ago

Hey @ebowwa , This is actually an upstream error from langchain. I suggest either tweaking your langchain or pydantic version. It would be ideal to fix this in langchain