refactor: update type hints in AgentSpecification for improved clarity and consistency

This commit is contained in:
Praveenk8051 committed 2025-02-16 16:11:46 +01:00
1 parent 1c6b8d96fb
commit a001a33f68
1 file changed
+11 -11
+11 -11
View File
@@ -1,25 +1,25 @@
import asyncio import asyncio
from typing import Any, Optional import logging
from pydantic import BaseModel, Field from typing import Any
from pydantic_ai import Agent, RunContext
import httpx import httpx
from httpx import LLMSpec from httpx import LLMSpec
import logging from pydantic import BaseModel, Field
from pydantic_ai import Agent, RunContext
# Configure logging # Configure logging
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
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( configuration: dict[str, Any] | None = Field(
None, description="Configuration settings" None, description="Configuration settings"
) )
endpoint: Optional[str] = Field( endpoint: str | None = Field(
None, description="Endpoint URL of the deployed agent" None, description="Endpoint URL of the deployed agent"
) )