langchain.chat_models.konko.ChatKonko¶
class langchain.chat_models.konko.ChatKonko[source]¶
Bases: ChatOpenAI
ChatKonko Chat large language models API.
To use, you should have the konko python package installed, and the
environment variable KONKO_API_KEY and OPENAI_API_KEY set with your API key.
Any parameters that are valid to be passed to the konko.create call can be passed
in, even if not explicitly saved on this class.
Example
from langchain.chat_models import ChatKonko
llm = ChatKonko(model="meta-llama/Llama-2-13b-chat-hf")
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 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 konko_api_key: Optional[str] = None¶
param max_retries: int = 6¶
Maximum number of retries to make when generating.
param max_tokens: int = 20¶
Maximum number of tokens to generate.
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model: str = 'meta-llama/Llama-2-13b-chat-hf'¶
Model name to use.
param model_kwargs: Dict[str, Any] [Optional]¶
Holds any model parameters valid for create call not explicitly specified.
param model_name: str = 'gpt-3.5-turbo' (alias 'model')¶
Model name to use.