All Projects → plasticuproject → cleverbotfree

plasticuproject / cleverbotfree

Licence: GPL-3.0 license
Free alternative for the Cleverbot API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cleverbotfree

Cleve
Open sourced Discord chat bot powered by brainshop.ai
Stars: ✭ 30 (-46.43%)
Mutual labels:  chatbot, cleverbot
messenger-bot
A Node bot server for the Facebook Messenger Platform
Stars: ✭ 23 (-58.93%)
Mutual labels:  chatbot
gpt-j
A GPT-J API to use with python3 to generate text, blogs, code, and more
Stars: ✭ 101 (+80.36%)
Mutual labels:  chatbot
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (+0%)
Mutual labels:  chatbot
sugaroid
The not-that intelligent, but cute Artificially Intelligent bot, created when I was bored.
Stars: ✭ 12 (-78.57%)
Mutual labels:  chatbot
api-ai-workshop
Dialogflow Workshop Material. This can be used to create a Conversational Agent for a simple Linear Conversation using Dialogflow
Stars: ✭ 56 (+0%)
Mutual labels:  chatbot
bot
茶馆群内QQ机器人(小可)
Stars: ✭ 61 (+8.93%)
Mutual labels:  chatbot
Chatbot
A Deep-Learning multi-purpose chatbot made using Python3
Stars: ✭ 36 (-35.71%)
Mutual labels:  chatbot
rivescript-java
A RiveScript interpreter for Java. RiveScript is a scripting language for chatterbots.
Stars: ✭ 60 (+7.14%)
Mutual labels:  chatbot
Plants-Identification
🌻 Deep learning project of Taiwan plants classification and detection with chatbot implementation
Stars: ✭ 18 (-67.86%)
Mutual labels:  chatbot
HiveMind-core
Join the mycroft collective, utils for mycroft-core mesh networking
Stars: ✭ 72 (+28.57%)
Mutual labels:  chatbot
charles-rest
Github chatbot and web-content indexer/searcher
Stars: ✭ 24 (-57.14%)
Mutual labels:  chatbot
bot5
Bot Friday Club - BOT5
Stars: ✭ 38 (-32.14%)
Mutual labels:  chatbot
virtual-assistant
Virtual Assistant
Stars: ✭ 67 (+19.64%)
Mutual labels:  chatbot
Splain
small parser to create more interesting language/sentences
Stars: ✭ 15 (-73.21%)
Mutual labels:  chatbot
chatKit
Open Source React Chat Widget. Ready for use and can be connected to any backend like Chatbot/NLP/Live Chat engine or messenger.
Stars: ✭ 42 (-25%)
Mutual labels:  chatbot
Microsoft-chatbot
Microsoft chatbot build using NLTK-Chatbot and django
Stars: ✭ 34 (-39.29%)
Mutual labels:  chatbot
botkit-storage-datastore
Google Cloud Datastore storage module for Botkit
Stars: ✭ 13 (-76.79%)
Mutual labels:  chatbot
eve-bot
EVE bot, a customer service chatbot to enhance virtual engagement for Twitter Apple Support
Stars: ✭ 31 (-44.64%)
Mutual labels:  chatbot
kanna kobayashi
Kanna Kobayashi's open source repository (Discord Bot)
Stars: ✭ 16 (-71.43%)
Mutual labels:  chatbot

build Python 3.8 GPLv3 license PyPI version Downloads Language grade: Python Quality Gate Status Security Rating

cleverbotfree

Cleverbot.com used to have a free API for their chatbot application. They have
removed their free API in place of a tiered subscription API service.
cleverbotfree is a free alternative to that API that uses a headless Firefox
browser to communicate with their chatbot application. You can use this module
to create applications/bots that send and receive messages to the Cleverbot
chatbot application.

Installation

Requirments

  • node >= 14.16.1
  • Python >= 3.8.0
  • python3-pip >= 21.1.1

Once requirments are met, you can install this library through pip.

pip install cleverbotfree

Drivers

This library uses the Playwright library to interface the Cleverbot website
with a headless Firefox browser.
To download the Playwright Firefox browser binary simply run this command after
installing cleverbotfree:

playwright install firefox

Usage

Examples

Example of a simple CLI script that creates a persistent chat session until closed.

import asyncio
import cleverbotfree

def chat():
    """Example code using cleverbotfree sync api."""
    with cleverbotfree.sync_playwright() as p_w:
        c_b = cleverbotfree.Cleverbot(p_w)
        while True:
            user_input = input("User: ")
            if user_input == 'quit':
                break
            bot = c_b.single_exchange(user_input)
            print('Cleverbot:', bot)
        c_b.close()

chat()


async def async_chat():
    """Example code using cleverbotfree async api."""
    async with cleverbotfree.async_playwright() as p_w:
        c_b = await cleverbotfree.CleverbotAsync(p_w)
        while True:
            user_input = input("User: ")
            if user_input == 'quit':
                break
            bot = await c_b.single_exchange(user_input)
            print('Cleverbot:', bot)
        await c_b.close()

asyncio.run(async_chat())

Example of a simple CLI script using the class decorator.

import asyncio
from cleverbotfree import CleverbotAsync
from cleverbotfree import Cleverbot

@Cleverbot.connect
def chat(bot, user_prompt, bot_prompt):
    """Example code using cleverbotfree sync api with decorator."""
    while True:
        user_input = input(user_prompt)
        if user_input == "quit":
            break
        reply = bot.single_exchange(user_input)
        print(bot_prompt, reply)
    bot.close()

chat("User: ", "Cleverbot:")


@CleverbotAsync.connect
async def async_chat(bot, user_prompt, bot_prompt):
    """Example code using cleverbotfree async api with decorator."""
    while True:
        user_input = input(user_prompt)
        if user_input == "quit":
            break
        reply = await bot.single_exchange(user_input)
        print(bot_prompt, reply)
    await bot.close()

asyncio.run(async_chat("User: ", "Cleverbot:"))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].