Was following along with a tutorial for crew ai: https://github.com/bhancockio/nextjs-crewai-basic-tutorial
I’m trying to run the repo however i’m getting an error:
TypeError(f”cannot instantiate {self!r}”)
Type Error: Cannot Instantie typing.union
These error seem to come from handing the pydantic models, However I think the error is coming from the library crewai_tools and not my code.
The Models I’m using do not using union:
from typing import List
from pydantic import BaseModel
class NamedUrl(BaseModel):
name: str
url: str
class PositionInfo(BaseModel):
company: str
position: str
name: str
blog_articles_urls: List[str]
youtube_interviews_urls: List[NamedUrl]
class PositionInfoList(BaseModel):
positions: List[PositionInfo]
looks like the error is occuring in:
`class FixedDOCXSearchTool`
However, I’m not using that in the code. I’m running this on python 3.11.9.
How can I fix the pydantic models, inside the tools or force this to run?