LLM Bridge
LLM Bridge is a Python library that wraps multiple LLM providers into a consistent API while using each provider's native SDK internally, supporting multimodal I/O, file processing, and stream output.
GitHub: https://github.com/windsnow1025/LLM-Bridge
PyPI: https://pypi.org/project/LLM-Bridge/
Workflow and Features
- Chat Client Factory: creates a client for the specific LLM API with model parameters
- Model Message Converter: converts general messages to model messages
- Media Processor: converts general media to model compatible formats.
- Model Message Converter: converts general messages to model messages
- Chat Client: generate stream or non-stream responses
Supported Features for API Types
The features listed represent the maximum capabilities of each API type supported by LLM Bridge.
| API Type | Input Format | Capabilities | Output Format |
|---|---|---|---|
| OpenAI Completion API | Text, Image, PDF, Audio | Thinking, Structured Output | Text, Audio |
| OpenAI Responses API | Text, Image, PDF | Thinking, Web Search, Code Execution, Structured Output | Text, Image |
| Google GenAI | Text, Image, PDF, Audio, Video | Thinking, Web Search, Web Fetch, Code Execution, Structured Output | Text, Image, File |
| Anthropic | Text, Image, PDF | Thinking, Web Search, Web Fetch, Code Execution, Structured Output | Text, File |
| xAI | Text, Image, PDF, Audio, Video, docx, xlsx, pptx | Thinking, Web Search, Code Execution, Structured Output | Text |
Development
Python uv
- Install uv:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - Install Python in uv:
uv python install 3.12; upgrade Python in uv:uv python upgrade 3.12 - Configure requirements:
uv sync --refresh
PyCharm
Add New Interpreter >> Add Local Interpreter
- Environment: Select existing
- Type: uv
Usage
Copy ./usage/.env.example and rename it to ./usage/.env, then fill in the environment variables.
Build
uv build
Metadata
Release files for LLM-Bridge 2.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_bridge-2.1.14.tar.gz | 132.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_bridge-2.1.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 181.5 kB
Release files / llm_bridge-2.1.14.tar.gz
| Download URL | llm_bridge-2.1.14.tar.gz |
|---|---|
| Size | 132.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea55b1de437b9f4031ca22078c507eb55651474e7a12520038b63720229459e3
|
|
BLAKE2b-256 checksum How to use checksums |
5b70580e952aeb3d3c70e29bbfbb6b6a4c5e700b656957e5f9afb8cff04e0909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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 / llm_bridge-2.1.14-py3-none-any.whl
| Download URL | llm_bridge-2.1.14-py3-none-any.whl |
|---|---|
| Size | 48.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1bd61e6af8f8892b3114fb65eae8a7be9a75a05722d9f9e86586196680ad0e4c
|
|
BLAKE2b-256 checksum How to use checksums |
4f9e25ba8553dbf01c142495dee5fb4a0ff63894e7b89b764f162299bd3d0a90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|