Update: 2026-05-07 11:52:29
This commit is contained in:
@@ -54,7 +54,7 @@ $systemPrompt = <<<PROMPT
|
||||
PROMPT;
|
||||
|
||||
$payload = [
|
||||
'model' => 'grok-beta', // Update to current xAI model name
|
||||
'model' => 'grok-2-1212', // Updated to current xAI model name
|
||||
'messages' => [
|
||||
['role' => 'system', 'content' => $systemPrompt],
|
||||
['role' => 'user', 'content' => $text]
|
||||
|
||||
@@ -87,7 +87,7 @@ class DashboardController extends GetxController {
|
||||
Container(
|
||||
width: 40,
|
||||
height: 4,
|
||||
margin: const EdgeInsets.bottom(20),
|
||||
margin: const EdgeInsets.only(bottom: 20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(2)),
|
||||
@@ -171,10 +171,18 @@ class DashboardController extends GetxController {
|
||||
AppSnackbar.showError(
|
||||
'خطأ', response.data['message'] ?? 'فشل تحليل الطلب');
|
||||
}
|
||||
} on DioException catch (e) {
|
||||
AppLogger.error('Voice Assistant Error', e);
|
||||
String errorMsg = 'حدث خطأ أثناء التواصل مع خادم الذكاء الاصطناعي';
|
||||
if (e.response != null && e.response?.data != null) {
|
||||
if (e.response?.data is Map && e.response?.data['message'] != null) {
|
||||
errorMsg = e.response?.data['message'];
|
||||
}
|
||||
}
|
||||
AppSnackbar.showError('خطأ', errorMsg);
|
||||
} catch (e) {
|
||||
AppLogger.error('Voice Assistant Error', e);
|
||||
AppSnackbar.showError(
|
||||
'خطأ', 'حدث خطأ أثناء التواصل مع خادم الذكاء الاصطناعي');
|
||||
AppSnackbar.showError('خطأ', 'حدث خطأ غير متوقع');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1136,62 +1136,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
record:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: record
|
||||
sha256: "2e3d56d196abcd69f1046339b75e5f3855b2406fc087e5991f6703f188aa03a6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.1"
|
||||
record_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_android
|
||||
sha256: "94783f08403aed33ffb68797bf0715b0812eb852f3c7985644c945faea462ba1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
record_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_darwin
|
||||
sha256: e487eccb19d82a9a39cd0126945cfc47b9986e0df211734e2788c95e3f63c82c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
record_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_linux
|
||||
sha256: "74d41a9ebb1eb498a38e9a813dd524e8f0b4fdd627270bda9756f437b110a3e3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.2"
|
||||
record_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_platform_interface
|
||||
sha256: "8a81dbc4e14e1272a285bbfef6c9136d070a47d9b0d1f40aa6193516253ee2f6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
record_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_web
|
||||
sha256: "7e9846981c1f2d111d86f0ae3309071f5bba8b624d1c977316706f08fc31d16d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
record_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_windows
|
||||
sha256: "223258060a1d25c62bae18282c16783f28581ec19401d17e56b5205b9f039d78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.7"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -41,7 +41,6 @@ dependencies:
|
||||
printing: ^5.12.0
|
||||
|
||||
# ─── Voice & Audio ──────────────────────────────────
|
||||
record: ^5.1.0
|
||||
speech_to_text: ^7.3.0
|
||||
permission_handler: ^11.3.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user