Ask a question to get started
Enter to send•Shift+Enter new line
Fireworks()
LLM
Base inference API URL.
Fireworks API key.
Automatically read from env variable FIREWORKS_API_KEY if not provided.
FIREWORKS_API_KEY
Model name. (Available models)
Model temperature.
Used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. A value of 1 will always yield the same output. A temperature less than 1 favors more correctness and is appropriate for question answering or summarization. A value greater than 1 introduces more randomness in the output.
1
Holds any model parameters valid for create call not explicitly specified.
create
Used to limit the number of choices for the next predicted word or token. It specifies the maximum number of tokens to consider at each step, based on their probability of occurrence. This technique helps to speed up the generation process and can improve the quality of the generated text by focusing on the most likely options.
The maximum number of tokens to generate.
A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.
An integer that specifies how many top token log probabilities are included in the response for each token generation step.
Timeout in seconds for requests to the Fireworks API.
Build extra kwargs from additional params that were passed in.
LLM models from Fireworks.
Fireworks
To use, you'll need an API key. This can be passed in as init param fireworks_api_key or set as environment variable FIREWORKS_API_KEY.
fireworks_api_key
Fireworks AI API reference
Example:
response = fireworks.generate(["Tell me a joke."])