Category: Chat

  • Chatbots As Medical Assistants In COVID-19 Pandemic

    All healthcare workers are on the frontline during the covid pandemic. They face an overwhelming workload and risk their health and wellbeing every day. Moreover, doctors and nurses still have patients with other diseases and must take care of them on a high level nevertheless. So, healthcare providers are looking for the opportunity to turn from classical consultation treatment and look for new solutions. One of these solutions is a chatbot.

    Chatbots — the future of medicine?

    According to Juniper Research, the healthcare system will become a major user of chatbots in areas such as patient diagnosis, patient information, and voice-capable digital assistants to support healthcare providers. The increased introduction of chatbots will free up medical staff time and save countries’ healthcare systems around $3.7 billion by 2023, and the number of chatbot interactions will reach 2.8 billion per year by this time.

    Why the chatbots?

    Chatbots are a piece of software that conducts conversation on a determined topic automatically.

    Their benefits are:

    • simplified communication with users of the medical information system,
    • saved time and financial resources for medical personnel,
    • convenient for users and improved patient satisfaction,
    • fast respond to FAQ-type queries (contact details, directions, opening hours, and service details),
    • 24/7 availability.

    Of course, one should understand that chatbots can’t replace doctors. Their task is to be the first point of contact before any human involvement is needed. Thus, chatbots reduce the number of time doctors spend on initial diagnosis, general questions, appointment scheduling.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    Intellexer Chatbot helps during the COVID-19 pandemic

    Intellexer COVID-19 chatbot powered by AI gives solutions that help both patients and healthcare providers. The chatbot’s name is DIVOC and it offers to talk about questions about one’s health. It allows chatting in a natural language about COVID-19 and healthcare-related topics.

    The COVID-bot uses a proprietary linguistic platform Intellexer to analyze entered data. Intellexer chatbot does not wait for predefined queries, it extracts the main focus of the question, and gives the corresponding answer.

    Intellexer chatbot does not wait for predefined queries, it extracts the main focus of the question, and gives the corresponding answer.

    If the chatbot sees the mentions of some potential COVID-19 symptoms, it offers to take a COVID-symptoms test — “COVID Checklist”. Its content is built according to clinical protocols and best practices. The test lets you know if you need an appointment with your healthcare provider and gives information about your risks of getting infected or possible complications. The chatbot does not collect the data of the test, so all provided information is strictly confidential.

    If the chatbot sees the mentions of some potential COVID-19 symptoms, it offers to take a COVID-symptoms test — “COVID Checklist”.

    Moreover, Intellexer COVID-19 chatbot helps to stay informed about the risks of COVID-19 infection in the USA. “USA Risk Assessment” provides up-to-date information for every state from the official websites.

    Chatbots share the latest information, such as:

    · total COVID-19 cases;

    · daily growth;

    · cases per 100,000 people;

    · case fatality rate.

    Intellexer COVID-19 chatbot helps to stay informed about the risks of COVID-19 infection in the USA.

    Chatbot DIVOC is also equipped with a news tracker on COVID-19, lockdown and other related issues. News tracker is based on Intellexer NewsMonitoring.

    This chatbot can be customized to any disease and have much bigger functionality like automatic appointment scheduling with physicians, remote consultations, video-controlled treatment, etc. If you think of improving your service, business, a website with an AI chatbot, Intellexer is a good place to start.

    Summary

    We are concerned about the challenge that the world community is facing right now, and consider it our duty to help fight the COVID-19 pandemic. Intellexer COVID chatbot is an accessible health service that includes a symptoms checklist, USA risks assessment, and answers to any questions about the coronavirus.

    We hope that this chatbot will be useful to everyone but soon will become just a part of the history together with covid pandemic and lockdowns.

    Stay healthy!

    Don’t forget to give us your 👏 !


    Chatbots As Medical Assistants In COVID-19 Pandemic was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Revolutionize Healthcare With AI-Driven Chatbots!

    Today we are on the cusp of a revolution in the healthcare industry. As Covid-19 grips the world and communities become increasingly affected, healthcare communications have been pushed to its limits. With the majority of healthcare workers dedicating their time to Covid- vulnerable patients, there is an acute shortage of medical professionals.

    According to the estimates of the World Health Organization (WHO), we need over 4 million health professionals in addition to the current workforce worldwide, to be able to offer quality healthcare to the entire population.

    Today, healthcare consumers are taking a more assertive role in their healthcare journey, expecting immediate high-quality, and accurate information that is smart and cost-effective.

    AI-driven healthcare chatbots by ‘Botspice’ can provide digital health solutions to tackle the global health challenges we face today, providing information, care, and support at the click of a button. With a combination of NLP and machine learning technologies, chatbots can understand a patient’s intent and answer questions effectively without frequently following up. As such, they can manage the overwhelming demand for healthcare.

    Information through Conversations

    Conversational AI tools make conversations with patients more personalized, thus increasing overall customer satisfaction and improving the quality of service provided. Healthcare chatbots can help in providing authentic and reliable information and be a patient’s guide through conversations.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    Round the clock availability

    The pandemic has opened our eyes to the need of the hour: To create a better healthcare ecosystem that provides ready access to healthcare information. And that could be achieved by healthcare bots that provide round-the-clock availability. Patients can get answers to queries round the clock without any downtime: discussing symptoms, accessing existing prescriptions, or even getting answers to follow-up questions, all delivered with ease.

    Booking appointments

    Booking appointments with doctors get easier with chatbots streamlining patient workflow, directing them based on expressed symptoms. Tasks like confirmation of appointments, rescheduling, termination can be done by bots speeding up transactional patient queries.

    Resolving FAQ’s

    Many of the patients have a lot of queries about Covid-19 these questions are mostly repetitive like:

    ● What are the symptoms?

    ● Is it air-borne?

    ● What are the vaccines available?

    Many of these questions have standardized answers. The availability of answers to FAQs and guidelines about the virus can be accessible to patients via a conversational interface. They no longer have to waste time scrolling through websites only to be swarmed with information from a wide range of sources, some of which may not be reliable.

    Screening on a massive scale

    Healthcare chatbots can screen patients on a massive scale via analytic insights. A healthcare bot can simultaneously have conversations with thousands of people anytime, freeing up healthcare professionals to concentrate on providing first-hand access to care. No matter the magnitude of questions, healthcare bots can provide answers immediately.

    Future of Conversational Healthcare Chatbots beyond the pandemic.

    Conversational AI Chatbot is not expected to replace a doctor in any way. However, they can be relied upon to improve care and drive down costs across the healthcare industry.

    The Global Healthcare Chatbots Market is expected to rise from its initial estimated value of USD 122.0 million in 2018 to an estimated value of USD 542.3 Million by 2026 registering a CAGR of 20.5% in the forecast period of 2019–2026.

    By design, Healthcare Bot will continuously learn, adapt and improve, further optimizing the user experience with each subsequent interaction thus revolutionizing patient engagement.

    Don’t forget to give us your 👏 !


    Revolutionize Healthcare With AI-Driven Chatbots! was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Certified Workshops

    Get Certified in Conversational UX & NLP/NLU Development from Top Industry Experts

    Certified Conversational Design / NLP Workshop

    We have both Live and On-Demand Certified Workshops

    Upcoming Live Workshops

    • Dates: May 25–27, 2021
    • Taught By: Conversational Design Institute, CoCoHub, BotCopy & Google
    • Project: Design, Develop & Launch an FAQ bot that can interact with a database.

    Conversational UX Certified Workshop

    Dialogflow/NLP Certified Workshop

    Agenda

    • Overview, what makes a great enterprise chatbot?
    • Intro to NLU frameworks (Google Dialogflow) and Botcopy
    • Establishing an ROI / data-driven mindset before you build!

    Build Your Enterprise Chatbot

    • Intro to Dialogflow/Botcopy stack: Response types & components
    • Writing & Design: Fine-tuning your bot’s style to boost engagement
    • Coding and Webhooks: Backend fulfillment in Dialogflow
    • Conversational Websites: Window triggers, ref parameters and more
    • Authentication: Passing JWTs for personalized & secure tasks
    • Data collection Deep Dive

    On-Demand Certified Workshops

    Save 25% by using discount code: 2021

    Save 25% Use Discount Code: 2021


    Certified Workshops was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Only 2 Weeks to Go!

    We only have a few seats available!

    Chatbot Conference Online

    The Chatbot Conference Online is now less than 2 weeks away!

    In this year’s event, we are featuring the Top Industry speakers in Conversational AI.

    So what’s new?

    We’ve taken our certified workshops to the next level!

    We partnered up with the best teachers, so our workshops are now taught by Google, CoCoHub, Conversational Design Institute and BotCopy!

    If you haven’t registered, this is the perfect time to sign up and save your spot.

    3 Day Agenda

    • On-Demand: Available Now
    • May 25th: Chatbot Conference Online. Network with the top industry speakers and leaders.
    • May 26th: Certified Conversational UX Workshop with Conversational Design Institute & CoCoHub
    • May 27th: Certified Dialogflow NLP Workshop with Google & Botcopy.

    Looking forward to seeing you at the Conference.

    See What Past Attendees are Saying

    3 Reasons you need to Attend:

    1. Save Time: Discover how Enterprises are using Chatbots, AI and Voice from Top Industry Experts. Attending our events puts you in touch with Top Experts in AI, Bots , Voice and saves you a lot of time and trial and error.
    2. Certified Workshops taught by Google, Conversational Design Institute, CoCoHub & Botcopy: Learn how to Design and Develop Chatbots and Voice Apps in our full day workshops. Workshops like this typically cost between $2,000 — $5,000. Workshop details below.
    3. Networking & Virtual Happy Hour: We have digitized the networking experience! In our upcoming event, you will be able to virtually network with speakers, attendees, vendors and exchange contact information with the click of a button.

    More Reviews


    Only 2 Weeks to Go! was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • How to code a cryptocurrency trading bot to buy Bitcoin when Musk Tweets about it

    Why would someone do this?

    The answer is a simple one — the Techno King of Tesla has a history of influencing crypto markets whenever he tweets about them, to the point where a movement in the market is almost expected when he picks up is phone and starts expressing his opinions on the blockchain technology over twitter.

    By creating a crypto trading bot that buys bitcoin every time the Tesla boss tweets about it you can rest assured that you are going to catch a VIP seat on the rocket that will slingshot right past the moon and make its way directly to Mars, where Elon spends most of the summer months due to its cold weather and dry climate.

    Will this actually work?

    The quick answer is “not sure” — as no one tested this strategy before. The longer answer is probably — as long as we’re talking about Bitcoin. Statistically speaking, regardless of the time you bought your bitcoin, you are most likely in profit (excluding the recent all time high around the time of writing).

    So if nothing else, you will at least spice up your BTC HODLing strategy with a bit of help from Elon. This article won’t go into a detailed analysis to show whether this strategy actually works or not. This article is about building it for fun, but it does have serve as a powerful reminder of just how many resources we have at our disposal and that you can build just about any crypto trading bot you can think of.

    You will also be able to see and use the code so you can test it or improve it.

    How to set your bitcoin bot up

    What this article is focused on is the actual technical building of the bitcoin trading bot, and how to set it up in a safe test environment, so let’s get to it.

    You will need the following resources:

    • A MetaTrader5 account
    • A demo account with XBTFX so you can safely test your strategy
    • A Twitter Dev Account
    • A Tweepy API account

    Setting up MetaTrader5 and XBTFX

    As the name suggests, MT5 is a platform which supports multiple brokers along with detailed technical analysis — the main reason to start your crypto bot building journey with MT5 is due to it’s easy integration with Python and out-of-the-box support for a demo or virtual account so that you can test in a safe demo environment.

    There are detailed instructions on how to install and configure MetaTrader5 as well as the XBTFX crypto broker in the previous post that covers how to build a crypto trading bot in python, so we’ll only briefly going over these steps in this article. If you need more information on how to do it, as well as why those two platforms were chosen, please refer back to the linked article above.

    Start by downloading and installing MetaTrader5 and create an account on their platform. The next thing you need is a broker that you can place your trades with — I recommend XBTFX as they offer the most crypto-pairs of all brokers that work with the MT5 terminal. Register with XBTFX and create a demo account.

    You can now connect to your demo account via MT5 by navigating over to File > Open an Account and searching for XBTFX. If you have registered using the referral link above you will need to select “Connect to Existing Account”, otherwise proceed to create a new account.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    Apply for a Dev Account with Twitter

    Before you can use Twitter’s API or the Tweepy Python module, you need a developer account with Twitter. Luckily the application process is quick and easy, and you will probably be accepted as long as you describe why you need the access to the Twitter API.

    Nativate over to twitter’s dev platform and click Apply in the top right corner of the navigation menu.

    On the next page click Apply for a Developer account and you will be prompted to sign in with your twitter account.

    Follow the registration process and explain your intentions with the API

    After you have completed all the necessary information, it may take anywhere between a couple of hours to a couple of days before you can get access to the platform. In my experience it was only a few hours.

    Once your dev account is ready navigate over to the Projects & Apps tab open Project 1, if this is not available go ahead and create one. Under your project go to Keys and Tokens and generate the following (make sure to save them or you will need to regenerate the keys!):

    Defining bot parameters

    • The bot will open a buy position on bitcoin every time Elon mentions bitcoin in his tweet
    • Take profit is set to 10% and stop loss to 5%
    • The bitcoin bot will not place another trade if there is already an active trade (can be adjusted)

    Coding for your bitcoin trading bot

    Preliminary set-up

    First off you need to import the MetaTrader5 and Tweepy modules using PyPi.

    pip install tweepy
    pip install MetaTrader5
    pip install — upgrade MetaTrader5

    The next step is to import these modules along with a few others into your Python interpreter.

    #Twitter Scraper module
    import tweepy
    from tweepy import OAuthHandler
    #dates module
    from datetime import datetime, date
    from itertools import count
    import timeimport re
    #trading terminal
    import MetaTrader5 as mt5

    We now need to store the secret keys and tokens that you generated using the Twitter Dev platform in order to use them with Tweepy.

    # Store Twitter credentials from dev account
    consumer_key = “CONSUMER_KEY”
    consumer_secret = “CONSUMER_SECRET”
    access_key = “API_KEY”
    access_secret = “API_SECRET”
    # Pass twitter credentials to tweepy via its OAuthHandler
    auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
    auth.set_access_token(access_key, access_secret)
    api = tweepy.API(auth)

    In the last part of the preliminary set up you need to connect to the MT5 terminal, store your account’s equity and define the trading instrument that we will be working with — in this case it’s Bitcoin. We will also create a short list of keywords to query Elon’s last tweet against.

    # connect to the trade account without specifying a password and a server
    mt5.initialize()
    # account number in the top left corner of the MT5 terminal window
    # the terminal database password is applied if connection data is set to be remembered
    account_number = 555
    authorized = mt5.login(account_number)
    if authorized:
    print(f’connected to account #{account_number}’)
    else:
    print(f’failed to connect at account #{account_number}, error code: {mt5.last_error()}’)
    # store the equity of your account
    account_info = mt5.account_info()
    if account_info is None:
    raise RuntimeError(‘Could not load the account equity level.’)
    else:
    equity = float(account_info[10])

    Now let’s define the coin that we’ll be placing trades on and the keywords that we’ll be searching for.

    #crypto sign and keywords
    CRYPTO = ‘BTCUSD’
    keywords = [‘Bitcoin’, ‘bitcoin’, ‘BITCOIN’, ‘btc’, ‘BTC’]

    Getting Elon’s latest tweet

    With all the preliminary stuff out of the way, it’s time to focus on the cool parts of this bot. Let’s start by getting Elon’s last tweet with Tweepy as shown below in the get_elons_tweet() function.

    During testing, emojis and other invalid characters would break the script, so each tweet is re formatted to only contain alpha-numeric characters.

    #Get Technoking’s latest tweet
    def get_elons_tweet():
    “””Get Elon’s last tweet by user ID — retry until tweepy returns tweet”””
    tweets = tweepy.Cursor(api.user_timeline,id=”44196397", since=date.today(), tweet_mode=’extended’).items(1)
    #remove all invalid characters
    elons_last_tweet = [re.sub(‘[^A-Za-z0–9]+’, ‘ ‘, tweet.full_text) for tweet in tweets]
    #re-try until it returns a value — tweepy API fails to return the tweet sometimes
    while not elons_last_tweet:
    tweets = tweepy.Cursor(api.user_timeline,id=”44196397", since=date.today(), tweet_mode=’extended’).items(1)
    elons_last_tweet = [re.sub(‘[^A-Za-z0–9]+’, ‘ ‘, tweet.full_text) for tweet in tweets]
    return elons_last_tweet[0]

    Logic check and preparing the trading request

    Now that we have Elon’s last tweet we can start preparing the logic and the trading request in function trade(). For more information regarding the format of the trade request, have a look at the MT 5 documentation.

    what_musk_said contains the last tweet and the logic will check whether any of the keywords defined in our keywords variable above are present in Elon’s tweet. If that is true, the bitcoin trading bot will place a buy order on bitcoin with instant execution. In case it’s false it will simply return to us the tweet.

    #buy bitcoin
    def trade():
    “””Check if Musk mentioned bitcoin and open a buy position if so”””
    what_musk_said = get_elons_tweet()
    # used to check if a position has already been placed
    positions = mt5.positions_get(symbol=CRYPTO)
    orders = mt5.orders_get(symbol=CRYPTO)
    symbol_info = mt5.symbol_info(CRYPTO)
    price = mt5.symbol_info_tick(CRYPTO).bid
    # perform logic check
    if any(keyword in what_musk_said for keyword in keywords):
    print(f’the madlad said it — buying some!’)
    # prepare the trade request
    if not mt5.initialize():
    raise RuntimeError(f’MT5 initialize() failed with error code {mt5.last_error()}’)
    # check that there are no open positions or orders
    if len(positions) == 0 and len(orders) < 1:
    if symbol_info is None:
    print(f’{CRYPTO} not found, can not call order_check()’)
    mt5.shutdown()
    # if the symbol is unavailable in MarketWatch, add it
    if not symbol_info.visible:
    print(f’{CRYPTO} is not visible, trying to switch on’)
    if not mt5.symbol_select(CRYPTO, True):
    print(‘symbol_select({}}) failed, exit’, CRYPTO)
    #this represents 5% Equity. Minimum order is 0.01 BTC. Increase equity share if retcode = 10014
    lot = float(round(((equity / 5) / price), 2))
    # define stop loss and take profit
    sl = price — (price * 5) / 100
    tp = price + (price * 10) / 100
    request = {
    ‘action’: mt5.TRADE_ACTION_DEAL,
    ‘symbol’: CRYPTO,
    ‘volume’: lot,
    ‘type’: mt5.ORDER_TYPE_BUY,
    ‘price’: price,
    ‘sl’: sl,
    ‘tp’: tp,
    ‘magic’: 66,
    ‘comment’: ‘python-buy’,
    ‘type_time’: mt5.ORDER_TIME_GTC,
    ‘type_filling’: mt5.ORDER_FILLING_IOC,
    }
    # send a trading request
    result = mt5.order_send(request)
    # check the execution result
    print(f’1. order_send(): by {CRYPTO} {lot} lots at {price}’)
    if result.retcode != mt5.TRADE_RETCODE_DONE:
    print(f’2. order_send failed, retcode={result.retcode}’)
    #print the order result — anything else than retcode=10009 is an error in the trading request.
    print(f’2. order_send done, {result}’)
    print(f’ opened position with POSITION_TICKET={result.order}’)
    else:
    print(f’BUY signal detected, but {CRYPTO} has {len(positions)} active trade’)
    else:
    print(f’He did not say it, he said: {what_musk_said}’)

    Putting it all together

    We now need to decide how often we should be iterating through the code below. By default, it pull and analyse Elon’s last tweet once every 5 seconds, but this can be adjusted in the time.sleep function below.

    #execute code every 5 seconds
    if __name__ == ‘__main__’:
    print(‘Press Ctrl-C / Ctrl-Q to stop.’)
    for i in count():
    trade()
    print(f’Iteration {i}’)
    time.sleep(5)

    Additional Resources:

    It was a fun project work on and I hope that you enjoyed this article. Please follow me if you enjoyed this article. For more crypto bot projects, check out my blog for more cryptocurrency trading bots in Python

    Don’t forget to give us your 👏 !


    How to code a cryptocurrency trading bot to buy Bitcoin when Musk Tweets about it was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • How to build your own chatbot

    With a touch of Huggingface and Cloud run

    The use of chatbots has increased drastically in recent years and almost all major companies use some form of chatbot in their business, and it is not hard to understand why this is the case. Since BERT was delivered by google, the performance of NLP models has seen impressive progress. The latest state-of-the-art model GPT-3 has a breathtaking 175 billion parameters in its model, which makes interactions with the model almost indistinguishable from a human being.

    So in this article I would like to demonstrate how to build your own chatbot and have it wrapped as an API service.

    The project is divided into two parts. First we need to have a trained chat model that can make predictions, then a server that can handle requests to our model.

    There are several models available that can be used to build a chatbot. We will use blenderbot, created by facebook’s research team in 2019. The model is an open ended chatbot, which means that it is not created to handle certain given actions in the backend, which is the more common use case for businesses. Instead this model is only focused on imitating human communication.

    We will use a small implementation of the model with no additional fine tuning. However this is heavily desirable for a more sophisticated chatbot.

    We start by creating a file that we will use to download the model. To help us, we use Huggingface, a python library that provides various high quality NLP models.

    Then we create a python class that we will use to handle the logic from converting our english text to create our word tokens that we will use as inputs for our model.

    We then build a Flask API with two endpoints, one for checking if the service is working and one for integrating with our chatbot.

    Finally we generate a Dockerfile that when being built will pre-download the chat model so that when we send request to our API it can make quick responses, instead of reloading the model every single time. This will drastically improve the performance of our bot. To host the API we use gunicorn as our wsgi server with no additional web server framework.

    From our local machine to production

    The steps from running your model on your local machine to have it running in production can see daunting. However several services have done this step a lot easier in recent years.

    We are going to work with google cloud run for this project. Googles “serverless” platform, I don’t like the word serverless since of course there has to be a server running the code, but it is serverless in the sense that it doesn’t save any client data from session to another session and that we get whatever server is available at any given time.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    In order to run our code on google cloud run we have to provide it with our docker image that we will create with the build command. Make sure to execute the command in the same folder where the Dockerfile is located.

    docker build -t <docker_name> .

    Next we need to push our image to google container registry. This could be done directly in the web GUI or as we will do here, via the gcloud SDK.

    gcloud builds submit --tag gcr.io/<PROJECT-ID>/<docker_name>

    Now, we are almost ready to go. The last step is to create our cloud run service, which again could be done with either the GUI or the cloud SDK. Here we specify that we want two cpu with 4G ram in each container running our docker image.

    cloudrun_example$ gcloud run deploy chatbot 
    --image=gcr.io/$PROJECT_ID/chatbot:latest
    --platform=managed
    --concurrency=1
    --set-env-vars=MKL_NUM_THREADS=2,OMP_NUM_THREADS=2,NUMEXPR_NUM_THREADS=2
    --cpu=2
    --memory=4G
    --allow-unauthenticated

    If you set it up correctly you will receive an URL with the address to your service. Like the one below for our chatbot.

    https://chatbot-5vvmts3sdf-lz.a.run.app/

    Now, let’s try sending a CURL request to our chatbot.

    Hi, how are you?

    curl --location --request POST 'https://chatbot-5vvmts3sdf-lz.a.run.app/query' 
    -H 'Content-Type: application/json' 
    --data-raw '{"lastConversations": ["Hi, how are you?"]}'

    {“botResponse”: “i’m good. just got back from a long day at work. how are you?”}

    There we go!

    We managed to create a high performance general purpose chatbot with an associated API.

    Full code can be found here:

    Resources:

    https://huggingface.co/transformers/model_doc/blenderbot.html

    A state-of-the-art open source chatbot

    Don’t forget to give us your 👏 !


    How to build your own chatbot was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Chat bot to add all occurrences of a string.

    I am wanting to write a simple chatbot that polls a chat and adds up all occurrences of a string at the end of the day and displays how many it was.

    Example. Chat bot monitors a chat thread, check every so often for new occurrences of X and adds its to the running total. at the end of the day lets say midnight is writes a message the number of times X was mentioned that day.

    I dont really know where to start with this however I am a computer engineer and very tech savy. any insight would be great.

    submitted by /u/GrandWizardZippy
    [link] [comments]

  • Library Telegram Bot

    Here we will create a telegram bot which will send random book of given genre to user.

    We will use an open source project “draw your bot” (https://github.com/Tsitko/drawyourbot) to generate a bot. It allows to draw a bot structure in draw.io instead of coding it.

    So we need to clone drawyourbot project and install its requirements (the instructions of how to install requirements are here: https://github.com/Tsitko/drawyourbot#install-requirements).

    And we also need to register our bot in telegram (the instruction is here: https://core.telegram.org/bots#6-botfather)

    As we have a project we need a library (books sorted by genre). For this bot I will use a very small library like that:

    Project and library structure

    And we also need a function which will get one of those book so we could send it to user. Here is that function code (you should put it into bots directory to the file book_funcs.py):

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    And the only thing left is todraw a bot structure:

    bot structure in drawio

    You need to change bot_token to your bots token and if you are using your own function, you need to change _functions_book_funcs::find_book(genre) to your own function.

    And as you are done, you need just to generate a bot (instructions: https://github.com/Tsitko/drawyourbot#generating-bot-code).

    And you have a bot which you can run and test:

    Don’t forget to give us your 👏 !


    Library Telegram Bot was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.