Kye 2 years ago
parent 3fbb202ddf
commit 97dafa7418

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

Loading…
Cancel
Save