Skip to main content

LlamaIndex Llms Integration: OVHcloud AI Endpoints

This integration allows you to use OVHcloud AI Endpoints with LlamaIndex. OVHcloud AI Endpoints provides OpenAI-compatible API endpoints for various models.

OVHcloud is a global player and the leading European cloud provider operating over 450,000 servers within 40 data centers across 4 continents to reach 1.6 million customers in over 140 countries. Our product AI Endpoints offers access to various models with sovereignty, data privacy and GDPR compliance.

Installation

Install the required packages:

pip install llama-index llama-index-llms-ovhcloud

API Key

OVHcloud AI Endpoints can be used in two ways:

  1. Free tier (with rate limits): You can use the API without an API key or with an empty string API key. This provides free access with rate limits.

  2. With API key: For higher rate limits and production use, generate an API key from the OVHcloud manager:

    • Go to https://ovh.com/manager
    • Navigate to Public Cloud section
    • Go to AI & Machine Learning → AI Endpoints
    • Create an API key

Usage

Basic Usage

To use OVHcloud AI Endpoints with LlamaIndex, first initialize the LLM:

from llama_index.llms.ovhcloud import OVHcloud

# Using with API key
llm = OVHcloud(
    model="gpt-oss-120b",
    api_key="YOUR_API_KEY",  # Or empty string for free tier with rate limits)
)

You can find available models in the OVHcloud AI Endpoints catalog.

Basic Completion

Generate a simple completion:

response = llm.complete("The capital of France is")
print(response.text)

Chat Messages

Use chat-style interactions:

from llama_index.core.llms import ChatMessage

messages = [
    ChatMessage(role="system", content="You are a helpful assistant"),
    ChatMessage(role="user", content="What is the capital of France?"),
]
response = llm.chat(messages)
print(response)

Streaming

Stream completions in real-time:

# Streaming completion
response = llm.stream_complete("The capital of France is")
for r in response:
    print(r.delta, end="")

# Streaming chat
messages = [
    ChatMessage(role="system", content="You are a helpful assistant"),
    ChatMessage(role="user", content="What is the capital of France?"),
]
response = llm.stream_chat(messages)
for r in response:
    print(r.delta, end="")

Get Available Models

You can dynamically fetch available models:

llm = OVHcloud(model="gpt-oss-120b")
available = llm.available_models  # List[Model] - fetched dynamically
model_ids = [model.id for model in available]
print(f"Available models: {model_ids}")

Additional Resources

For more information about OVHcloud AI Endpoints, visit:

Metadata

Release files for llama-index-llms-ovhcloud 0.3.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-llms-ovhcloud 0.3.0
File Size Uploaded Provenance Actions
llama_index_llms_ovhcloud-0.3.0.tar.gz 6.1 kB Without provenance Details for llama_index_llms_ovhcloud-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-llms-ovhcloud 0.3.0
File Interpreter ABI Platform Actions
llama_index_llms_ovhcloud-0.3.0-py3-none-any.whl Python 3 none any Details for llama_index_llms_ovhcloud-0.3.0-py3-none-any.whl

Total release size: 12.6 kB

Release files / llama_index_llms_ovhcloud-0.3.0.tar.gz

Download URL llama_index_llms_ovhcloud-0.3.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6d65c2c8d19a8345e3f9173c50118b09ae53a3863d742145e741a95b426f750b
BLAKE2b-256 checksum
How to use checksums
33451ad692fdee300427aa91495ba1d61301bfe1e3934d326cf59e7965e1d080
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_llms_ovhcloud-0.3.0-py3-none-any.whl

Download URL llama_index_llms_ovhcloud-0.3.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d36b2b7c81280f16e213b2f6fa22953810cd0790dd4afc34d3df6285193ff0ce
BLAKE2b-256 checksum
How to use checksums
08509c9157edb85688276c11ec285c77405a9f2d08c44d900f5bfcd6f5fea1d7
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-llms-ovhcloud 0.3.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