Update: 2026-07-05 00:21:29
This commit is contained in:
@@ -266,8 +266,12 @@ class SiroGeminiService {
|
||||
2. تلخيص أهم هذه النقاشات في تقرير قصير ومفيد (News Report).
|
||||
3. تجاهل المنشورات العشوائية أو الشخصية التي لا تفيد السوق.
|
||||
|
||||
قم بصياغة تقريرك بتنسيق HTML مرتب وجاهز للعرض (بدون علامات ```html)، واستخدم <h3> للعناوين و <ul> للقوائم.
|
||||
إذا لم يكن هناك أي شيء مفيد، اكتب فقط: <p>لا توجد بيانات مفيدة في هذه الدفعة.</p>
|
||||
هام جداً:
|
||||
- يجب أن يكون التقرير باللغة العربية بالكامل.
|
||||
- يجب أن تغلف التقرير بالكامل بوسم <div dir=\"rtl\" align=\"right\"> في البداية و </div> في النهاية لضمان القراءة من اليمين لليسار.
|
||||
- استخدم <h3> للعناوين و <ul> للقوائم داخل التقرير.
|
||||
- لا تقم بتضمين علامات ```html في المخرجات.
|
||||
إذا لم يكن هناك أي شيء مفيد، اكتب فقط: <div dir=\"rtl\" align=\"right\"><p>لا توجد بيانات مفيدة في هذه الدفعة.</p></div>
|
||||
";
|
||||
|
||||
$url = $this->baseUrl . "{$model}:generateContent?key={$this->apiKey}";
|
||||
|
||||
@@ -41,7 +41,17 @@ try {
|
||||
$gemini = new SiroGeminiService();
|
||||
|
||||
// Create a new method in GeminiService or use evaluatePostsForReporting with a specific prompt wrapper
|
||||
$prompt = "You are a Chief Marketing Officer AI. Below are all the daily/individual social media intelligence reports collected over the last 7 days from our scraper bots. Please read through all of them and generate one comprehensive, executive 'Weekly Market Intelligence Summary'. Format it beautifully in HTML. Highlight key market trends, recurrent complaints, competitor activities, and actionable advice for the week.\n\nData:\n" . json_encode($combinedData);
|
||||
$prompt = "أنت خبير واستشاري تسويق الذكاء الاصطناعي (Chief Marketing Officer AI).
|
||||
فيما يلي جميع التقارير اليومية والفردية لاستخبارات وسائل التواصل الاجتماعي التي جمعناها خلال الـ 7 أيام الماضية.
|
||||
يرجى قراءتها بالكامل وتوليد 'ملخص استخبارات السوق الأسبوعي الشامل'.
|
||||
قم بتنسيق التقرير بشكل جميل باستخدام HTML. يجب أن تبرز اتجاهات السوق الرئيسية، الشكاوى المتكررة، نشاطات المنافسين، ونصائح قابلة للتنفيذ لهذا الأسبوع.
|
||||
|
||||
هام جداً:
|
||||
- يجب أن يكون التقرير باللغة العربية بالكامل.
|
||||
- يجب أن تغلف كامل التقرير بـ <div dir=\"rtl\" align=\"right\"> في البداية و </div> في النهاية لضمان المحاذاة.
|
||||
|
||||
البيانات:
|
||||
" . json_encode($combinedData, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$response = $gemini->callGemini($prompt, 'gemini-1.5-flash');
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ try {
|
||||
switch ($action) {
|
||||
case 'get_task':
|
||||
$stmt = $con->prepare("
|
||||
SELECT id, type
|
||||
SELECT id, type, target_url, prompt_context
|
||||
FROM marketing_tasks
|
||||
WHERE status = 'pending' AND platform = ?
|
||||
ORDER BY id ASC LIMIT 1
|
||||
|
||||
@@ -2,9 +2,17 @@
|
||||
require_once __DIR__ . '/../core/bootstrap.php';
|
||||
$con = Database::get('main');
|
||||
|
||||
$stmt = $con->prepare("INSERT INTO marketing_tasks (platform, type, status) VALUES ('facebook', 'autonomous_scroll_and_reply', 'pending')");
|
||||
$stmt->execute();
|
||||
$platform = $_GET['platform'] ?? 'facebook';
|
||||
$targetUrl = $_GET['target_url'] ?? null;
|
||||
|
||||
if ($targetUrl) {
|
||||
$stmt = $con->prepare("INSERT INTO marketing_tasks (platform, type, status, target_url) VALUES (?, 'autonomous_scroll_and_reply', 'pending', ?)");
|
||||
$stmt->execute([$platform, $targetUrl]);
|
||||
} else {
|
||||
$stmt = $con->prepare("INSERT INTO marketing_tasks (platform, type, status) VALUES (?, 'autonomous_scroll_and_reply', 'pending')");
|
||||
$stmt->execute([$platform]);
|
||||
}
|
||||
|
||||
echo "<h1>Task inserted successfully!</h1>";
|
||||
echo "<p>A new 'autonomous_scroll_and_reply' task is now pending for Facebook.</p>";
|
||||
echo "<p>A new 'autonomous_scroll_and_reply' task is now pending for $platform.</p>";
|
||||
echo "<p>Please restart the Android app now. It will immediately pick up this task and start scrolling!</p>";
|
||||
|
||||
Reference in New Issue
Block a user