Back to Llama Index

Fireworks Embeddings

docs/examples/embeddings/fireworks.ipynb

0.14.21891 B
Original Source

<a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/OpenAI.ipynb" target="_parent"></a>

Fireworks Embeddings

This guide shows you how to use Fireworks Embeddings through Fireworks Endpoints.

First, let's install LlamaIndex and the Fireworks dependencies

python
%pip install llama-index-embeddings-fireworks
python
!pip install llama-index

We can then query embeddings on Fireworks

python
from llama_index.embeddings.fireworks import FireworksEmbedding

embed_model = FireworksEmbedding(api_key="YOUR API KEY", embed_batch_size=10)
python
# Basic embedding example
embeddings = embed_model.get_text_embedding("How do I sail to the moon?")
print(len(embeddings), embeddings[:10])