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.2.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.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for polyllm_openai_compatible-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7740c60e035f14cd2aa3b762d44865ac2dcfe37baf4372167317cb1584c37dcf
MD5 1e8043f5562a8250e08ed031b5c9f154
BLAKE2b-256 39a226f1d73654aa34b50185c60ceb264659329b1b5e8a1a0186cb81c3e31a74

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyllm_openai_compatible-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polyllm_openai_compatible-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1a4dacec638660dee76cebfb94c7fbfaf9d96dab226d52262757f13ea12ab43
MD5 7b4bb4257d9bcdea33a215575d2ad13a
BLAKE2b-256 412d7f16f53c3777d3bd28f535df049180d7ecae2fcc2911dd28fa57a17b8e19

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyllm_openai_compatible-0.2.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

This release

0.2.0 This release

2 files

0.1.0

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