Kye 2 years ago
parent 3fbb202ddf
commit 97dafa7418

@ -5,14 +5,17 @@ from langchain.callbacks.manager import (
AsyncCallbackManagerForToolRun, AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun, CallbackManagerForToolRun,
) )
from langchain.tools import tool
# ---------- Worker Node ---------- # ---------- Worker Node ----------
from pydantic import Field from pydantic import Field
#
class WorkerNode(BaseTool): @tool
"""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 """ 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."
def __init__(self, llm, tools, vectorstore): def __init__(self, llm, tools, vectorstore):
super().__init__() super().__init__()

Loading…
Cancel
Save