You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
933 B
31 lines
933 B
import 'package:get/get.dart';
|
|
import '../controllers/chat_controller.dart';
|
|
import '../../../data/services/azure_asr_service.dart';
|
|
import '../../../data/services/azure_tts_service.dart';
|
|
import '../../../data/services/volcano_ai_service.dart';
|
|
import '../../../data/services/chat_history_service.dart';
|
|
|
|
class ChatBinding extends Bindings {
|
|
@override
|
|
void dependencies() {
|
|
// 注册服务
|
|
if (!Get.isRegistered<AzureAsrService>()) {
|
|
Get.put(AzureAsrService(), permanent: true);
|
|
}
|
|
|
|
if (!Get.isRegistered<AzureTtsService>()) {
|
|
Get.put(AzureTtsService(), permanent: true);
|
|
}
|
|
|
|
if (!Get.isRegistered<VolcanoAIService>()) {
|
|
Get.put(VolcanoAIService(), permanent: true);
|
|
}
|
|
|
|
if (!Get.isRegistered<ChatHistoryService>()) {
|
|
Get.put(ChatHistoryService(), permanent: true);
|
|
}
|
|
|
|
// 注册控制器
|
|
Get.lazyPut<ChatController>(() => ChatController());
|
|
}
|
|
}
|