Skip to main content

SDK oficial para la API de Auralis Futures

Project description

Auralis SDK

Cliente oficial Python para la API de Auralis Futures.

Instalación

pip install auralis

O desde el código fuente:

git clone https://github.com/auralis/auralis-sdk
cd auralis-sdk
pip install .

Uso básico

from auralis import Auralis

client = Auralis(api_key="af_TU_LLAVE")

# Chat simple
respuesta = client.chat("¿Qué es la inteligencia artificial?")
print(respuesta)

# Con parámetros
respuesta = client.chat(
    "Explica la fotosíntesis",
    system      = "Eres un profesor de biología.",
    temperature = 0.7,
    max_tokens  = 200,
)
print(respuesta)

Conversación multi-turno

mensajes = [
    {"role": "system",    "content": "Eres un asistente técnico."},
    {"role": "user",      "content": "¿Qué es un Transformer?"},
    {"role": "assistant", "content": "Es una arquitectura de red neuronal..."},
    {"role": "user",      "content": "¿Y cómo funciona la atención?"},
]

respuesta = client.chat_mensajes(mensajes)
print(respuesta)

Estado de tu cuenta

info = client.estado()
print(info["plan"])                  # "lite" o "pro"
print(info["peticiones_restantes"])  # cuántas te quedan

Entrenamiento custom (solo plan pro)

corpus = open("mi_corpus.txt").read()
resultado = client.entrenar(corpus, n_pasos=2000)
print(resultado["status"])  # "entrenamiento_iniciado"

Admin: crear clientes (solo plan pro)

nueva = client.registrar_cliente("Key de Juan", "Juan Pérez", plan="lite")
print(nueva["llave"])    # af_... → guardarla, no se puede recuperar
print(nueva["preview"])  # af_XXX••••XXXX

Manejo de errores

from auralis import Auralis, AuthError, LimitError, ServerError

client = Auralis(api_key="af_...")

try:
    resp = client.chat("Hola")
except AuthError:
    print("Llave inválida o sin permisos.")
except LimitError:
    print("Límite del plan agotado.")
except ServerError:
    print("Error en el servidor.")

Referencia rápida

Método Descripción Plan
chat(mensaje) Chat simple, devuelve string Lite / Pro
chat_mensajes(messages) Chat multi-turno Lite / Pro
chat_raw(messages) JSON completo del servidor Lite / Pro
estado() Consumo y estado de la cuenta Lite / Pro
health() Estado del servidor Sin auth
entrenar(corpus) Entrenamiento custom Pro
listar_clientes() Lista todos los clientes Pro
registrar_cliente(...) Crea nueva API key Pro

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

auralis_af-1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

auralis_af-1.0.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file auralis_af-1.0.1.tar.gz.

File metadata

  • Download URL: auralis_af-1.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for auralis_af-1.0.1.tar.gz
Algorithm Hash digest
SHA256 74f6c5fb91f55d1c3401bac9fa83e0fb8f3c281ebf4a27b8e6cd0a5246d57453
MD5 cf1595767d96da915b2f2b84c1ea6854
BLAKE2b-256 c08b6120d07c3d18ff50c1be25480ac35ae4b24e4282a28712525838dafc4f3b

See more details on using hashes here.

File details

Details for the file auralis_af-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: auralis_af-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for auralis_af-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9236697a9a7b7ac431b587d97c2cc24cb676f9607e52a102f22d65cef02927cf
MD5 2790e1fd34c5b45efad1015befcd52cb
BLAKE2b-256 3eb9d38e892dcc0180cec88a5f4dcc362a940f406773a8305cde77d370051251

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