langchain.chat_models.litellm.ChatLiteLLM¶
class langchain.chat_models.litellm.ChatLiteLLM[source]¶
Bases: BaseChatModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param anthropic_api_key: Optional[str] = None¶
param api_base: Optional[str] = None¶
param azure_api_key: Optional[str] = None¶
param cache: Optional[bool] = None¶
Whether to cache the response.
param callback_manager: Optional[BaseCallbackManager] = None¶
Callback manager to add to the run trace.
param callbacks: Callbacks = None¶
Callbacks to add to the run trace.
param cohere_api_key: Optional[str] = None¶
param custom_llm_provider: Optional[str] = None¶
param max_retries: int = 6¶
param max_tokens: int = 256¶
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model: str = 'gpt-3.5-turbo'¶
param model_kwargs: Dict[str, Any] [Optional]¶
Run inference with this temperature. Must by in the closed
interval [0.0, 1.0].
param model_name: Optional[str] = None¶
Model name to use.
param n: int = 1¶
Number of chat completions to generate for each prompt. Note that the API may
not return the full n completions if duplicates are generated.
param openai_api_key: Optional[str] = None¶
param openrouter_api_key: Optional[str] = None¶
param organization: Optional[str] = None¶
param replicate_api_key: Optional[str] = None¶