Skip to main content

No project description provided

Project description

XPrompt client

client for XPrompt


import xprmopt
api_key_response = xprompt.login(user_email='..', password='..')

xprompt.api_key = api_key_response['access_token']
xprompt.openai_api_key = ""

prompt = """tell me a joke"""

r = xprompt.OpenAIChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": prompt}], temperature=0)

Publish client

  1. update the xprompt-common version in pyproject.toml
  2. bump version in pyproject.toml
  3. poetry build
  4. poetry publish
  5. git tag -a v0.1.0 -m "version 0.1.0"

Test out the client published

  1. create a new venv
  2. install the client pip install xprompt
  3. run the example above

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

xprompt_client-0.1.4.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

xprompt_client-0.1.4-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

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