A Python package for creating ChatBot with your own data
Project description
HAI_Bot
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_bot-0.4.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:
- Fork the repository.
- Make your changes.
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hai_bot-0.4.tar.gz.
File metadata
- Download URL: hai_bot-0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
031cd5c7bfaacb381c36ef000403224f1c186a7210d71b20c7faa2bb556d4a63
|
|
| MD5 |
a1779794b287d0f19109cb0518b3b15c
|
|
| BLAKE2b-256 |
c72d1b2962269cab874186809aa07815339c99a9753a236d40b7db652753e005
|
File details
Details for the file HAI_Bot-0.4-py3-none-any.whl.
File metadata
- Download URL: HAI_Bot-0.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78d9b31c0fa5b1328ce2eb7a904d13983a25cbd6024b77fb1ac7989817996ecc
|
|
| MD5 |
057e2a8e4ba453bb45635c44ca89f4b5
|
|
| BLAKE2b-256 |
60359e0dadfb2385ff4f2db34ea9a60968a18ed5d0d1629e0e0bf8b5200cf312
|