Skip to main content

Python client library for Vera AI chatbot by Hession Dynamics

Project description

verahession — Quick Start Guide

This guide explains how to install and use the verahession library to train an intent classifier and connect it to an LLM API.


1. Installation

Install the library using pip:

python3 -m pip install verahession

2. Train the Intent Classifier

Create a file named train.py with the following content:

from verahession.assistant import train_model

if __name__ == "__main__":
    INTENTS_PATH = "intents.json"
    MODEL_SAVE_PATH = "model.pth"
    train_model(INTENTS_PATH, MODEL_SAVE_PATH)

Make sure you have an intents.json file containing your training data.

Run the script:

python3 train.py

This will generate a model file named model.pth.


3. Use the Classifier for Chat

Create a file named chat.py with the following content:

from verahession.assistant import Classifier
from verahession.assistant import export_to_numpy

export_to_numpy("model.pth", "model.pkl")

clf = Classifier("model.pkl")

while True:
    sentence = input("You: ")
    if sentence == "quit":
        break
    tag, confidence = clf.classify(sentence)
    print(f"Intent: {tag} (Confidence: {confidence:.2f})")

Run the script:

python3 chat.py

Enter sentences to classify intents. Type quit to exit.


4. Connect to an LLM API

To send input to the LLM API, use the following code:

from verahession.api import *

vera_llm = vera_interface(API_KEY, AGENTNAME)
response = vera_llm.send(sentence)

Replace API_KEY and AGENTNAME with the appropriate values.


If you do not yet have an API key, you need to create an account at https://hessiondynamics.com/login - and then press 'create API key' - do NOT share the key with nanyone.

This completes the basic usage instructions for the verahession library. For additional help, consult the documentation or support channels.

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

verahession-0.1.28.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

verahession-0.1.28-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file verahession-0.1.28.tar.gz.

File metadata

  • Download URL: verahession-0.1.28.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for verahession-0.1.28.tar.gz
Algorithm Hash digest
SHA256 390e6acbcda0a9d20b34f148d79719e8192ba43729e25fd9c3f5ec46669b2ce7
MD5 ed7851b30ff05ba4fb3dc8f13db1b964
BLAKE2b-256 640e3513dee4dddd035a58e682bf085df35c3ed33efccd3467ac5d8fb19bfd20

See more details on using hashes here.

File details

Details for the file verahession-0.1.28-py3-none-any.whl.

File metadata

  • Download URL: verahession-0.1.28-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for verahession-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7bd400f1ed5e43232b6898509a00c03d2e9928181af6e57cc6b7d107096677
MD5 13bb60cc256bc76acd6886088cfc5359
BLAKE2b-256 b86533e9cbd63f1f6c92961a2b63e2a9dd55254d1ca933e7b3f903f3d2d89b38

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