Skip to main content

AI-Chatbot 🤖

Python library for building custom AI Chatbot with just one line of code.

Get Started

Install the package

pip install aichatbot

Load the module

import aichatbot as bot

Create the intents file by following format

{
    "intents": [
        {
            "tag": "tag name",
            "patterns": ["example-1 of user query", "example-2 of user query", "example-3"],
            "responses": ["bot response-1", "bot response-2", "bot response-3"]
        }
    ]
}

The patterns contains a list of example expected user query, which user will enter and responses contains the list of bot response.

Whenever a user inputs a query, bot will find the closest match with the patterns, and then select a random response from the list of responses specified under that pattern name.

Example

{
    "intents": [
        {
            "tag": "greeting",
            "patterns": ["Hi", "How are you", "Is anyone there?", "Hello", "Good day"],
            "responses": ["Hello, thanks for visiting", "Good to see you again", "Hi there, how can I help?"]
        },{
            "tag": "goodbye",
            "patterns": ["Bye", "See you later", "Goodbye"],
            "responses": ["See you later, thanks for visiting", "Have a nice day", "Bye! Come back again soon."]
        }
    ]
}

Create the model

filenames = {
    "intents": "./data/basic_intents.json",
    "dir": "dumps"
}

bot_model = bot.Create(filenames, technique="bow")

intents : Path to your intents file.
dir: Specify the directory where you want to save the bot model.
technique: Choose among [ bow | lstm | bert ]

That's it 😊, Start your conversation

bot.start(bot_model)

Optional Parameter:
end_conversation : Contains strings to stop the chatbot.
end_response : Output Message when bot quits

Example:

bot.start(bot_model, end_conversation=["/stop", "quit"], end_response="Thankyou for your time :)")

Metadata

Release files for aichatbot 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aichatbot 0.0.5
File Interpreter ABI Platform Actions
aichatbot-0.0.5-py3-none-any.whl Python 3 none any Details for aichatbot-0.0.5-py3-none-any.whl

Release files / aichatbot-0.0.5-py3-none-any.whl

Download URL aichatbot-0.0.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c6945b50a7d1d46567fd8d21f93b109ae92a9a248276cab7ca6238406a880e3
BLAKE2b-256 checksum
How to use checksums
3b8f5fe3dcaccd2c674d11d9f174021a32fb6c3146fe52cceca655f6a8eb2bb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

Security for aichatbot 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page