mirror of
https://github.com/hwchase17/langchain
synced 2024-10-31 15:20:26 +00:00
68113348cc
Description - Integrates Fireworks within Langchain LLMs to allow users to use Fireworks models with Langchain, mainly for summarization. Issue - Not applicable Dependencies - None Tag maintainer - @rlancemartin --------- Co-authored-by: Raj Janardhan <rajjanardhan@Rajs-Laptop.attlocal.net>
22 lines
785 B
Markdown
22 lines
785 B
Markdown
# Fireworks
|
|
|
|
This page covers how to use the Fireworks models within Langchain.
|
|
|
|
## Installation and Setup
|
|
|
|
- To use the Fireworks model, you need to have a Fireworks API key. To generate one, sign up at platform.fireworks.ai
|
|
- Authenticate by setting the FIREWORKS_API_KEY environment variable.
|
|
|
|
## LLM
|
|
|
|
Fireworks integrates with Langchain through the LLM module, which allows for standardized usage of any models deployed on the Fireworks models.
|
|
|
|
In this example, we'll work the llama-v2-13b.
|
|
```python
|
|
from langchain.llms.fireworks import Fireworks
|
|
|
|
llm = Fireworks(model="fireworks-llama-v2-13b-chat", max_tokens=256, temperature=0.4)
|
|
llm("Name 3 sports.")
|
|
```
|
|
|
|
For a more detailed walkthrough, see [here](/docs/extras/modules/model_io/models/llms/integrations/Fireworks.ipynb). |