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)
| File | Size | Uploaded | |
|---|---|---|---|
| llama_index_llms_openai_like-0.8.1.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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}
|