🛠️ Prem Utils
Utilities, and Connectors in order to interact with all Model Serving and Fine-tuning Providers.
🗄️ Connectors
| Name | Status |
|---|---|
| Anthropic | Active |
| OpenAI | Active |
| Perplexity | Active |
| Cohere | Active |
| DeepInfra | Deprecated |
| FireworksAI | Deprecated |
| OctoAI | Deprecated |
| Groq | Active |
| Lamini | Deprecated |
| Mistral | Active |
| OpenRouter | Active |
| Prem | Active |
| Replicate | Deprecated |
| Together | Deprecated |
🤙 Usage
pip install prem-utils
import asyncio
from inspect import iscoroutine
from prem_utils.connectors import openai
connector = openai.OpenAIConnector(api_key="")
prompt = "Hello, how are you?"
response = connector.chat_completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": prompt}])
if iscoroutine(response):
response = asyncio.run(response)
message = response["choices"][0]["message"]["content"]
print(message)
📦 Contribute
Install the necessary dependencies
virtualenv venv -p=3.11
source venv/bin/activate
pip install -r requirements.txt
Test all or one connector
# will run all the connectors
python e2e.py
# only one connector
python e2e.py --name perplexity
Metadata
Release files for prem-utils 0.0.47
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 |
|---|---|---|---|---|
| prem_utils-0.0.47.tar.gz | 31.2 kB | Without provenance | Details for prem_utils-0.0.47.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prem_utils-0.0.47-py3-none-any.whl | Python 3 | none | any | Details for prem_utils-0.0.47-py3-none-any.whl |
Total release size: 74.5 kB
Release files / prem_utils-0.0.47.tar.gz
| Download URL | prem_utils-0.0.47.tar.gz |
|---|---|
| Size | 31.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
572608deb53277ba021cf9a87ead82598be33a2809a1f2bc728d7d4d226b13b6
|
|
BLAKE2b-256 checksum How to use checksums |
f02c925197011caf96485be0ecf1a417bcc57d8f91f23ef172aafcfe4671670a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / prem_utils-0.0.47-py3-none-any.whl
| Download URL | prem_utils-0.0.47-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43a0db92ffdb780d2a71870a7e8d54eae060bd9a9b1ae1fcfd6660a784050a75
|
|
BLAKE2b-256 checksum How to use checksums |
d14b54def295ef5577cdfdaba9e285fcfec0aa38a04cc69e9e6aca1cb76708e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Security for prem-utils 0.0.47
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.