Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vanai_sdk-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

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

Hashes for vanai_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4a25b8c8316272668c461ffbec973421312e8a61e95263c230aaada51797f67d
MD5 a21a4264c7f48ff95bef6bd425b2bc0d
BLAKE2b-256 e8429fb481b02c26d006cfc528f5318a7b333d7b1fa41e3c09caef9ffbcfe205

See more details on using hashes here.

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

Hashes for vanai_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 765729c6d0ae6fd4416a9975fb18b59e1a83bfbc68634fdfcacb25bc18f06a2b
MD5 f340d75eaabc8b3949eed312cc840bb5
BLAKE2b-256 b2dbce6dd019ae637a13890b25d5fc1e87cef433ea4d140912822107ed4f40e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page