I was inspired to create this project due to my ever growing interest in AI. It can be a little intimidating and out of my comfort zone a times. However, it those things outside of our comfort zones which allow us to grow and create. I was originally going to purely implement it with static network returns similar to a RESTFUL API. However, I wanted to start a simple ai chat foundation and venture outside of the comfort zone.
What it does
This project provides a simple UI interface for the user to enter chat into like a chat room. The application then attempts to parse the users input through Wit.ai for understanding. The result of Wit.ai's processing is the returned thourgh the network. The result is parsed through minimal case conditions. The conditions then call additional API's depending on the intent found or use a default error case to let the user know that a problem happened.
How I built it
I built the project use ReactJS and decided to forego utilizing a nodejs backend as I had previosly intended due to time constraints.
I created the Wit.ai application. Built several intents. Provided numerous cases of sample data to train and verify the application, and implemented additional libraries depending on the parsed intent from Wit.ai.
From there network calls to outside API's allowed of a more unique dynamic experience when interacting with the bot.
Challenges I ran into
A few challenge I ran into included:
UI responsiveness for the chat window and chat components.
Mapping components and conditional rendering
The biggest issue I ran into was updating the message array state with the users messages and the bots messages and replies.
Accomplishments that I'm proud of
I am proud of the fact that I created a bot based of new technology ( Wit.ai) that I never used previously. As well as the bot baseline ability to process user text and give the needed data to access the corresponding API call.
What I learned
I learned countless things. I learned the basics of Wit.ai, or enough to create a basic bot. I learned how to integratte AI technology into a ReactJS application. I improved my ReactJS skills throughout the project, state management, components, API calls, asynchronous calls, and so much more
What's next for ReactWitAI
I am going to continue creating and training more intents and try to implement the traits feature. I also will access and utilize more API's for a more robust experience. Additionally, default greeting and basic conversation need to be implemented for a better user experience. Lastly, I will more the Wit.ai client to a nodejs backend to protect the credentials and increase security overall