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.0.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.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: auralis_af-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ce27d531e02efdae773f8b680f0a59becff9d17a39039df44cf2a4c2b9d65d07
MD5 4e41494eb2baad984ad3816fe4de1da7
BLAKE2b-256 a79a8c610fa21ace21abd1e7a9e66a643f5332237d618392c5c8731681666468

See more details on using hashes here.

File details

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

File metadata

  • Download URL: auralis_af-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9231a3c1da18277d95fe3a0fa4082ffcbfe5f2c21dba99cd81cf76095aae29f2
MD5 00aca22e96c53c610e82a31d591c863c
BLAKE2b-256 5d237d23d7bbb448530c8d481aa5ce08b17397285548b5ef6d1caf80e03e3feb

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