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.29.tar.gz (6.2 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.29-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for verahession-0.1.29.tar.gz
Algorithm Hash digest
SHA256 baf281656b4d9eb7086ff55bcd09412c1c8ae60309d65762649f4c83c6f5a961
MD5 a56634ca69418f8ee58eb852029ba946
BLAKE2b-256 9ccc7417803f382fe0193b4765cf18e4cfff49648303d5bcd47d3af8b787de61

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for verahession-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 56e0b333e04b96f83cf405d43d61c7108baaf68f00905507d34551cc04b1a7ab
MD5 518681f29c1586798d80ede62bb3d48e
BLAKE2b-256 b52ca3d2e55cf75178711b536f22bcddabde9894535362d54b8e25e8ab013035

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