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.18.tar.gz
(24.4 kB
view hashes)
Built Distribution
Close
Hashes for prem_utils-0.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db5a4568e0a285c63cae8fd8b5ed13f46c52cb8a90085089140b2a4afb112d5 |
|
MD5 | f00d3ab08442b9c712f7a93a83a0a2f1 |
|
BLAKE2b-256 | f88344e05033d5498f6397599258d22760be22f8df0153dafe0fa06cfada096e |