المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
38 lines
1.3 KiB
Dart
Executable File
38 lines
1.3 KiB
Dart
Executable File
import 'dart:convert';
|
|
|
|
import 'package:intaleq_driver/constant/links.dart';
|
|
import 'package:intaleq_driver/controller/functions/crud.dart';
|
|
import 'package:intaleq_driver/controller/functions/gemeni.dart';
|
|
|
|
class LlamaAi {
|
|
Future<Map> getCarRegistrationData(String input, prompt) async {
|
|
Map exrtatDataFinal = {};
|
|
String oneLine = input.replaceAll('\n', ' ');
|
|
// var res = await CRUD().getLlama(link: AppLink.gemini, payload: oneLine);
|
|
var res = await CRUD()
|
|
.getLlama(link: AppLink.llama, payload: oneLine, prompt: prompt);
|
|
|
|
var decod = jsonDecode(res.toString());
|
|
// exrtatDataFinal = jsonDecode(extractDataFromJsonString(decod['choices']));
|
|
extractDataFromJsonString(decod['choices'][0]['message']['content']);
|
|
return exrtatDataFinal;
|
|
}
|
|
|
|
String extractDataFromJsonString(String jsonString) {
|
|
// Remove any leading or trailing whitespace from the string
|
|
jsonString = jsonString.trim();
|
|
|
|
// Extract the JSON substring from the given string
|
|
final startIndex = jsonString.indexOf('{');
|
|
final endIndex = jsonString.lastIndexOf('}');
|
|
final jsonSubstring = jsonString.substring(startIndex, endIndex + 1);
|
|
|
|
// Parse the JSON substring into a Map
|
|
final jsonData = jsonDecode(jsonSubstring);
|
|
|
|
// Return the extracted data
|
|
|
|
return jsonEncode(jsonData);
|
|
}
|
|
}
|