Skip to main content

llama-index embeddings Cloudflare Workers AI integration

Project description

LlamaIndex Embeddings Integration: Cloudflare Workers AI

Cloudflare Workers AI provides text embedding service for Cloudflare users. You can find a full list of available models from its document https://developers.cloudflare.com/workers-ai/models/#text-embeddings

To learn more about Cloudflare Workers AI in general, visit https://developers.cloudflare.com/workers-ai/

Example

pip install llama-index-embeddings-cloudflare-workersai
from llama_index.embeddings.cloudflare_workersai import CloudflareEmbedding

my_account_id = "example_account_id"
my_api_token = "example_token"

my_embed = CloudflareEmbedding(
    account_id=my_account_id,
    auth_token=my_api_token,
    model="@cf/baai/bge-base-en-v1.5",
)

embeddings = my_embed.get_text_embedding("Why sky is blue")

embeddings_batch = my_embed.get_text_embedding_batch(
    ["Why sky is blue", "Why roses are red"]
)

For more detailed example of installation and usage, please refer to the Jupyter Notebook example.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_embeddings_cloudflare_workersai-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_embeddings_cloudflare_workersai-0.5.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_embeddings_cloudflare_workersai-0.5.0.tar.gz
Algorithm Hash digest
SHA256 01e3ab6d6ddc0c7df8e87d55f4c4d1df0f8e9d5f04d6f15f0b5b9bb9d54ba495
MD5 880d7eac36013b2348d835ba525f35cd
BLAKE2b-256 9a910939fa5200b674b0f2dab01e1867cc6e890745adde36117918a49f084ec2

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_cloudflare_workersai-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_embeddings_cloudflare_workersai-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_embeddings_cloudflare_workersai-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdba24b72083f3d3a997f10976a5306aa3d331e35f53d5cc9850bb440b37bfa1
MD5 b3edc2b70c51f77a7d95bf167de9bde7
BLAKE2b-256 d5bcc80ef9d695840f83f07551bbea1ff0007fe7bf44a39e03b980ff8c397b87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page