FireworksEmbedder can be used to embed text data into vectors using the Fireworks API. Fireworks uses the OpenAI API specification, so the FireworksEmbedder class is similar to the OpenAIEmbedder class, incorporating adjustments to ensure compatibility with the Fireworks platform. Get your key from here.
Usage
fireworks_embedder.py
Params
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | "nomic-ai/nomic-embed-text-v1.5" | The name of the model used for generating embeddings. |
dimensions | int | 768 | The dimensionality of the embeddings generated by the model. |
api_key | str | - | The API key used for authenticating requests. |
base_url | str | "https://api.fireworks.ai/inference/v1" | The base URL for the API endpoint. |
enable_batch | bool | False | Enable batch processing to reduce API calls and avoid rate limits |
batch_size | int | 100 | Number of texts to process in each API call for batch operations. |
Developer Resources
- View Cookbook