NewTools
Kye 2 years ago
parent 9c1ed56b61
commit 95e35a44ee

@ -5,6 +5,7 @@ from langchain.callbacks.manager import (
AsyncCallbackManagerForToolRun, AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun, CallbackManagerForToolRun,
) )
from typing import List, Any
# #
from langchain.memory.chat_message_histories import FileChatMessageHistory from langchain.memory.chat_message_histories import FileChatMessageHistory
@ -13,9 +14,14 @@ from langchain.memory.chat_message_histories import FileChatMessageHistory
class WorkerNode(BaseTool): class WorkerNode(BaseTool):
name = "WorkerNode" name = "WorkerNode"
description = "A worker node that can perform complex tasks" description = "A worker node that can perform complex tasks"
llm: ChatOpenAI # add this line # llm: ChatOpenAI # add this line
tools: List[Tool] # tools: List[Tool]
vectorstore: VectorStore # vectorstore: VectorStore
llm: Any
tools: List[Any]
vectorstore: Any
agent: Any = None
def __init__(self, llm, tools, vectorstore): def __init__(self, llm, tools, vectorstore):
super().__init__() super().__init__()

Loading…
Cancel
Save