Skip to main content

llama-index multi-modal-llms nebius ai studio integration

Project description

LlamaIndex Llms Integration: Nebius AI Studio

Overview

This project integrates Nebius AI Studio API into multimodal language models of the LlamaIndex framework.

Installation

pip install llama-index-multi-modal-llms-nebius

Usage

Initialization

With environmental variables.

NEBIUS_API_KEY=your_api_key
from llama_index.multi_modal_llms.nebius import NebiusMultiModal

llm = NebiusLLM(model="Qwen/Qwen2-VL-72B-Instruct-base")

Without environmental variables

from llama_index.multi_modal_llms.nebius import NebiusMultiModal

llm = NebiusLLM(
    api_key="your_api_key", model="Qwen/Qwen2-VL-72B-Instruct-base"
)

Launching

Load images

from llama_index.core.multi_modal_llms.generic_utils import load_image_urls

image_urls = [
    "https://res.cloudinary.com/hello-tickets/image/upload/c_limit,f_auto,q_auto,w_1920/v1640835927/o3pfl41q7m5bj8jardk0.jpg",
]
image_documents = load_image_urls(image_urls)

Call complete with a prompt

complete_response = mm_llm.complete(
    prompt="Describe the images as an alternative text",
    image_documents=image_documents,
)

Stream complete

stream_complete_response = mm_llm.stream_complete(
    prompt="give me more context for this image",
    image_documents=image_documents,
)
for r in stream_complete_response:
    print(r.delta, end="")

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

llama_index_multi_modal_llms_nebius-0.5.0.tar.gz (4.1 kB view details)

Uploaded Source

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_multi_modal_llms_nebius-0.5.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0df911d39ac1ff680a0a556d3fabf28b1c44521dc45b23dcf5ebbf1ea8b6b128
MD5 3c444f4ebc2d58fe207ef049edd95d23
BLAKE2b-256 124f13dc8d5f188399900d7700ac912657cad71cd1249c39b19f04ff551e2210

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1875388b356403a31236acc8218ef0a03ffa8de08d72996491ee84b6e25f270
MD5 4d5e46460f7c3a769b0fc0afa249fd47
BLAKE2b-256 cefea0efc16d2c9a08d60e73acc912ad6b7c0953682dec19b074e81ae5388007

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