Skip to main content

A Python package for creating ChatBot with your own data

Project description

HAI_Bot

Python License

HAI_Bot is a Python library that allows you to create a custom AI assistant to help with various tasks. You can train the AI with your own data to improve its performance.

Features

  • Trainable with custom data
  • Natural Language Processing (NLP) for better interactions
  • Customizable model based on user needs

Installation

To install this library, use pip:

pip install HAI_Bot

or you can install library from existing .gz file.

pip install hai-0.1.tar.gz

Usage

Basic Example

from HAI_Bot import HAI_model
n = HAI_model("NLP_Data.json", "chatbot_model.h5")

while True:
  m = str(input("TEXT ==>  ")).lower()
  if m == 'quit':
    break
  print(n.Chat(m))

Using Test Data

The Test folder contains sample training data and test scripts:

  • chatbot_model.h5: A pre-trained model for quick testing.
  • NLP_Data.json: A structured dataset used for training.
  • Test.py: A script demonstrating how to use the chatbot.

To test the chatbot using existing data:

python Test/Test.py

Training Data Format

For effective learning, the training data should be in JSON format with structured intents. Example:

{
  "intents": [
    {
      "tag": "greeting",
      "patterns": ["Hello", "Hi", "Hey"],
      "responses": ["Hello! How can I assist you?", "Hi there!"]
    },
    {
      "tag": "goodbye",
      "patterns": ["Bye", "See you", "Goodbye"],
      "responses": ["Goodbye! Have a great day!", "See you soon!"]
    }
  ]
}

Ensure your data follows this structure for optimal performance.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Make your changes.
  3. Submit a Pull Request.

Contact

For questions or suggestions, reach out via email or open an issue on GitHub.

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

hai_bot-0.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

HAI_Bot-0.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file hai_bot-0.2.tar.gz.

File metadata

  • Download URL: hai_bot-0.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0rc3

File hashes

Hashes for hai_bot-0.2.tar.gz
Algorithm Hash digest
SHA256 90a61ea9cfc655d5a3044cf263f9ac016c6cbdcc644d7318dc10ea3661c7080c
MD5 250ec5334b0819c4e92dc4d1f709dde3
BLAKE2b-256 9ebb290aa66e252811ac4b2111a4381ffbac162fc819b0a2b523e3f6bd7046c5

See more details on using hashes here.

File details

Details for the file HAI_Bot-0.2-py3-none-any.whl.

File metadata

  • Download URL: HAI_Bot-0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0rc3

File hashes

Hashes for HAI_Bot-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b183637c1468366b3a104f22ef12b8267f1503b70f68a00e5f80c0e808c784e
MD5 1bd77b8e3a0968baa2d726b7d547d081
BLAKE2b-256 5d557bdb2e3452cd97dd9da682fc8de3654b0a50b1b827c0b576fa68ebbde959

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