Przeglądaj źródła

feat: 取消账号抓取计划 & 摘要Prompt调整

jihuaqiang 16 godzin temu
rodzic
commit
ecc88afa10

+ 3 - 3
agent/core/prompts/compression.py

@@ -9,9 +9,9 @@
 COMPRESSION_PROMPT_TEMPLATE = """请对以上对话历史进行压缩总结。
 
 ### 摘要要求
-1. 寻找阶段保留内容寻找关键的过程,基于什么策略,case出发/特征出发,从哪个灵感点/特征词出发,搜索了哪个词,找到了哪些视频
-2. 筛选阶段保留关键的过程,执行了什么步骤,依据什么规则,筛选了哪些视频
-3. 对于已经淘汰的视频,无需进行记录。
+1. 保留候选内容寻找关键的过程,基于什么策略,case出发/特征出发,从哪个灵感点/特征词出发,搜索了哪个词,找到了哪些视频,记录每条视频的所有原始信息(特别是sec_uid)
+2. 筛选阶段保留候选内容的筛选过程,执行了什么步骤,依据什么规则,筛选了哪些视频
+3. 对于已经淘汰的视频,无需进行记录摘要,以节省 token 消耗
 4. 省略中间探索过程、重复的工具调用细节
 5. 控制在 2000 字以内
 

+ 1 - 1
examples/content_finder/content_finder.md

@@ -27,7 +27,7 @@ $system$
 - **画像仅通过** `batch_fetch_portraits`(参数 `candidates_json` 为 JSON 数组字符串);优先内容点赞画像,搜索来源可在条目中允许账号兜底,结果看 `metadata.results`  
 - 过程记录:`think_and_plan`  
 - 入库:`store_results_mysql`  
-- 爬取计划:`create_crawler_plan_by_douyin_content_id`、`create_crawler_plan_by_douyin_account_id`  
+- 爬取计划:`create_crawler_plan_by_douyin_content_id`  
 
 ## 约束
 - **禁止**调用任何名称以 `browser_` 开头的工具。  

+ 0 - 2
examples/content_finder/core.py

@@ -85,7 +85,6 @@ from tools import (
     get_account_fans_portrait,
     batch_fetch_portraits,
     create_crawler_plan_by_douyin_content_id,
-    create_crawler_plan_by_douyin_account_id,
     store_results_mysql,
     think_and_plan,
     find_authors_from_db,
@@ -188,7 +187,6 @@ async def run_agent(
         "find_authors_from_db",
         "store_results_mysql",
         "create_crawler_plan_by_douyin_content_id",
-        "create_crawler_plan_by_douyin_account_id",
         "think_and_plan",
         "get_goodcase_topic_point",
         "hot_topic_search",

+ 1 - 2
examples/content_finder/tools/__init__.py

@@ -11,7 +11,7 @@ from .hotspot_profile import (
     batch_fetch_portraits,
 )
 from .store_results_mysql import store_results_mysql
-from .aigc_platform_api import create_crawler_plan_by_douyin_content_id, create_crawler_plan_by_douyin_account_id
+from .aigc_platform_api import create_crawler_plan_by_douyin_content_id
 from .think_and_plan import think_and_plan
 from .find_authors_from_db import find_authors_from_db
 from .get_goodcase_topic_point import get_goodcase_topic_point
@@ -26,7 +26,6 @@ __all__ = [
     "batch_fetch_portraits",
     "store_results_mysql",
     "create_crawler_plan_by_douyin_content_id",
-    "create_crawler_plan_by_douyin_account_id",
     "think_and_plan",
     "find_authors_from_db",
     "get_goodcase_topic_point",