Skip to main content

LlamaIndex Embeddings Integration: Xinference

Xorbits Inference (Xinference) is an open-source platform to streamline the operation and integration of a wide array of AI models.

You can find a list of built-in embedding models in Xinference from its document Embedding Models

To learn more about Xinference in general, visit https://inference.readthedocs.io/en/latest/

Installation

pip install llama-index-embeddings-xinference

Usage

Parameters Description:

  • model_uid: Model uid not the model name, sometimes they may be the same (e.g., bce-embedding-base_v1).
  • base_url: base url of Xinference (e.g., http://localhost:9997).
  • timeout: request timeout set (default 60s).
  • prompt: Text to embed.

Text Embedding Example

from llama_index.embeddings.xinference import XinferenceEmbedding

xi_model_uid = "xinference model uid"
xi_base_url = "xinference base url"

xi_embed = XinferenceEmbedding(
    model_uid=xi_model_uid,
    base_url=xi_base_url,
    timeout=60,
)


def text_embedding(prompt: str):
    embeddings = xi_embed.get_query_embedding(prompt)
    print(embeddings)


async def async_text_embedding(prompt: str):
    embeddings = await xi_embed.aget_query_embedding(prompt)
    print(embeddings)

Metadata

Release files for llama-index-embeddings-xinference 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-embeddings-xinference 0.5.0
File Size Uploaded Provenance Actions
llama_index_embeddings_xinference-0.5.0.tar.gz 4.3 kB Without provenance Details for llama_index_embeddings_xinference-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-embeddings-xinference 0.5.0
File Interpreter ABI Platform Actions
llama_index_embeddings_xinference-0.5.0-py3-none-any.whl Python 3 none any Details for llama_index_embeddings_xinference-0.5.0-py3-none-any.whl

Total release size: 8.3 kB

Release files / llama_index_embeddings_xinference-0.5.0.tar.gz

Download URL llama_index_embeddings_xinference-0.5.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fe6c2a7891acd46b120db8b430f601b9da9aaa8d98dccd046cdd6d2ec6c1a9ae
BLAKE2b-256 checksum
How to use checksums
74b2deb8aecfbedd1be7aae47906a7d1de2ed96067e105a648f1188e94613525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Release files / llama_index_embeddings_xinference-0.5.0-py3-none-any.whl

Download URL llama_index_embeddings_xinference-0.5.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
381ac6f91d758084339b534eedf6d1dd917038bd2dd01c73d06d635f2ad31617
BLAKE2b-256 checksum
How to use checksums
ddc0dc53bf92825eaaad2e71adee3f28024180d2afa88c7001c2d6e6e583c4ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Security for llama-index-embeddings-xinference 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page