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 22
33import os
44import subprocess
5+ from typing import Optional
56
67
78def version_split (value : str ) -> tuple [int , ...]:
@@ -19,7 +20,7 @@ def is_prerelease(tag: str) -> bool:
1920 return any (n in tag for n in omit )
2021
2122
22- def get_latest_stable () -> str | None :
23+ def get_latest_stable () -> Optional [ str ] :
2324 """Return the latest stable tag."""
2425 stdout = subprocess .check_output (["git" , "tag" ], text = True )
2526 tags = [tag for tag in stdout .splitlines () if not is_prerelease (tag )]
Original file line number Diff line number Diff line change @@ -698,7 +698,7 @@ class UnifiedInferenceProvider(ConfigurationBase):
698698 "Llama Stack provider_type by the synthesizer." ,
699699 )
700700
701- id : str | None = Field (
701+ id : Optional [ str ] = Field (
702702 None ,
703703 title = "Provider ID" ,
704704 description = "Optional identifier emitted as the Llama Stack provider_id. "
@@ -730,7 +730,7 @@ class UnifiedInferenceProvider(ConfigurationBase):
730730
731731 @field_validator ("id" )
732732 @classmethod
733- def validate_id (cls , value : str | None ) -> str | None :
733+ def validate_id (cls , value : Optional [ str ] ) -> Optional [ str ] :
734734 """Strip and validate an optional high-level provider id.
735735
736736 Parameters:
Original file line number Diff line number Diff line change @@ -360,9 +360,9 @@ def from_llama_stack_client(
360360 model_name : str ,
361361 client : AsyncLlamaStackClient | AsyncLlamaStackAsLibraryClient ,
362362 * ,
363- responses_params : ResponsesApiParams | None = None ,
364- model_settings : ModelSettings | None = None ,
365- profile : ModelProfileSpec | None = None ,
363+ responses_params : Optional [ ResponsesApiParams ] = None ,
364+ model_settings : Optional [ ModelSettings ] = None ,
365+ profile : Optional [ ModelProfileSpec ] = None ,
366366 ) -> LlamaStackResponsesModel :
367367 """Create a ``LlamaStackResponsesModel`` from a Llama Stack client.
368368
You can’t perform that action at this time.
0 commit comments