Код: Выделить всё
from langchain_community.tools.tavily_search import TavilySearchResults
from langgraph.prebuilt import ToolExecutor
OPENAI_API_KEY = ...
TAVILY_API_KEY = ...
tools = [TavilySearchResults(max_results=1)]
tool_executor = ToolExecutor (tools)
Код: Выделить всё
Exception has occurred: ModuleNotFoundError
No module named 'langgraph.prebuilt'; 'langgraph' is not a package
AttributeError: partially initialized module 'langgraph' has no attribute '__path__' (most likely due to a circular import)
Подробнее здесь: https://stackoverflow.com/questions/779 ... -a-package