Skip to main content

No project description provided

Project description

Carter Offline

Carter Offline is an intent classifier which is based on a modified version of Janex, and utilises LazyLyrics' Carter-Py library.

It compares the input you send to your carter agent with a list of patterns in your chosen intents file, and then remembers the class. Once your Carter agent creates a response, the program saves the response to your intents, recording the interaction and improving your intents dataset.

This is based on an older version of Janex (release 0.0.5.beta, specifically), and so it may not include the latest features from there unless explicitly added in.

See also:

https://github.com/LazyLyrics/carter-py
https://github.com/Cipher58/Janex

How to use

Adding to your project

Firstly, you'll need to install the library using the Python pip package manager.

python3 -m pip install Carter-Offline

Secondly, you need to import the library into your Python script.

from CarterOffline import *

Using Carter-Offline in your code

Define Variables

To use this program, you will need to define your API key, name and intent file path.

intents_file_path, thesaurus_file_path, UIName, CarterAPI = "intents.json", "thesaurus.json", "YOUR CARTER AGENT'S NAME", "YOUR CARTER AGENT'S API"

input_string = "Hello!" # for example

User = "YOUR NAME"

# Create an instance of the CarterOffline class

CarterOffline = CarterOffline(intents_file_path, thesaurus_file_path, UIName, CarterAPI)
Speak to your agent

Here is the simple bit of code that sends the message to your Carter agent using the Carter-Py library, and then uses the Janex code to classify it, and save it to your intents file.

ResponseOutput = CarterOffline.SendToCarter(input_string, User)

print(ResponseOutput)

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

Carter-Offline-2.0.26.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file Carter-Offline-2.0.26.tar.gz.

File metadata

  • Download URL: Carter-Offline-2.0.26.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Carter-Offline-2.0.26.tar.gz
Algorithm Hash digest
SHA256 508d9a3bb8e569af1ea21b8e3d9f045e88f42c35c3399ed2fddc4937f7ca7597
MD5 9d24413818500ec7f882e48874e35480
BLAKE2b-256 b3fa2cd5679a16a86d04484a0ac5f0aa602bcd1a98e2cf42795e0ad855402852

See more details on using hashes here.

Supported by

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