Skip to main content

llama-index llms openai like integration

Project description

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

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_llms_openai_like-0.7.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_openai_like-0.7.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_llms_openai_like-0.7.1.tar.gz.

File metadata

  • Download URL: llama_index_llms_openai_like-0.7.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_llms_openai_like-0.7.1.tar.gz
Algorithm Hash digest
SHA256 ce7cef3686b1e62d7c08134b4d8ca56706cca816e4c4098eaede33002829a6f9
MD5 ab0b6f8be4b2fcd3eec93840adc88ca9
BLAKE2b-256 9d9f0d98d022a08f43d4374998072636ec50a7cb50009bbb9a2761f5b26a78cc

See more details on using hashes here.

File details

Details for the file llama_index_llms_openai_like-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: llama_index_llms_openai_like-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_llms_openai_like-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 831f1144077c6f9ea7a62e987b7f2af00310dded3056edca2cb509f70a3e650a
MD5 b6d3a82777c96b4ae6d40cdbecaf2c57
BLAKE2b-256 6d22a1e1ec1112c69ca0a379cd72691c36cdbcba78362622ce9a27e5a97965cc

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