Skip to main content

LlamaIndex Llms Integration: Openai Like

Overview

This package is a thin wrapper around the OpenAI API. It is designed to be used with the OpenAI API, but can be used with any OpenAI-compatible API into multimodal language models of the LlamaIndex framework.

Installation

pip install llama-index-multi-modal-llms-openai-like

Usage

Initialization

from llama_index.multi_modal_llms.openai_like import OpenAILikeMultiModal

llm = OpenAILikeMultiModal(
    model="Qwen/Qwen2-VL-72B-Instruct-base",
    api_base="http://localhost:1234/v1",
)

Without environmental variables

from llama_index.multi_modal_llms.openai_like import OpenAILikeMultiModal

llm = OpenAILikeMultiModal(
    api_key="your_api_key",
    model="Qwen/Qwen2-VL-72B-Instruct-base",
    api_base="http://localhost:1234/v1",
)

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,
)

Metadata

Release files for llama-index-multi-modal-llms-openai-like 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-multi-modal-llms-openai-like 0.2.1
File Size Uploaded Provenance Actions
llama_index_multi_modal_llms_openai_like-0.2.1.tar.gz 5.8 kB Without provenance Details for llama_index_multi_modal_llms_openai_like-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-multi-modal-llms-openai-like 0.2.1
File Interpreter ABI Platform Actions
llama_index_multi_modal_llms_openai_like-0.2.1-py3-none-any.whl Python 3 none any Details for llama_index_multi_modal_llms_openai_like-0.2.1-py3-none-any.whl

Total release size: 11.6 kB

Release files / llama_index_multi_modal_llms_openai_like-0.2.1.tar.gz

Download URL llama_index_multi_modal_llms_openai_like-0.2.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0bc7b697f3aa6711ce5323ea03ae565db17bf24fc7d9e473ca32897c5f444e2b
BLAKE2b-256 checksum
How to use checksums
e3eed68c2f85eba98adba302c79fbbc6f28947ae116206de9d930dd1761c7e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / llama_index_multi_modal_llms_openai_like-0.2.1-py3-none-any.whl

Download URL llama_index_multi_modal_llms_openai_like-0.2.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d1e13571d1a9d232250d635100a80bb2e55b34644e1a968f3d9ce188eb3d7eb
BLAKE2b-256 checksum
How to use checksums
c4552671a1e32f0a1fe224c53186e3e3ddbc2d3e0b5f1fce337ad4d9758ff225
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Security for llama-index-multi-modal-llms-openai-like 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page