langchain.llms.fireworks.FireworksChat¶
class langchain.llms.fireworks.FireworksChat[source]¶
Bases: BaseLLM
Wrapper around Fireworks Chat large language models.
To use, you should have the fireworksai python package installed, and the
environment variable FIREWORKS_API_KEY set with your API key.
Any parameters that are valid to be passed to the fireworks.create
call can be passed in, even if not explicitly saved on this class.
.. rubric:: Example
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¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param fireworks_api_key: Optional[str] = None¶
param max_retries: int = 6¶
param max_tokens: int = 512¶
The maximum number of tokens to generate in the completion.
-1 returns as many tokens as possible given the prompt and
the models maximal context size.
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model_id: str = 'accounts/fireworks/models/fireworks-llama-v2-7b-chat'¶
Model name to use.
param prefix_messages: List [Optional]¶
Series of messages for Chat input.
param request_timeout: Optional[Union[float, Tuple[float, float]]] = None¶
Timeout for requests to Fireworks completion API. Default is 600 seconds.
param tags: Optional[List[str]] = None¶
Tags to add to the run trace.
param temperature: float = 0.7¶
What sampling temperature to use.
param top_p: float = 1¶