|
|
|
@ -120,6 +120,7 @@ class WorkerNodeInitializer:
|
|
|
|
|
class WorkerNode:
|
|
|
|
|
def __init__(self,
|
|
|
|
|
openai_api_key: str,
|
|
|
|
|
temperature: int,
|
|
|
|
|
llm: Optional[Union[InMemoryDocstore, ChatOpenAI]] = None,
|
|
|
|
|
tools: Optional[List[Tool]] = None,
|
|
|
|
|
vectorstore: Optional[FAISS] = None,
|
|
|
|
@ -130,8 +131,8 @@ class WorkerNode:
|
|
|
|
|
search_kwargs: dict = {},
|
|
|
|
|
verbose: Optional[bool] = False,
|
|
|
|
|
chat_history_file: str = "chat_history.txt"):
|
|
|
|
|
|
|
|
|
|
if not openai_api_key:
|
|
|
|
|
logging.error("OpenAI API key is not provided")
|
|
|
|
|
raise ValueError("openai_api_key cannot be None")
|
|
|
|
|
|
|
|
|
|
self.openai_api_key = openai_api_key
|
|
|
|
|