0 purchases
chat bot llm
chat_bot_llm #
Add your own AI ChatBot to your Flutter app. You just need to create an assistant in platform.openai.com and add the assistant id to the code.
Features #
View the threads
Send a message to the assistant and get a response
Supports Speech to text
Every message you receive will be read out loud
Platform Support #
Android
iOS
MacOS
Web
Linux
Windows
✔️
✔️
Getting started #
Add the following to your pubspec.yaml file:
dependencies:
chat_bot_llm: ^0.0.7
copied to clipboard
Import the package:
import 'package:chat_bot_llm/chat_bot_llm.dart';
copied to clipboard
In your main.dart file, add the following code:
void main() async {
await ChatBotLlm.initialize(
"com.chatbotllm.example",
appName,
ASSISTANT_ID,
ASSISTANT_NAME,
);
runApp(MyApp());
}
copied to clipboard
Android: Add the following to your AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.VIBRATE"/>
copied to clipboard
iOS: Add the following to your Info.plist file:
<key>NSSpeechRecognitionUsageDescription</key>
<string>The App needs this permission to support Speech-to-text</string>
<key>NSMicrophoneUsageDescription</key>
<string>The App needs this permission to support Speech-to-text</string>
copied to clipboard
Usage #
Initialize the package:
await ChatBotLlm.initialize(
"com.chatbotllm.example",
"Chatbot LLM Example",
ASSISTANT_ID,
ASSISTANT_NAME,
);
copied to clipboard
Start a Conversation:
String userId = Uuid().v4();
await ChatBotLlm.openConversationScreen(context, userId);
copied to clipboard
Additional information #
Currently, the package is only tested on Android and iOS. If you want to use it on other platforms, please create an issue or contribute by creating a Pull request.
Currently, the Plugin only runs on the app with GetX pattern. We will add support for other patterns soon.
Use our example to get an idea of how to use the package. If you have any questions, please create an issue.
You will need to create an assistant on platform.openai.com and add the assistant id to the code.
You can also click on the "Thumb up" button of the top of the pub.dev page if you find this Package helpfull. #
Team CREO IT #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.