From a001a33f688942db3a014a64d4acff149869645d Mon Sep 17 00:00:00 2001 From: Praveenk8051 Date: Sun, 16 Feb 2025 16:11:46 +0100 Subject: [PATCH] refactor: update type hints in AgentSpecification for improved clarity and consistency --- agentic_security/probe_actor/operator.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/agentic_security/probe_actor/operator.py b/agentic_security/probe_actor/operator.py index 76890eb..265796a 100644 --- a/agentic_security/probe_actor/operator.py +++ b/agentic_security/probe_actor/operator.py @@ -1,25 +1,25 @@ import asyncio -from typing import Any, Optional -from pydantic import BaseModel, Field -from pydantic_ai import Agent, RunContext +import logging +from typing import Any + import httpx from httpx import LLMSpec -import logging +from pydantic import BaseModel, Field +from pydantic_ai import Agent, RunContext # Configure logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) - class AgentSpecification(BaseModel): - name: Optional[str] = Field(None, description="Name of the LLM/agent") - version: Optional[str] = Field(None, description="Version of the LLM/agent") - description: Optional[str] = Field(None, description="Description of the LLM/agent") - capabilities: Optional[list[str]] = Field(None, description="List of capabilities") - configuration: Optional[dict[str, Any]] = Field( + name: str | None = Field(None, description="Name of the LLM/agent") + version: str | None = Field(None, description="Version of the LLM/agent") + description: str | None = Field(None, description="Description of the LLM/agent") + capabilities: list[str] | None = Field(None, description="List of capabilities") + configuration: dict[str, Any] | None = Field( None, description="Configuration settings" ) - endpoint: Optional[str] = Field( + endpoint: str | None = Field( None, description="Endpoint URL of the deployed agent" )