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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.5.1.tar.gz
Algorithm Hash digest
SHA256 58544d65947b531256af765ee041a73eda4a6bbc75ffe4fdfba9bd18e68fe277
MD5 e19a512f5c0433708bfabba67fb23554
BLAKE2b-256 304274e7361325fa208982bf72575d85f042efba6a369e076a2c8381c01f27e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_multi_modal_llms_nebius-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5822bc4a252b43a8e9a4fed25ee4fabf35c9b1bcad4276cfedc68cc2766f4868
MD5 71eaeab958b567b78d0406e4a805b6ad
BLAKE2b-256 15d863eee5882b729bc8c7f097a6faa6e9853450bb72951657263c43b259a1f0

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