|
|
@@ -18,7 +18,7 @@ from examples.demand.config import LOG_LEVEL, ENABLED_TOOLS
|
|
|
from examples.demand.db_manager import DatabaseManager
|
|
|
from examples.demand.models import TopicPatternExecution
|
|
|
from examples.demand.piaoquan_prepare import prepare, piaoquan_prepare
|
|
|
-from examples.demand.topic_build_agent_context import TopicBuildAgentContext
|
|
|
+from examples.demand.demand_agent_context import TopicBuildAgentContext
|
|
|
from examples.demand.mysql import mysql_db
|
|
|
|
|
|
# Clash Verge TUN 模式兼容:禁止 httpx/urllib 自动检测系统 HTTP 代理
|
|
|
@@ -49,17 +49,17 @@ from examples.demand.config import DEBUG, LOG_FILE, LOG_LEVEL, RUN_CONFIG, TRACE
|
|
|
CUSTOM_TOOL_MODULES = {
|
|
|
# demand 示例:严格按工具名白名单加载对应模块
|
|
|
"think_and_plan": "examples.demand.agent_tools",
|
|
|
- "get_category_tree": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_frequent_itemsets": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_itemset_detail": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_post_elements": "examples.demand.topic_build_pattern_tools",
|
|
|
- "search_elements": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_element_category_chain": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_category_detail": "examples.demand.topic_build_pattern_tools",
|
|
|
- "search_categories": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_category_elements": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_category_co_occurrences": "examples.demand.topic_build_pattern_tools",
|
|
|
- "get_element_co_occurrences": "examples.demand.topic_build_pattern_tools",
|
|
|
+ "get_category_tree": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_frequent_itemsets": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_itemset_detail": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_post_elements": "examples.demand.demand_pattern_tools",
|
|
|
+ "search_elements": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_element_category_chain": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_category_detail": "examples.demand.demand_pattern_tools",
|
|
|
+ "search_categories": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_category_elements": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_category_co_occurrences": "examples.demand.demand_pattern_tools",
|
|
|
+ "get_element_co_occurrences": "examples.demand.demand_pattern_tools",
|
|
|
"get_weight_score_topn": "examples.demand.weight_score_query_tools",
|
|
|
"get_weight_score_by_name": "examples.demand.weight_score_query_tools",
|
|
|
"create_demand_item": "examples.demand.demand_build_agent_tools",
|
|
|
@@ -388,4 +388,5 @@ async def main(cluster_name, platform_type) -> None:
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- asyncio.run(main('小阳看天下', 'changwen'))
|
|
|
+ piaoquan_prepare('历史名人')
|
|
|
+ # asyncio.run(main('小阳看天下', 'changwen'))
|