promediacorp / react-lex Goto Github PK
View Code? Open in Web Editor NEWReactJS AWS Lex Chat Component
ReactJS AWS Lex Chat Component
Right now the chatbot window just loads a blank chat screen waiting for user input. It would be cool to allow a phrase that I can pass as prop to the component as an initial greeting message to the user.
I'm building a react app to which I imported bootstrap v4.5 into my application. I noticed once I apply bootstrap styling, react-lex's header text is shifted down to the bottom of the header. How can I address this issue?
Please add the option to customize the header in additional to "style" attribute.
I'm using this library to test my bot.
When I type something it gives me the following error:
I'm sure that I'm using the correct name of my bot.
NotFoundException: The specified resource 'BookTrip' does not exist. Choose another resource.
This is my code:
import React, { useEffect } from 'react';
import LexChat from 'react-lex';
import AWS from 'aws-sdk';
const ChatbotComponent = () => {
useEffect(() => {
AWS.config.update({
region: "us-west-2",
credentials: new AWS.CognitoIdentityCredentials({
IdentityPoolId: "<MY POOL ID HERE>"
})
});
}, []);
return (
<div>
<LexChat
botName="BookTrip"
IdentityPoolId="<MY POOL ID HERE>"
placeholder="Type something"
style={{position: 'absolute'}}
backgroundColor="#FFFFFF"
height={430}
region="us-west-2"
headerText="Chat with our bot" />
</div>
)
}
export default ChatbotComponent
It would be nice if there where a posibility to change the region of lex (since lex launched in ireland recently)
read out region from config file to connect to
region us-east-1 is hard coded
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.