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.2.tar.gz (5.4 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.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for llama_index_llms_openai_like-0.7.2.tar.gz
Algorithm Hash digest
SHA256 ed9ff73f975dce470f98ac61c982151ba78eedfa3fb9b03894bc1d1312b213ff
MD5 48b574f05ce42bdb498f2ff39d687e71
BLAKE2b-256 3ba316410b28d131aa113ada79f856b78cb68a8e92a1e27255ea9c36c27a5dec

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for llama_index_llms_openai_like-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f45a7b1cec8fb3f5997684327ffe6c19f93e789c2fff35dc5522465850faf0b
MD5 3d014513ea8567d68067da680737ebb6
BLAKE2b-256 f40cfdddaee5391d915d3d568d2d8dbdb7c95647e65bb94d4ddb31d47cef5daf

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