riversun / chatux Goto Github PK
View Code? Open in Web Editor NEWChat Bot UI / Conversational UI library for Java Script
License: MIT License
Chat Bot UI / Conversational UI library for Java Script
License: MIT License
Sanitize the text entered by the user and display it below the DOM elements that make up the chat screen.
In the code, managed by the following flags
// Flag indicating whether or not userInputText should be sanitized
// when displayed on the chat screen (append as DOM element).
export const SANITIZE_USER_INPUT_FOR_DISPLAY = true;
jquery is too big to use for ajax request
change it to something
For example, the text box is shown before showing the image
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.
Is it possible change img.agent ? http://decodemoji.com/img/logos/blue_moji_hat.svg
in window: {} session.
Thanks.
In the case of mobile, it is processed in the following order
this.buildChatArea ();
this.buildChatButton ();
this.onChatFrameCreate ();
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.
To set http headers from top class (ChatUX) when calling chat-server.
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.
To start the server by "npm start:chat-server" on local
"start:chat-server": "node example_chat_server/server.js",
ますは、素晴らしいライブラリを制作いただきありがとうございます。
こちらで説明頂いているエコーチャットとそのチャットサーバーを元に、
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.
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;
If you access this page with the query endpoint as follows,
you can specify the chat API server to connect to.
http://localhost:8080/index.html?endpoint=http://localhost:8081/chat
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
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
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.
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);
https://riversun.github.io/chatux/chatux.min.js
still chatux v1.0.11 It will be nice if you deploy new version chatux v1.1.0
Thanks.
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.
but any after the second does not work.
msg.push({
type: 'text',
value: message,
});
msg.push({
type: 'youtube',
value: 'VIyE2K33w-w',
});
seems iframe strings might be mis-encoded or not decoded corrrectly. (I might be wrong, sorry...)
Anyway, chatux is so awesome! Thanks!
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,
Add delay option if it possible.
botui.message.bot({ delay: 5000, loading: true }).
Operate only in PC mode.
Because there is no way to get it back once it's in mobile mode.
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 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.