Skip to main content

No project description provided

Project description

XPrompt client

client for XPrompt

Example

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)
print(r)

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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file xprompt_client-0.1.4.tar.gz.

File metadata

  • Download URL: xprompt_client-0.1.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.11 Darwin/23.2.0

File hashes

Hashes for xprompt_client-0.1.4.tar.gz
Algorithm Hash digest
SHA256 033bebc0386bb25d407788bef9905e5118ba88beb96527fd187f74bb22f7d7f7
MD5 b9a0ef6e2b1d22f89bad943fd01e23d2
BLAKE2b-256 49e67f72d24dad002aa25b6ff7da72f9d0506d26aeab291911f35e89626879ac

See more details on using hashes here.

File details

Details for the file xprompt_client-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: xprompt_client-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.11 Darwin/23.2.0

File hashes

Hashes for xprompt_client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4979123ab438bd828186d295bec9bbb4c24bbf51a9cdeaf30ada43cfe8c31bd5
MD5 a1cd8673e68c047b18fc280baa2eee86
BLAKE2b-256 05bdb3559d30cd5344f28bf4b3ef18dc4054f5e8430ed3bd9cf0eb127ad5f82e

See more details on using hashes here.

Supported by

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