File tree Expand file tree Collapse file tree
pydantic_ai_lightspeed/llamastack Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Mutable per-turn state for agent response processing."""
22
33from dataclasses import dataclass , field
4- from typing import Final
4+ from typing import Final , Optional
55
66from pydantic_ai import AgentRunResult
77
@@ -29,7 +29,7 @@ class AgentTurnAccumulator: # pylint: disable=too-many-instance-attributes
2929 vector_store_ids : Final [list [str ]]
3030 rag_id_mapping : Final [dict [str , str ]]
3131 turn_summary : TurnSummary
32- run_result : AgentRunResult [str ] | None = None
32+ run_result : Optional [ AgentRunResult [str ]] = None
3333 chunk_id : int = 0
3434 text_parts : list [str ] = field (default_factory = list )
3535 tool_round : int = 1
Original file line number Diff line number Diff line change 22
33from __future__ import annotations as _annotations
44
5- from typing import TYPE_CHECKING
5+ from typing import TYPE_CHECKING , Optional
66
77import httpx
88from openai import AsyncOpenAI
@@ -44,17 +44,17 @@ def client(self) -> AsyncOpenAI:
4444 return self ._client
4545
4646 @staticmethod
47- def model_profile (model_name : str ) -> ModelProfile | None :
47+ def model_profile (model_name : str ) -> Optional [ ModelProfile ] :
4848 """Return the model profile for the named model, if available."""
4949 return openai_model_profile (model_name )
5050
5151 def __init__ (
5252 self ,
5353 * ,
54- base_url : str | None = None ,
55- api_key : str | None = None ,
56- library_client : AsyncLlamaStackAsLibraryClient | None = None ,
57- http_client : httpx .AsyncClient | None = None ,
54+ base_url : Optional [ str ] = None ,
55+ api_key : Optional [ str ] = None ,
56+ library_client : Optional [ AsyncLlamaStackAsLibraryClient ] = None ,
57+ http_client : Optional [ httpx .AsyncClient ] = None ,
5858 ) -> None :
5959 """Create a new Llama Stack provider.
6060
You can’t perform that action at this time.
0 commit comments