Code Monkey home page Code Monkey logo

chatux's Introduction

chatux's People

Contributors

dependabot[bot] avatar riversun 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  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

chatux's Issues

Customize Style

Hi Team,

Firstly i would like to appreciate your efforts in creating this awesome chat ui.

Is there any way to customize the ui through css. I tried getting the css selectors and modified the element appearance in custom.css file. But it doesn't worked.

Could you please help me on this.

Does not work on IE

Dear riversun,

At first, I want to let you know how I feel good with your project.

It really good and useful chatbot UI for the website.

But when I access your example site on Internet Explorer11, https://riversun.github.io/chatux/ , it does not show the chatbot window and button.

If work on IE it will be more powerful and useful chat UI.

Could you consider it to work on IE please?

Thanks regards,
Taigeun.

Specify http headers from ChatUX class

To set http headers from top class (ChatUX) when calling chat-server.

  • Set headers with ChatUX#init(opts)
  • Format
    opt.api:{
    headers:{'key1':'value1','key2':'value2'}
    }

Specify query params from ChatUX class

To set http query parameters from top class (ChatUX) when calling chat-server.

Set headers with ChatUX#init(opts)

opt.api:{
params:{'key1':'value1','key2':'value2'}
}

or

intercept request client when calling server

opt.methods: {
//set query params with httpClient.params[paramName]

            onPrepareRequest: (httpClient) => {
                httpClient.params.mykey1 = 'valOfmykey1';//set original query param
            },
//delete query params like as follows if you want to send param once.
            onFinishRequest: (httpClient) => {
                delete httpClient.params.mykey1;
            },
}

This can be used when using GET and POST method. JSONP is not supported.

reCAPTCHA v3 をChatUXに設置する方法はありますか?

ますは、素晴らしいライブラリを制作いただきありがとうございます。

こちらで説明頂いているエコーチャットとそのチャットサーバーを元に、
https://qiita.com/riversun/items/279c1dd5ab40a1c8c8cf
reCAPTCHA v3が設置できないかと模索しておりました。

コードの改修はchatGPT4に頼りきりでしたが、現時点動作できるものが作れませんでした。
すみませんが、reCAPTCHA v3 をChatUXに設置できる計画をお願いしたく。

「エコーボット」に「reCAPTCHA v3」対応試みていたが、、.zip

「エコーボット」に「reCAPTCHA v3」対応試みていたが、、
    │  ChatGPT4からの回答.pdf
    │  フロントエンドで生成されたreCAPTCHAトークンがGETメソッドで送信されるとき足りない?.png
    │  簡単にテストしていたことの経緯.txt
    │
    ├─バックエンド
    │      server.php
    │
    └─フロントエンド
            echo_bot_test.html

EncodeURIComponent for user-entered values to avoid mixing "&" in query string and "&" in user-entered value when sending user-entered text via GET.

EncodeURIComponent for user-entered values to avoid mixing "&" in query string and "&" in user-entered value when sending user-entered text via GET.

In the code, managed by the following flags

// Flag indicating whether or not EncodeURIComponent should be performed
// for userInputText in order to avoid mixing "&" in the query string
// with "&" in userInputText when sending values via GET
export const SANITIZE_USER_INPUT_FOR_SENDING_VIA_HTTP_METHOD = true;

html Module not showing Link

I am sending JSON data as attached
{ "output": [ { "delayMs": 500, "type": "html", "value": "<a href=\"<LINK>\" target=\"_blank\" >CLICK HERE</a>" } ] }
But the Link is not being formed on the UI
temp

Even if I am using the example JSON as in README
{ "output": [ { "delayMs": 500, "type": "html", "value": "Click <a href=\"https://github.com/riversun\" target=\"_blank\" >here</a> to open a page." } ] }

I am still not getting the clickable Link
temp1

Kindly help me regarding this

Add an option to allow the user to set whether or not the text entered by the user will be escaped and sent to the server

Add an option to allow the user to set whether or not the text entered by the user will be escaped and sent to the server.

Use escapeUserInput: true to escape HTML tags in user input text when submitting to the

Code Example

  const chatux = new ChatUx();

  const opt = {
   ...
    api: {
      endpoint: endpoint,
      method: 'GET',
      dataType: 'jsonp',
      errorResponse: {
        output: [
          {type: 'text', value: 'Sorry, an error occurred'}
        ]
      },
      escapeUserInput: true,// true:Escaping HTML tags in user input text when submitting to the server. default is false.
    },
   ...
  };

  //initialize
  chatux.init(opt);

In multiple response, type "youtube" works only in the first response

When use type "youtube" response in multiple response like this,

    msg.push({
      type: 'youtube',
      value: 'VIyE2K33w-w',
    });
    msg.push({
      type: 'text',
      value: message,
    });

it works if it is in the first response.

s 42

but any after the second does not work.

    msg.push({
      type: 'text',
      value: message,
    });
    msg.push({
      type: 'youtube',
      value: 'VIyE2K33w-w',
    });

s 41

seems iframe strings might be mis-encoded or not decoded corrrectly. (I might be wrong, sorry...)

s 43

Anyway, chatux is so awesome! Thanks!

Does it run with 'wakeupText' ?

Very good framework to build a chat-bot ! Thank you.

Anyway,
I set a 'wakeupText' on the client side init parameters, but it can't work with 'userInputText' as wakeupText on the server side function which I build with arrange your example. It was just your example code which add a 'wakeupText'.
I'm happy if it works as a key to start chat-bot talk.

Regards,

Multiple Response

Hi ,

Here is the scenario Web Plugin will send " Hi " to the webhook server then webhook will send it to the chat bot engine , chat bot engine will respond with two different messages.

Webhook will reply to the Web Plugin with the first respone only , how can I solve this issue ?

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.