Deploy on 2026-06-05 17:24:21
This commit is contained in:
@@ -34,7 +34,7 @@ You are ScoutIQ, an investor intelligence AI. Analyze the following startup/inve
|
||||
- "score": integer 0-100 (relevance to startups seeking funding)
|
||||
- "tags": array of relevant tags (max 5)
|
||||
- "is_opportunity": boolean (true if it's a funding/investment opportunity)
|
||||
- "summary": 1-2 sentence summary of what this is
|
||||
- "summary": 1-2 sentence summary in Arabic language of what this is, highlighting key strengths and contact/application info if present
|
||||
- "organization_name": extracted organization name if any, or null
|
||||
- "country": extracted country if any, or null
|
||||
|
||||
@@ -78,7 +78,7 @@ Extract organization/investor information from this text. Return JSON:
|
||||
- "type": one of ["vc", "angel", "accelerator", "incubator", "venture_studio", "partner", "other"] or null
|
||||
- "country": country name or null
|
||||
- "website": website URL or null
|
||||
- "description": brief description max 200 chars
|
||||
- "description": brief description max 200 chars in Arabic language
|
||||
|
||||
Text: {$text}
|
||||
|
||||
|
||||
@@ -289,21 +289,27 @@ class Collector
|
||||
|
||||
// Trigger Telegram notification if enabled
|
||||
if ($this->getSetting('telegram_enabled') === '1') {
|
||||
$orgName = '';
|
||||
if ($orgId) {
|
||||
$orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?");
|
||||
$orgStmt->execute([$orgId]);
|
||||
$orgName = $orgStmt->fetchColumn() ?: '';
|
||||
$minScore = (int)($this->getSetting('telegram_min_score') ?: 75);
|
||||
$oppType = $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other';
|
||||
$importantTypes = ['vc_funding', 'accelerator', 'incubator', 'grant', 'competition'];
|
||||
|
||||
if ($score >= $minScore && in_array($oppType, $importantTypes)) {
|
||||
$orgName = '';
|
||||
if ($orgId) {
|
||||
$orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?");
|
||||
$orgStmt->execute([$orgId]);
|
||||
$orgName = $orgStmt->fetchColumn() ?: '';
|
||||
}
|
||||
$this->notifier->loadSettings();
|
||||
$this->notifier->notifyNewOpportunity([
|
||||
'title' => $entry['title'],
|
||||
'type' => $oppType,
|
||||
'score' => $score,
|
||||
'url' => $entry['url'],
|
||||
'description' => $analysis['summary'] ?? $entry['description'],
|
||||
'org_name' => $orgName,
|
||||
]);
|
||||
}
|
||||
$this->notifier->loadSettings();
|
||||
$this->notifier->notifyNewOpportunity([
|
||||
'title' => $entry['title'],
|
||||
'type' => $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other',
|
||||
'score' => $score,
|
||||
'url' => $entry['url'],
|
||||
'description' => $analysis['summary'] ?? $entry['description'],
|
||||
'org_name' => $orgName,
|
||||
]);
|
||||
}
|
||||
|
||||
} catch (Throwable $e) {
|
||||
|
||||
Reference in New Issue
Block a user