Official Python SDK for the VanAI API.
Project description
vanai-sdk (Python)
Official Python SDK for the VanAI API.
Install
pip install vanai-sdk
Usage
from vanai_sdk import VanAI
ai = VanAI(api_key="YOUR_API_KEY")
response = ai.chat(
message="Hello!",
system="You are a helpful assistant."
)
print(response)
API
VanAI(api_key, base_url="http://78.154.103.16:14168")
api_key(required) — a key created via the Discord bot's "Create Key" button.base_url(optional) — defaults to the hosted VanAI server.
ai.chat(message, system=None, history=None)
Returns the reply text (str). Raises VanAIError if the request fails or
the API key is invalid.
ai.health()
Returns the parsed JSON health-check response from the server.
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
vanai_sdk-1.0.0.tar.gz
(2.4 kB
view details)
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 vanai_sdk-1.0.0.tar.gz.
File metadata
- Download URL: vanai_sdk-1.0.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a25b8c8316272668c461ffbec973421312e8a61e95263c230aaada51797f67d
|
|
| MD5 |
a21a4264c7f48ff95bef6bd425b2bc0d
|
|
| BLAKE2b-256 |
e8429fb481b02c26d006cfc528f5318a7b333d7b1fa41e3c09caef9ffbcfe205
|
File details
Details for the file vanai_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vanai_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
765729c6d0ae6fd4416a9975fb18b59e1a83bfbc68634fdfcacb25bc18f06a2b
|
|
| MD5 |
f340d75eaabc8b3949eed312cc840bb5
|
|
| BLAKE2b-256 |
b2dbce6dd019ae637a13890b25d5fc1e87cef433ea4d140912822107ed4f40e6
|