Python SDK for Qyro assistant session + chat API
Project description
Qyro Python SDK (example)
Installation
pip install qyro-sdk
Sample Usage
from qyro_sdk.auth import ClientTokenGenerator
from qyro_sdk.client import QyroClient
from qyro_sdk.server import QyroServerClient
BASE_URL = "https://qyroai.com"
API_KEY_ID = "<>"
API_KEY_SECRET = "<>"
ASSISTANT_ID = "<>"
if __name__ == '__main__':
server_client = QyroServerClient(
base_url=BASE_URL,
api_key_id=API_KEY_ID,
api_key_secret=API_KEY_SECRET,
timeout=120.0
)
session_id = server_client.create_session(ASSISTANT_ID, {"userId": "123"}).id
output_messages = server_client.chat(assistant_id=ASSISTANT_ID, session_id=session_id, message="Hello, who are you?")
print(output_messages)
client_token_generator = ClientTokenGenerator(api_key_id=API_KEY_ID, api_key_secret=API_KEY_SECRET)
client_token = client_token_generator.generate({
"userId": "123"
})
client = QyroClient(base_url=BASE_URL, token=client_token)
session_id = client.create_session(ASSISTANT_ID, {"userId": "123"}).id
output_messages = client.chat(assistant_id=ASSISTANT_ID, session_id=session_id, message="Hello, who are you?")
print(output_messages)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qyro_sdk-0.2.0.tar.gz.
File metadata
- Download URL: qyro_sdk-0.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
035fcb8d0fbf18e82688696a8f2c6901ab56cc9fa048eccb5527298303642882
|
|
| MD5 |
6343e58876664d720a8f2812cf26aff6
|
|
| BLAKE2b-256 |
235d7ec0682593f13ba5671352ee6cad4cc561f5204dbf1df27939416170c054
|
Provenance
The following attestation bundles were made for qyro_sdk-0.2.0.tar.gz:
Publisher:
python-publish.yml on qyroai/qyro-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qyro_sdk-0.2.0.tar.gz -
Subject digest:
035fcb8d0fbf18e82688696a8f2c6901ab56cc9fa048eccb5527298303642882 - Sigstore transparency entry: 482145330
- Sigstore integration time:
-
Permalink:
qyroai/qyro-python-sdk@40cdadf0391691a937f6325dfe1071115e9a1c7c -
Branch / Tag:
refs/tags/v1.0.0-alpha.01 - Owner: https://github.com/qyroai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40cdadf0391691a937f6325dfe1071115e9a1c7c -
Trigger Event:
release
-
Statement type:
File details
Details for the file qyro_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: qyro_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8686b8411a36503853267540da507886d789b6c16329dc4f5ce61e26567943f0
|
|
| MD5 |
a49cebccd9264492342eebf6c1a8da7b
|
|
| BLAKE2b-256 |
5e6c6d4b9e39e3a6db70dfd5c9a4f0c0d32c2fa91fdeafc9f927e4c8b98d19bd
|
Provenance
The following attestation bundles were made for qyro_sdk-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on qyroai/qyro-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qyro_sdk-0.2.0-py3-none-any.whl -
Subject digest:
8686b8411a36503853267540da507886d789b6c16329dc4f5ce61e26567943f0 - Sigstore transparency entry: 482145342
- Sigstore integration time:
-
Permalink:
qyroai/qyro-python-sdk@40cdadf0391691a937f6325dfe1071115e9a1c7c -
Branch / Tag:
refs/tags/v1.0.0-alpha.01 - Owner: https://github.com/qyroai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40cdadf0391691a937f6325dfe1071115e9a1c7c -
Trigger Event:
release
-
Statement type: