1616from dotenv import load_dotenv
1717from loguru import logger
1818import typing
19- from typing import Optional , Dict , List , Union , Tuple , Callable , get_args , get_origin
19+ from typing import Optional , Dict , List , Union , Tuple , Callable , get_args , get_origin , Any
2020from copy import deepcopy
2121
2222from litellm import completion , completion_cost , token_counter , cost_per_token
@@ -1079,13 +1079,13 @@ def __init__(self, config: Dict, llmsobject: LLMS):
10791079 self .config = config
10801080 self .llmsobject = llmsobject
10811081
1082- def __getitem__ (self , item : str ) -> any :
1082+ def __getitem__ (self , item : str ) -> Any :
10831083 return self .config [item ]
10841084
1085- def __setitem__ (self , key : str , value : any ):
1085+ def __setitem__ (self , key : str , value : Any ):
10861086 self .config [key ] = value
10871087
1088- def get (self , item : str , default = None ) -> any :
1088+ def get (self , item : str , default = None ) -> Any :
10891089 return self .config .get (item , default )
10901090
10911091 def items (self ):
@@ -1095,10 +1095,18 @@ def query(
10951095 self ,
10961096 messages : List [Dict [str , str ]],
10971097 tools : Optional [List [Dict ]] = None ,
1098+ tool_map : Optional [Dict [str , Callable ]] = None ,
10981099 return_cost : bool = False ,
10991100 return_response : bool = False ,
11001101 debug = False ,
1102+ litellm_debug = None ,
1103+ stream = False ,
1104+ via_streaming = False ,
1105+ max_recursive_calls = 99 ,
1106+ recursive_call_info : Optional [Dict [str , any ]] = None ,
11011107 ** kwargs ,
1108+
1109+
11021110 ) -> Dict [str , any ]:
11031111 llmalias = self .config ["alias" ]
11041112 return self .llmsobject .query (
@@ -1107,7 +1115,13 @@ def query(
11071115 tools = tools ,
11081116 return_cost = return_cost ,
11091117 return_response = return_response ,
1110- debug = debug , ** kwargs )
1118+ debug = debug ,
1119+ litellm_debug = litellm_debug ,
1120+ stream = stream ,
1121+ via_streaming = via_streaming ,
1122+ max_recursive_calls = max_recursive_calls ,
1123+ recursive_call_info = recursive_call_info ,
1124+ ** kwargs )
11111125
11121126 def __str__ (self ):
11131127 return f"LLM({ self .config ['alias' ]} )"
0 commit comments