Giter Site home page Giter Site logo

implementation-examples's Introduction

Implementation Examples

This repository features various implementations build on top Chatwoot to support various use cases.

How to contribute

You can showcase/contribute your implementation to this repo by raising a PR with the following changes.

  1. Create a new directory for your implementation. example rasa-agent-bot-demo
  2. Add a readme.md file inside the directory with details about the implementation, how to run it etc.
  3. Add code samples and other required assets for this implementation.

implementation-examples's People

Contributors

douglara avatar gugupy avatar sojan-official avatar

Stargazers

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

Watchers

 avatar  avatar

implementation-examples's Issues

Python endpoint need to be corrected

As per the documentation the router endpoint is http://localhost:8000 however python server is only listening on http://localhost:8000/rasa. Either the endpoint or the documentation needs to be fixed and also reconciled with the PHP server.

rasa test widget page does not exists

Im running the rasa implementation-example locally. The http://localhost:3000/test_widgets page gives the following error

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

Which logs will give information about this error? I assumed this test screen would work in local environment

Rasa multiple responses not working with live chat

It's only returning a single-line response. I made a change in the code to return multiple lines but without buttons

Original Code - rasa_flask_router.py:

def send_to_bot(sender, message):
    data = {
        'sender': sender,
        'message': message
    }
    headers = {"Content-Type": "application/json",
               "Accept": "application/json"}

    r = requests.post(f'{rasa_url}/webhooks/rest/webhook',
                      json=data, headers=headers)
    return r.json()[0]['text']

My Code:

def send_to_bot(sender, message):
    data = {
        'sender': sender,
        'message': message
    }
    headers = {"Content-Type": "application/json",
               "Accept": "application/json"}

    r = requests.post(f'{rasa_url}/webhooks/rest/webhook',
                      json=data, headers=headers)
    print(r.text)
    resposta = json.loads(r.text)
    #print(resposta)
    resposta_final = ''
    for x in resposta:
        for y in x.keys():
            if y != 'text':
                continue
            resposta_final += (x['text']) + '\n'
    print(resposta_final)
    return resposta_final

Start command incorrect

Running through rasa docs:

root@rasa:~/rasa-agent-bot-demo# python3 -m gunicorn --workers=1 test:app -b 0.0.0.0
[2022-05-31 19:26:51 +0000] [5041] [INFO] Starting gunicorn 20.1.0
[2022-05-31 19:26:51 +0000] [5041] [INFO] Listening at: http://0.0.0.0:8000 (5041)
[2022-05-31 19:26:51 +0000] [5041] [INFO] Using worker: sync
[2022-05-31 19:26:51 +0000] [5043] [INFO] Booting worker with pid: 5043
Failed to find attribute 'app' in 'test'.
[2022-05-31 19:26:51 +0000] [5043] [INFO] Worker exiting (pid: 5043)
[2022-05-31 19:26:51 +0000] [5041] [INFO] Shutting down: Master
[2022-05-31 19:26:51 +0000] [5041] [INFO] Reason: App failed to load.

Could the docs please be updated?

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.