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

Built distribution (wheel)

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

Total release size: 12.0 kB

Release files / llama_index_llms_openai_like-0.8.1.tar.gz

Download URL llama_index_llms_openai_like-0.8.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1b6f973bba97cb4ce6c71feb54c2fa6834a071ec1c4b26636dc603b818d07b0b
BLAKE2b-256 checksum
How to use checksums
ce3dd76273f6a63f3c316ac22c2993240ec95af001b0deb8a3972bc1c92330f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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.1-py3-none-any.whl

Download URL llama_index_llms_openai_like-0.8.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fb26998e492d792d7594618258d5e05de235ccff25d8dd2960156f0f3f5007e
BLAKE2b-256 checksum
How to use checksums
5ffcca69dde44a1f111604200b4dcb60f8be3899bbeef0baa9002d4562207bd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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

This release

0.8.1 This release

2 release files

0.8.0

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