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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xprompt_client-0.1.3.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.1.0

File hashes

Hashes for xprompt_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fb09cc26a2fca98fad930079dc58026cf260d72ed2a988b7b459142352408b1d
MD5 fd64de9401fb5fa27dbae260c691f2f8
BLAKE2b-256 0633de1d1029f068d9165f0b50dc116de9ebd870f1050cefb008a992ed47fc53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xprompt_client-0.1.3-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.1.0

File hashes

Hashes for xprompt_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 711fb955c6ac582b829868e773354d6f4a2cfe76b7dfd70e576c8c74657c5461
MD5 773a63995fda057a9a6f0fa553137f23
BLAKE2b-256 06fe7e4151bbf90e08ad5bf65faa8db88e990ae6b9c1d91517cb25f523e53a1b

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