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.3.0.tar.gz (2.4 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.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b8ba6ae3e0309e8a3adff351abc9b1e9d1768c1b46865aca8f1471a59291f171
MD5 6e96ccf355e4c52dcf4342ec161263e1
BLAKE2b-256 4bf748c951a76dda3d1fcac42cfdcb58d7e5251f288788fdebded5d9df88d0ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be16213970347b6ba77a665bed39064bad6438fa041d454d7822e825a82a03d8
MD5 3f52536b8a65c674ba66b435310a1117
BLAKE2b-256 3ea79d2183d159b876972b1470cfb31194217662072f2445ad67c3eb7c961b70

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