mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-07-08 20:57:48 +02:00
fix(pre commit):
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
from pydantic_ai import Agent, RunContext
|
from pydantic_ai import Agent, RunContext
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List, Dict, Any
|
|
||||||
|
|
||||||
|
|
||||||
class AgentSpecification(BaseModel):
|
class AgentSpecification(BaseModel):
|
||||||
name: Optional[str] = Field(None, description="Name of the LLM/agent")
|
name: str | None = Field(None, description="Name of the LLM/agent")
|
||||||
version: Optional[str] = Field(None, description="Version of the LLM/agent")
|
version: str | None = Field(None, description="Version of the LLM/agent")
|
||||||
description: Optional[str] = Field(None, description="Description of the LLM/agent")
|
description: str | None = Field(None, description="Description of the LLM/agent")
|
||||||
capabilities: Optional[List[str]] = Field(None, description="List of capabilities")
|
capabilities: list[str] | None = Field(None, description="List of capabilities")
|
||||||
configuration: Optional[Dict[str, Any]] = Field(None, description="Configuration settings")
|
configuration: dict[str, Any] | None = Field(
|
||||||
|
None, description="Configuration settings"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Define the OperatorToolBox class
|
# Define the OperatorToolBox class
|
||||||
class OperatorToolBox:
|
class OperatorToolBox:
|
||||||
@@ -66,16 +68,14 @@ spec = AgentSpecification(
|
|||||||
version="4.0",
|
version="4.0",
|
||||||
description="A powerful language model",
|
description="A powerful language model",
|
||||||
capabilities=["text-generation", "question-answering"],
|
capabilities=["text-generation", "question-answering"],
|
||||||
configuration={"max_tokens": 100}
|
configuration={"max_tokens": 100},
|
||||||
)
|
)
|
||||||
|
|
||||||
# dataset_manager_agent.py
|
# dataset_manager_agent.py
|
||||||
|
|
||||||
|
|
||||||
# Initialize OperatorToolBox
|
# Initialize OperatorToolBox
|
||||||
toolbox = OperatorToolBox(
|
toolbox = OperatorToolBox(spec=spec, datasets=["dataset1", "dataset2", "dataset3"])
|
||||||
spec=spec, datasets=["dataset1", "dataset2", "dataset3"]
|
|
||||||
)
|
|
||||||
|
|
||||||
# Define the agent with OperatorToolBox as its dependency
|
# Define the agent with OperatorToolBox as its dependency
|
||||||
dataset_manager_agent = Agent(
|
dataset_manager_agent = Agent(
|
||||||
|
|||||||
Reference in New Issue
Block a user