class LiteLLMModel(BaseModelBackend):
completion()
. If:obj:None
, :obj:LiteLLMConfig().as_dict()
will be used. (default: :obj:None
)None
)None
)LiteLLMTokenCounter
will be used. (default: :obj:None
)None
) **kwargs (Any): Additional arguments to pass to the client initialization.def __init__(
self,
model_type: Union[ModelType, str],
model_config_dict: Optional[Dict[str, Any]] = None,
api_key: Optional[str] = None,
url: Optional[str] = None,
token_counter: Optional[BaseTokenCounter] = None,
timeout: Optional[float] = None,
**kwargs: Any
):
def _convert_response_from_litellm_to_openai(self, response):
def token_counter(self):
def _run(
self,
messages: List[OpenAIMessage],
response_format: Optional[Type[BaseModel]] = None,
tools: Optional[List[Dict[str, Any]]] = None
):
def check_model_config(self):