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
- update the xprompt-common version in
pyproject.toml
- bump version in
pyproject.toml
poetry build
poetry publish
git tag -a v0.1.0 -m "version 0.1.0"
Test out the client published
- create a new venv
- install the client
pip install xprompt
- 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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 033bebc0386bb25d407788bef9905e5118ba88beb96527fd187f74bb22f7d7f7 |
|
MD5 | b9a0ef6e2b1d22f89bad943fd01e23d2 |
|
BLAKE2b-256 | 49e67f72d24dad002aa25b6ff7da72f9d0506d26aeab291911f35e89626879ac |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4979123ab438bd828186d295bec9bbb4c24bbf51a9cdeaf30ada43cfe8c31bd5 |
|
MD5 | a1cd8673e68c047b18fc280baa2eee86 |
|
BLAKE2b-256 | 05bdb3559d30cd5344f28bf4b3ef18dc4054f5e8430ed3bd9cf0eb127ad5f82e |