File tree Expand file tree Collapse file tree
src/agents/extensions/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import importlib
34import inspect
45import json
56import time
4849from ...util ._json import _to_dump_compatible
4950
5051try :
51- from any_llm import AnyLLM # type: ignore[import-not-found]
52+ AnyLLM = importlib . import_module ( "any_llm" ). AnyLLM
5253except ImportError as _e :
5354 raise ImportError (
5455 "`any-llm-sdk` is required to use the AnyLLMModel. Install it via the optional "
@@ -1087,12 +1088,11 @@ async def _call_any_llm_responses(
10871088 @staticmethod
10881089 def _make_any_llm_responses_params (payload : dict [str , Any ]) -> Any :
10891090 try :
1090- from any_llm .types .responses import ( # type: ignore[import-not-found]
1091- ResponsesParams as AnyLLMResponsesParams ,
1092- )
1091+ any_llm_responses = importlib .import_module ("any_llm.types.responses" )
10931092 except ImportError :
10941093 return _AnyLLMResponsesParamsShim (** payload )
10951094
1095+ AnyLLMResponsesParams = any_llm_responses .ResponsesParams
10961096 return AnyLLMResponsesParams (** payload )
10971097
10981098 def _remove_openai_responses_api_incompatible_fields (self , list_input : list [Any ]) -> list [Any ]:
You can’t perform that action at this time.
0 commit comments