feat: target channel context history, custom website extraction needs, and categorized main menu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user