Fireworks AI
Fireworks AI is a generative AI inference platform to run and customize models with industry-leading speed and production-readiness.
Installation and setupโ
-
Install the Fireworks integration package.
pip install langchain-fireworks
-
Get a Fireworks API key by signing up at fireworks.ai.
-
Authenticate by setting the FIREWORKS_API_KEY environment variable.
Authenticationโ
There are two ways to authenticate using your Fireworks API key:
-
Setting the
FIREWORKS_API_KEY
environment variable.os.environ["FIREWORKS_API_KEY"] = "<KEY>"
-
Setting
api_key
field in the Fireworks LLM module.llm = Fireworks(api_key="<KEY>")
Chat modelsโ
See a usage example.
from langchain_fireworks import ChatFireworks
API Reference:ChatFireworks
LLMsโ
See a usage example.
from langchain_fireworks import Fireworks
API Reference:Fireworks
Embedding modelsโ
See a usage example.
from langchain_fireworks import FireworksEmbeddings
API Reference:FireworksEmbeddings