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.1.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.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.3.1.tar.gz
Algorithm Hash digest
SHA256 223a1f6c95249a43f3178c87684dc3b95ec11e9d99a7719b843110e2799483ea
MD5 3a30fd11f85c252011c575fcf1241d5a
BLAKE2b-256 89738d2495adebc9306cecaff362cfb68db9c30b2ef833f268933f413ff77b34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc51327b3deaf8f74b3f2cbb296e972fd91ead82b14f598f555483852c3922ac
MD5 a61b70358754d41eadc488a4e87d48f1
BLAKE2b-256 b3b6c7d035663162927a017bf9c5fc1c58da28d48f89e5fd8581de372ca83e83

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