Skip to main content

PolyLLM OpenAI-Compatible Plugin for Python

适用于 Qwen、Moonshot、OpenRouter、Groq、vLLM、Ollama 等所有兼容 OpenAI Chat Completions 协议的服务。

from polyllm_core import create_llm
from polyllm_openai_compatible import OpenAICompatiblePlugin

plugin = OpenAICompatiblePlugin()
llm = create_llm(
    plugins=[plugin],
    providers={"openai-compatible": {"api_key": "...", "base_url": "https://your-endpoint/v1"}},
    allow_unlisted_models=True,
)
response = await llm.chat("openai-compatible:your-model", messages=[{"role": "user", "content": "你好"}])

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polyllm_openai_compatible-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

polyllm_openai_compatible-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file polyllm_openai_compatible-0.1.0.tar.gz.

File metadata

File hashes

Hashes for polyllm_openai_compatible-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e23f88aa325d2ee4377026f87d8a4225650b718b03abbad3c59a898a89ac1fb9
MD5 89bfcbb9d6eda283e7a4e74c5db668fc
BLAKE2b-256 80af5d6f753bf03e11ca600b682563c9c4d05e16366a04a56b2e2582b599691e

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyllm_openai_compatible-0.1.0.tar.gz:

Publisher: release-python.yml on you-want/PolyLLM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyllm_openai_compatible-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polyllm_openai_compatible-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c95b87c138a3655800a5c8c5e82eaeee1c4cae4d909f97db42ea558ddcd5acb
MD5 c2768663669f3b0b29721e771bb5e1c1
BLAKE2b-256 1c2434a6bcd6ac324de605614ca110817e466f72abb81e66fb4f32f2e1317d62

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyllm_openai_compatible-0.1.0-py3-none-any.whl:

Publisher: release-python.yml on you-want/PolyLLM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 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