Skip to main content

LlamaIndex Llms Integration: Openai Like

pip install llama-index-llms-openai-like

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.

Usage

from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="model-name",
    api_base="http://localhost:1234/v1",
    api_key="fake",
    # Explicitly set the context window to match the model's context window
    context_window=128000,
    # Controls whether the model uses chat or completion endpoint
    is_chat_model=True,
    # Controls whether the model supports function calling
    is_function_calling_model=False,
)

Metadata

Release files for llama-index-llms-openai-like 0.8.0

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-llms-openai-like 0.8.0
File Size Uploaded
llama_index_llms_openai_like-0.8.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-llms-openai-like 0.8.0
File Interpreter ABI Platform
llama_index_llms_openai_like-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / llama_index_llms_openai_like-0.8.0.tar.gz

Download URL llama_index_llms_openai_like-0.8.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
459f115ca343c96252b9d123986056193a7d088f64f73c5336ce381e02c9d6d2
BLAKE2b-256 checksum
How to use checksums
0b839695e5414b458e82b8baafdfec8f94dc1566cac712a171bcab4a03ca3a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_llms_openai_like-0.8.0-py3-none-any.whl

Download URL llama_index_llms_openai_like-0.8.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c629179cd5984439111337be1dd705b045d0e5f6cb3b7ea44a4b68a6c596c53a
BLAKE2b-256 checksum
How to use checksums
565921eb418402edef9f5d1b6e8632b26fd6ec35eae9705b70537a4b3ea341ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.8.1

2 release files

This release

0.8.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

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