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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hai_bot-0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b4d66f737b4207cf853195e365799faf60651db5e376b5319295efa4afa5edde
MD5 fee39807955a7912443cb0f7d5a298ca
BLAKE2b-256 2995b936f68451115f208ee52e84bc55f6e51c52ba3905798f2d0f298605beba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: HAI_Bot-0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ded80a9b23efc51016a10ab593be9fd4d87af503158d67f7971f8503110f531b
MD5 baeb49b0eef1d82db423d79b51b13715
BLAKE2b-256 6e088f45715ceb68c82ee29fa5ed1d50f15ff3add4fdba7d230599a858aa78c2

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