Skip to main content

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


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.11.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

prem_utils-0.0.11-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file prem-utils-0.0.11.tar.gz.

File metadata

  • Download URL: prem-utils-0.0.11.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for prem-utils-0.0.11.tar.gz
Algorithm Hash digest
SHA256 7949c151b9db05c2bdeb3fbd5c3ef9d2a962861aabc64864b8611b0235a3e537
MD5 1438cd1ef6d02feed60b123d7b5d6843
BLAKE2b-256 76cb08da48a3ff3895a8e462c3b2fbed65848cc37a3f39a528beb1d959520978

See more details on using hashes here.

File details

Details for the file prem_utils-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: prem_utils-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for prem_utils-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 db9a82d4c86445060f2b5d41f2b2c745677c3cbd23244fde464467b0a7750a96
MD5 3ad62226af3e2f838df520209bd6746b
BLAKE2b-256 b4c96c9487f4d8edc663563819feca5222f91607006b698725754fad8c653cfc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page