pull/160/head
Kye 2 years ago
parent f63dd2d87c
commit 9eade30aa2

@ -1,23 +1,22 @@
from swarms.tools.agent_tools import * from swarms.tools.agent_tools import *
from langchain.tools import BaseTool from langchain.tools import BaseTool
from typing import Optional, Type from typing import Optional, Type
from langchain.callbacks.manager import ( from langchain.callbacks.manager import (
AsyncCallbackManagerForToolRun, AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun, CallbackManagerForToolRun,
) )
from typing import List, Any from typing import List, Any
#
from langchain.memory.chat_message_histories import FileChatMessageHistory from langchain.memory.chat_message_histories import FileChatMessageHistory
import logging import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
@tool @tool("WorkerNode")
class WorkerNode: class WorkerNode:
name = "WorkerNode" """Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on"""
description = "Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on" # name = "WorkerNode"
# description = "Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on"
# llm: ChatOpenAI # add this line # llm: ChatOpenAI # add this line
# tools: List[Tool] # tools: List[Tool]
# vectorstore: VectorStore # vectorstore: VectorStore

Loading…
Cancel
Save