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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e9f64dbe548d42eb4734060ba4833d3e8417c240cfc0ddc07e4790a71aaba9a5
MD5 eaaefee9614551cf3b38dd9f86ae5787
BLAKE2b-256 ad08ffd76ea15ff4d2bd97b188ee5030c7b8d22da0adec8f5efb95282a75b06f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65d06cf844a27f8e5107a92b755bfe878a810d2eca0ef8751826413a04ad2128
MD5 5b432784626f07cc28c218da26185a47
BLAKE2b-256 f61aa46e9473aa6a3a1f3abefe85020f4c1e991f53db767cca1da454884cba4c

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