langchain.llms.fireworks.Fireworks¶
class langchain.llms.fireworks.Fireworks[source]¶
Bases: BaseFireworks
Wrapper around Fireworks large language models.
To use, you should have the fireworks 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 batch_size: int = 20¶
Batch size to use when passing multiple documents to generate.
param cache: Optional[bool] = None¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param fireworks_api_key: Optional[str] = None¶
Api key to use fireworks API
param max_retries: int = 6¶
Maximum number of retries to make when generating.
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' (alias 'model')¶
Model name to use.
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¶