main
Kye 2 years ago
parent 7b2a1134e7
commit 96b9ed1bca

@ -2,7 +2,7 @@
import os import os
import asyncio import asyncio
import faiss import faiss
from typing import Optional from typing import Any, Optional, List
from contextlib import contextmanager from contextlib import contextmanager
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
@ -59,12 +59,12 @@ vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {
# ---------- Worker Node ---------- # ---------- Worker Node ----------
# Define the input schema for the WorkerNode
# Define the input schema for the WorkerNode # Define the input schema for the WorkerNode
class WorkerNodeInput(BaseModel): class WorkerNodeInput(BaseModel):
ai_name: str = Field(description="Name of the AI") llm: Any = Field(description="Language model")
ai_role: str = Field(description="Role of the AI") tools: List[Tool] = Field(description="List of tools")
human_in_the_loop: bool = Field(description="Whether there is a human in the loop") vectorstore: VectorStore = Field(description="Vector store")
search_kwargs: dict = Field(description="Search parameters")
@tool("WorkerNode", args_schema=WorkerNodeInput) @tool("WorkerNode", args_schema=WorkerNodeInput)

Loading…
Cancel
Save