Skip to main content
You are currently on a page documenting the use of Fireworks models as text completion models. Many popular models available on Fireworks are chat completion models.You may be looking for this page instead.
Fireworks AI is an AI inference platform to run and customize models. For a list of all models served by Fireworks see the Fireworks docs. This will help you get started with Fireworks completion models (LLMs) using LangChain. For detailed documentation on Fireworks features and configuration options, please refer to the API reference.

Overview

Integration details

Setup

To access Fireworks models you’ll need to create a Fireworks account, get an API key, and install the @langchain/fireworks integration package.

Credentials

Head to fireworks.ai to sign up to Fireworks and generate an API key. Once you’ve done this set the FIREWORKS_API_KEY environment variable:
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:

Installation

The LangChain Fireworks integration lives in the @langchain/fireworks package:

Instantiation

Now we can instantiate our model object and generate text completions:

Invocation


API reference

For detailed documentation of all Fireworks features and configurations head to the API reference.