Prem generic utils to use across Prem Components.
Project description
🛠️ 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
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}])
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prem-utils-0.0.23.tar.gz
(25.5 kB
view details)
Built Distribution
File details
Details for the file prem-utils-0.0.23.tar.gz
.
File metadata
- Download URL: prem-utils-0.0.23.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e68ce530d14c8b0b066d82d75d9ab6350b9f6f1a70b34104ffc994982ec88e |
|
MD5 | ab0a31363ae21fc5b7e105e2304c7109 |
|
BLAKE2b-256 | c0d2f0f0b24c1889e65a0ce773461989eb01a3e96d3132d712180bc64b429a54 |
File details
Details for the file prem_utils-0.0.23-py3-none-any.whl
.
File metadata
- Download URL: prem_utils-0.0.23-py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe9fe41b9d56de09eb2d70d02e9251a2f763be27a36684546e68a0b98296c688 |
|
MD5 | 4dbefaea6f2cb315c7603d9abe32daf9 |
|
BLAKE2b-256 | 231c1c19114055ddd6173e88bce1676757afb4fee95a5a8b96490810f008f27f |