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.
🤙 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.8.tar.gz
(24.0 kB
view details)
Built Distribution
File details
Details for the file prem-utils-0.0.8.tar.gz
.
File metadata
- Download URL: prem-utils-0.0.8.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc0ec292117a628fbee0649850419db07fa24007947f22dcb0a263ff8a5d681d |
|
MD5 | b76dddbf4f00d2fa7a51643f130e1c40 |
|
BLAKE2b-256 | 330ffc806fe5db50f59926c6cd92925e6ccc6665f01f20e6ba25faabe2d2211d |
File details
Details for the file prem_utils-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: prem_utils-0.0.8-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1635a8a2b562f362504a00a8ed4e58793305706a428e3750625c2e03b3c8608c |
|
MD5 | e0e520bfa1cda3075dd043c4f959afe2 |
|
BLAKE2b-256 | 7bc59ab7448a640f5edf5ec7a41ac3179167020861f4acde04517f41fd4bc726 |