-
Notifications
You must be signed in to change notification settings - Fork 33
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
I got pydantic error #2
Comments
I haven't encountered this error before, but the answer GPT-4 gave me was:
It seems you need to add a type annotation like |
Downgrade the langchain==0.0.261 is fine for me. |
I got the following error when I run
python pipeline.py > output.txt
.Traceback (most recent call last):
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/pipeline.py", line 11, in
from langchain import PromptTemplate, OpenAI, LLMChain
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/init.py", line 6, in
from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/agents/init.py", line 2, in
from langchain.agents.agent import (
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/agents/agent.py", line 16, in
from langchain.agents.tools import InvalidTool
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/agents/tools.py", line 4, in
from langchain.callbacks.manager import (
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/callbacks/init.py", line 3, in
from langchain.callbacks.aim_callback import AimCallbackHandler
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/callbacks/aim_callback.py", line 4, in
from langchain.callbacks.base import BaseCallbackHandler
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/callbacks/base.py", line 7, in
from langchain.schema import (
File "/Users/syyun/Dropbox (MIT)/CrawlGPT/langchain/schema.py", line 151, in
class ChatGeneration(Generation):
File "/Users/syyun/anaconda3/envs/crawlgpt/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 98, in new
private_attributes = inspect_namespace(
^^^^^^^^^^^^^^^^^^
File "/Users/syyun/anaconda3/envs/crawlgpt/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 342, in inspect_namespace
raise PydanticUserError(
pydantic.errors.PydanticUserError: Field 'text' defined on a base class was overridden by a non-annotated attribute. All field definitions, including overrides, require a type annotation.
For further information visit https://errors.pydantic.dev/2.3/u/model-field-overridden
The text was updated successfully, but these errors were encountered: