Code Monkey home page Code Monkey logo

personal_website_bot's Introduction

personal_website_bot

A simple bot to answer questions on my personal website. (In development)

Frontend deployment options

Discussed & prioritized on stream March 19, 2021.

Rasa X + Digital ocean deploy

  • create a droplet (tutorial vid: https://www.youtube.com/watch?v=E9-s_49pw_8&ab_channel=Rasa)
  • install Rasa X
  • while installing, add notice that convos will be seen publically during CDD on the livestream
  • create rasa x instance
  • add our assistant to our server via github integration
  • quick test
  • create an image of our action server & add to dockerhub (using manual install)
  • add action server to our rasa x instance
  • added database to our action server image
  • update action server image w/ new version of database
  • TODO:
    • NLU insights
    • share bot & get user data & do CDD

possibilities for first deployment

  • 1st: Rasa X (server, digital ocean?): share using chatbot sharing feature for early CDD & link where appropraite
    • pro: good proof of concpet, can use for inital softlaunch/early CDD, link from my website, need to set up Rasa X anyway for CDD/annotation/model management
    • con: kicks the can on the front end integration problem, already done it on livestream (double dipping :P)
  • 2nd: twitter - pref. is for convos in the dms, which is definintely possible
    • pro: a reasonable place to put the assistant, meeting people who ask ?s where they are, needing an account might help prevent abuse
    • con: people need to have a Twitter account (but can add other channels that don't need an account later), need to handle twitter API & TOS; not sure how bots are handleded by that
  • 3rd: Website: host on a new, v. simple webpage
    • pro: good proof of concpet, can use for inital softlaunch/early CDD, link from my website, show integration with front end in simple html
    • con: kicks the can on the front end integration problem, why build myself when Rasa X will already do this?
  • 4th: Website: Add jekyll plugin (?) to my existing website
    • pro: can use w/ existing website, lots of people want to do something similar (but not necessarily w/ jekyll), if i can find a plugin i don't have to do any front end work myself (besides maybe adjusting color)
    • con: haven't found a suitable plug in yet, may spend a lot of time searching only the find there's nothing that I can use

not happening

  • Website: Add webchat as raw html to my current website (no idea where that would go??)
    • don't know jekyll well enough & don't really want to spend a bunch of time learning
  • Website: rebuild website from scratch in a framework I know better (blogdown?) so I add a chat window
    • not an efficent use of time
  • Website: shiny somehow + rserver??? will take a lot of custom work but could be useful to other people as well
    • would take a lot of futzing, maybe in the future, haven't found anything similar
  • discord - would have to make one... can provide a widget w/ htm/json widget?
    • don't have an existing discord, widget integration is the same as the first website option above
  • slack - contributor slack?
    • rasa contribs probably don't need answers to the questions my assistant can answer

backlog

  • TODONE: how to add image to docker-compose (rather than helm)
    • /etc/rasa add image path (on dockerhub) to docker-compose or docker-compose.override.yaml
    • to check running dockers = docker ps
    • to check logs = docker logs [continer id, get from ps list]
  • TODO: figure out where your sqlite database is
    • to do: host database in different image?
    • from chat (ty!): app needs DNS translation (add translation in etc/hosts as localhost). copy sentence in dockerfile when you build the image has to moe the db file inside the image
    • from chat: digital ocena managed database?
  • TODO: add error message if database file not found
  • TODO: update rasa in docker compose
  • TODO: write doc strings for our Python functions
  • TODO: add chitchat to handle polite turns (thank you, goodbye, etc.)
  • TODO: a way to handle when the bot has no response

personal_website_bot's People

Contributors

rctatman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

personal_website_bot's Issues

Error while trying to query - using GCP platform

I am trying this in Jupyter notebook on GCP. In endpoints.yml , this is the action_endpoint I defined:

action_endpoint:
#url: http://app:5055/webhook
url: "http://0.0.0.0:5005"

I am getting below error,

Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input -> i want to learn ml
What type of resouce do you want? Book, course or video?
Your input -> Book
2022-02-01 09:48:17 ERROR rasa.core.actions.action - Failed to run custom action 'query_resource'. Couldn't connect to the server at 'http://action_server:5055/webhook'. Is the server running? Error: Cannot connect to host action_server:5055 ssl:default [Name or service not known]
2022-02-01 09:48:17 ERROR rasa.core.processor - Encountered an exception while running action 'query_resource'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):

File "/opt/conda/lib/python3.7/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
File "/opt/conda/lib/python3.7/site-packages/aiohttp/connector.py", line 865, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
File "/opt/conda/lib/python3.7/site-packages/aiohttp/resolver.py", line 36, in resolve
flags=socket.AI_ADDRCONFIG,
File "uvloop/loop.pyx", line 1469, in getaddrinfo
socket.gaierror: [Errno -2] Name or service not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/rasa/core/actions/action.py", line 723, in run
json=json_body, method="post", timeout=DEFAULT_REQUEST_TIMEOUT
File "/opt/conda/lib/python3.7/site-packages/rasa/utils/endpoints.py", line 170, in request
**kwargs,
File "/opt/conda/lib/python3.7/site-packages/aiohttp/client.py", line 1117, in aenter
self._resp = await self._coro
File "/opt/conda/lib/python3.7/site-packages/aiohttp/client.py", line 521, in _request
req, traces=traces, timeout=real_timeout
File "/opt/conda/lib/python3.7/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/conda/lib/python3.7/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/conda/lib/python3.7/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host action_server:5055 ssl:default [Name or service not known]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/rasa/core/processor.py", line 869, in _run_action
output_channel, nlg, temporary_tracker, self.domain
File "/opt/conda/lib/python3.7/site-packages/rasa/core/actions/action.py", line 754, in run
raise RasaException("Failed to execute custom action.")
rasa.shared.exceptions.RasaException: Failed to execute custom action.
Your input -> /stop

please make link from github to the web site

I'm watching you on youtube in one window, and browsing this repo in another. I'd obviously like to meet this bot in a 3rd window... but there is no link in the README or top right of the GitHub page...

(I'm assuming it's up and running on your web site)

can we change the spelling

If the user types salx in places of sales -> I want to correct the spelling before it identifies the entities.

I tried to change the config.py file added a custom module and added a message.text = "something" but it's not changing
Do you have any idea ??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.