Ask Sage Python Client API
Project description
Ask Sage Python Client v1.41
This is the official Python client for the Ask Sage API. It allows you to interact with the Ask Sage service, providing a simple and pythonic way to make requests to the service.
Check Ask Sage API documentation here: https://docs.asksage.ai
Installation
You can install the Ask Sage Python client via pip:
pip install asksageclient
Usage
First, import the client:
from asksageclient import AskSageClient
Then, instantiate the client:
client = AskSageClient('your_email_here', 'your_api_key_here') Warning: Do not store credentials in code, use environment variables/secrets instead
Now, you can use the client to interact with the Ask Sage service. For example, to interact with the main endpoint:
response = client.query(message='Who is Nic Chaillan?')
print(response)
Endpoints
The client provides methods for all the Ask Sage API endpoints:
get_modelsadd_datasetdelete_datasetassign_datasetget_user_logsget_user_loginsqueryquery_pluginexecute_pluginfollow_up_questionstokenizerget_personasget_datasetsget_pluginscount_monthly_tokenscount_monthly_teach_tokenstraintrain_with_filefile
Each method corresponds to an endpoint of the Ask Sage API. The content parameter should be a dictionary containing the data you want to send in the request body.
Error Handling
The client includes basic error handling. If a request fails, it will print an error message and return None.
Contributing
Contributions are welcome! Please submit a pull request or create an issue to contribute to this project.
License
See the LICENSE file for details.
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 asksageclient-1.41.tar.gz.
File metadata
- Download URL: asksageclient-1.41.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dd943c0a1d45b8047fec38e21f27cd4bfbdd87faf9683d00c336347fd0d21fa
|
|
| MD5 |
e928096dc584598786f00c591a446077
|
|
| BLAKE2b-256 |
76ed271dc6042026ad65bd12746d10824b8ccc76c1ff9165cdc833a808cb28ef
|
File details
Details for the file asksageclient-1.41-py3-none-any.whl.
File metadata
- Download URL: asksageclient-1.41-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb0ae8d58651feb52d35424ec8b4d88468cbb4eb4195f0f1e04bb6c016732017
|
|
| MD5 |
520373fcda2adf48a452289de5e9e703
|
|
| BLAKE2b-256 |
54b90c43a05245d76dbbaaf391749e6ffcc98fbd27680a127c9b7673f452c596
|