|
|
@ -303,7 +303,8 @@ class BleManager extends GetxService { |
|
|
caseCharging: caseCharging, |
|
|
caseCharging: caseCharging, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
Logger.info('设备电池信息已更新: 电量=$overallBattery%, 左耳=$leftBattery%, 右耳=$rightBattery%, 充电仓=$caseBattery%'); |
|
|
Logger.info( |
|
|
|
|
|
'设备电池信息已更新: 电量=$overallBattery%, 左耳=$leftBattery%, 右耳=$rightBattery%, 充电仓=$caseBattery%'); |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
Logger.error('更新电池信息失败: ${e.toString()}'); |
|
|
Logger.error('更新电池信息失败: ${e.toString()}'); |
|
|
} |
|
|
} |
|
|
@ -482,7 +483,9 @@ class BleManager extends GetxService { |
|
|
final openaiBaseUrl = |
|
|
final openaiBaseUrl = |
|
|
AppConfig.env('OPENAI_BASE_URL') ?? 'https://api.openai.com/v1'; |
|
|
AppConfig.env('OPENAI_BASE_URL') ?? 'https://api.openai.com/v1'; |
|
|
final openaiModel = AppConfig.env('OPENAI_MODEL') ?? 'gpt-3.5-turbo'; |
|
|
final openaiModel = AppConfig.env('OPENAI_MODEL') ?? 'gpt-3.5-turbo'; |
|
|
final systemPrompt = AppConfig.agentsystemPrompt("personal_assistant"); |
|
|
final openaiagentid = |
|
|
|
|
|
AppConfig.env('OPENAI_AGENT_ID') ?? 'personal_assistant'; |
|
|
|
|
|
final systemPrompt = AppConfig.agentsystemPrompt(openaiagentid); |
|
|
|
|
|
|
|
|
// 从Flutter资源包中加载.mcp.json |
|
|
// 从Flutter资源包中加载.mcp.json |
|
|
final jsonData = AppConfig.mcpConfig(); |
|
|
final jsonData = AppConfig.mcpConfig(); |
|
|
@ -663,4 +666,4 @@ class BleManager extends GetxService { |
|
|
} |
|
|
} |
|
|
return Future.value(Get.find<BleManager>()); |
|
|
return Future.value(Get.find<BleManager>()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|