Skip to main content

Fireworks

caution

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.

npm install @langchain/community

You can use models provided by Fireworks AI as follows:

import { Fireworks } from "@langchain/community/llms/fireworks";

const model = new Fireworks({
temperature: 0.9,
// In Node.js defaults to process.env.FIREWORKS_API_KEY
apiKey: "YOUR-API-KEY",
});

API Reference:

  • Fireworks from @langchain/community/llms/fireworks

Behind the scenes, Fireworks AI uses the OpenAI SDK and OpenAI compatible API, with some caveats:

  • Certain properties are not supported by the Fireworks API, see here.
  • Generation using multiple prompts is not supported.

Was this page helpful?


You can leave detailed feedback on GitHub.