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

Uploaded Source

Built Distribution

prem_utils-0.0.14-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prem-utils-0.0.14.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.14.tar.gz
Algorithm Hash digest
SHA256 cdadf6b2e4376c9af1c74a472e2303fbe005722b87e8c7df3fd83867cfe594ee
MD5 bbd3043321a980fa97f3207842930dd8
BLAKE2b-256 0a2a1c1c5c82c0931b09ac03afec5bfae73ce77ab0339b33981f6715b87f42ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prem_utils-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 34.4 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 8ffbe776cfe17ae4b3561fdca2574f369284f13fcb71631b189df1e64bd86f2c
MD5 f254cff331b6238e8caa2fd24e2d09ae
BLAKE2b-256 6a736ad0ad8c22693ec1654145a900daddc7667d6455615be0fdd9c9ddfa98d2

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