You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the problem is that if I don't force pydantic to be V1, these tools won't work on langchain, so I had to do so.
seems that crewAI is using pedantic V2, and this seems to be an issue:
when I add such tools to an Agent, I get the following error:
ImportError: cannot import name 'InstanceOf' from 'pydantic'
is there anymeans I can switch to pydantic 1 for crew ? otherwise I would have to rewrite many of my tools,
thanks :)
The text was updated successfully, but these errors were encountered:
Hey,
first of all, thanks for this great lib. It actually opens new horizons in the way I write my stuff :)
I come from a setup relying quite heavily on many langchain tools.
I write those using annotations and using argschema with pydantic models to extract tools args like so:
from langchain.pydantic_v1 import BaseModel, Field
class SomeArgs(Basemodel):
some_field: some_type = Field(description="instructions..."
@tool(args_schema=SomeArgs)
def my_tool(some_field: some_type):
etc...
the problem is that if I don't force pydantic to be V1, these tools won't work on langchain, so I had to do so.
seems that crewAI is using pedantic V2, and this seems to be an issue:
when I add such tools to an Agent, I get the following error:
ImportError: cannot import name 'InstanceOf' from 'pydantic'
is there anymeans I can switch to pydantic 1 for crew ? otherwise I would have to rewrite many of my tools,
thanks :)
The text was updated successfully, but these errors were encountered: