LLM Mediator
Just a simple mediator for different LLM models Will cache the response for the same input text during debug and save money for you.
Features
- Cache
- GPT-3.5
- GPT-3.5-16k
- GPT-4
- GPT-4-32k
- GPT-4-vision
- DeepSeek-Gradio-API (Chinese LLM Gradio API)
- DeepSeek (Chinese LLM)
Quick Usage for
Install:
pip install LLM-Mediator
# Install llm_mediator from github
pip install git+https://github.com/zeuscsc/llm_mediator.git
Usage:
model_name="GPT-4-32k"
model=LLM(GPT)
model.model_class.set_model_name(model_name)
response=model.get_response(system,assistant,user)
Where system, assistant, user are the input text, and response is the output text.
Or you can just follow the docs from OpenAi:
~~python
generator=model.get_chat_completion(messages=messages,functions=functions,function_call=function_call,stream=True,temperature=0,completion_extractor=GPT.AutoGeneratorExtractor,print_chunk=False)
## Set Environment Variables
Unix:
~~~shell Unix
export OPENAI_API_KEY=your openai key (Nessary for GPT)
export TECKY_API_KEY=your tecky key (Nessary for GPT)
Windows:
$ENV:OPENAI_API_KEY="your openai key" (Nessary for GPT)
$ENV:TECKY_API_KEY="your tecky key" (Nessary for GPT)
Python: Create a
from llm_mediator import gpt
gpt.OPENAI_API_KEY="your openai key" (Nessary for GPT)
gpt.TECKY_API_KEY = "your tecky key" (Nessary for GPT)
Metadata
Release files for LLM-Mediator 0.9.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| LLM_Mediator-0.9.17.tar.gz | 13.9 kB | Without provenance | Details for LLM_Mediator-0.9.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| LLM_Mediator-0.9.17-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for LLM_Mediator-0.9.17-py2.py3-none-any.whl |
Total release size: 29.5 kB
Release files / LLM_Mediator-0.9.17.tar.gz
| Download URL | LLM_Mediator-0.9.17.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f1fb1c45615d2a7c0dedb5a44af171614d711fab65e3bf6311733e14cd4fee5
|
|
BLAKE2b-256 checksum How to use checksums |
e6442b46d536a0a2f297a51120469c85cb9dfb76c09d28b0d90fef3b38a42624
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / LLM_Mediator-0.9.17-py2.py3-none-any.whl
| Download URL | LLM_Mediator-0.9.17-py2.py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ea974af36743cfb42af18fa3ede85099ed806b828ba4c76b8dc9625cd33cbdce
|
|
BLAKE2b-256 checksum How to use checksums |
5cb15c86d2e403920a7ece72c3cc3854080a64093ac934a3e50608673f08e116
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for LLM-Mediator 0.9.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.