feat: target channel context history, custom website extraction needs, and categorized main menu

This commit is contained in:
mamad
2026-08-28 22:14:49 +03:30
parent 8ccecfe699
commit 9551ccce71
8 changed files with 350 additions and 73 deletions
+4 -2
View File
@@ -110,7 +110,8 @@ class WebsiteCollectorService:
if not site:
return False, "وبسایت یافت نشد."
ok, api_cfg, summary = await self.analyzer.analyze_website(site.url)
custom_inst = getattr(site, "custom_instructions", "") or ""
ok, api_cfg, summary = await self.analyzer.analyze_website(site.url, custom_instructions=custom_inst)
if ok and api_cfg:
await self.repo.update_source_website_api_config(site_id, api_cfg)
return True, f"✅ وبسایت «{site.name}» با موفقیت تحلیل شد:\n{summary}"
@@ -133,7 +134,8 @@ class WebsiteCollectorService:
endpoint_url = api_cfg.get("endpoint_url")
if not endpoint_url:
# Trigger initial analysis
ok, new_cfg, _ = await self.analyzer.analyze_website(site.url)
custom_inst = getattr(site, "custom_instructions", "") or ""
ok, new_cfg, _ = await self.analyzer.analyze_website(site.url, custom_instructions=custom_inst)
if ok and new_cfg:
await self.repo.update_source_website_api_config(site_id, new_cfg)
api_cfg = new_cfg