The apps use Generative AI and Large Language Models (LLM) specifically PaLM2 APIs.
- ChatBard: An Intelligent Customer Service Center App
- Thanks Google Cloud Tech for Highlight this Work
-
-
Thrilled that Google Cloud Tech highlighted my work on ChatBard! Soon after PaLM2's release, they recognized my project as a standout example and even tweeted about it from their official account. I'm grateful for their support and excited to continue exploring.
Read the tweet of Google Cloud Tech
ChatBard is an intelligent customer service center app powered by Generative AI and large language models (LLM) using PaLM2 APIs. 🤖💬
This demo of Flutter app is designed to inspire you and showcase how ChatBard can revolutionize customer support. It provides a chat interface where users can interact with a chatbot to ask questions and get answers. The app utilizes generative AI and large language models (LLMs), specifically PaLM2 APIs, to understand and respond intelligently to user messages. The demo app analyzes the context and examples provided to respond accurately, making it an invaluable tool for any customer service center.
ChatBard can be easily customized to align with the nature of your business. By modifying the context and examples, you can tailor the chatbot's responses to your specific business requirements and customer interactions.
Screenshots of the app showcase its functionality, including capturing conversations with clients and providing summarized records stored in Firebase. It offers both English and Arabic language support. Note that this is a developed feature in this app by creating a custom REST API for translation. PaLM2 and Bard are still under development and do not yet support the Arabic language.
The ChatBard responds to customer queries based on the information it has been fed with in terms of context and examples. Then it summarizes the conversation and stores the summary in the database in Firebase.
Key features of ChatBard include:
- 📱 User-friendly chat interface for seamless communication.
- 🧠 Intelligent responses powered by PaLM2 model.
- 🔧 Easily customizable to align with the nature of your business by modifying the context and examples.
- 🌍 Multi-language support (English and Arabic).
- 📚 Chat history tracking and display in real-time.
- 💾 Summarization and saving of conversations to Firebase database for future reference.
Here are some screenshots of the app:
A conversation with the client, and after the conversation ends, it is summarized and stored in Firebase.
Arabic Bard in a conversation with the client, and after the conversation ends, it is summarized and stored in Firebase.
On Android mobile: A conversation with the client, and after the conversation ends, it is summarized and stored in Firebase.
On Android mobile: Arabic Bard in a conversation with the client, and after the conversation ends, it is summarized and stored in Firebase.
Note: It is a developed feature in this app by creating a custom REST API for translation. PaLM2 and Bard are still under development and do not yet support the Arabic language.
Before running the app, make sure you have the following:
- Flutter SDK installed on your machine.
- A valid Firebase project with Firestore enabled.
- API credentials for the PaLM APIs of chat and text summarization used in the code.
Follow these steps to get started with the app:
- Clone the repository to your local machine.
- Open the project in your preferred IDE or editor.
- Replace the placeholder API credentials in the code with your actual credentials.
- Update the Firebase configuration in the code to match your project.
- Run
flutter pub get
in the project directory to install dependencies. - Connect a device or start an emulator. Skip this step if you prefer to use a web browser for displaying the app.
- Run the app using
flutter run lib/main.dart
.
To customize the app according to the nature of your business, you can modify the following variables in the examples.dart
file:
-
context
: This variable represents the context and scope of your business. Update it with a brief description that reflects the purpose and domain of your customer service center. -
examples
: This variable contains example conversations that include important information relevant to your business. These examples help learn the chatbot model to understand and respond accurately to user queries.
By updating the context
and examples
variables with relevant information, you can tailor the chatbot's responses to align with your business's specific requirements and customer interactions.
Feel free to modify other parts of the code or user interface to meet your needs.
- Launch the app on a device or emulator.
- Enter your message in the text input at the bottom of the screen and press enter.
- The app will send your message to the chatbot API and display the response in the chat interface.
- Continue the conversation by entering more messages.
- To summarize and save the chat session, click on the "Summarize and Save" floating action button.
Here are some screenshots of the app:
A simple UI for the conversation with the clients
If the Summarize button clicked, the summary will appear on the bottom
This is a step-by-step guide to deploying a Python-based REST API on Cloud Run. The guide follows the instructions provided in the official Cloud Run documentation here.
To interact with the deployed API endpoints, their information below.
This endpoint allows you to have a conversation with the English Chat Bard model.
- URL:
<Your URL>/chat
- Method: POST
{
"message": "User's message in English"
}
{
"response": "Response from the English Chat Bard model"
}
This endpoint generates a summary of a conversation between a customer and the English Chat Bard model.
- URL:
<Your URL>/summary
- Method: POST
{
"content": "Conversation content in English"
}
{
"response": "Summary of the conversation in English"
}
This section includes endpoints related to the Arabic Chat Bard model.
This endpoint allows you to have a conversation with the Arabic Chat Bard model.
- URL:
<Your URL>/chat_ar
- Method: POST
{
"message": "User's message in Arabic"
}
{
"response": "Response from the Arabic Chat Bard "
}
This endpoint generates a summary of a conversation between a customer and the Arabic Chat Bard.
- URL:
<Your URL>/summary_ar
- Method: POST
{
"content": "Conversation content in Arabic"
}
{
"response": "Summary of the conversation in Arabic"
}
This endpoint translates English text to Arabic.
- URL:
<Your URL>/en2ar
- Method: POST
{
"response": "English text to be translated"
}
{
"response": "Translated Arabic text"
}
This endpoint translates Arabic text to English.
- URL:
<Your URL>/ar2en
- Method: POST
{
"response": "Arabic text to be translated"
}
{
"response": "Translated English text"
}
Google Colab is a powerful online platform and easy to use. It provides a simple and convenient way to demonstrate code, create tutorials, and review demos. Take a look
A simple Demo via Gradio in Colab
Workshop Title | Slides | Examples |
---|---|---|
Hands-on with the PaLM2 API to create smart apps | Slides |
Contributions to the app are welcome! If you find any issues or want to add new features, feel free to open a pull request.
The app is released under the MIT License.