Bladeren bron

clean_agent

丁云鹏 3 weken geleden
bovenliggende
commit
5f0f387a93
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      agents/clean_agent/agent.py

+ 4 - 3
agents/clean_agent/agent.py

@@ -4,7 +4,7 @@ from langgraph.graph import StateGraph, START, END
 from langgraph.graph.message import add_messages
 import os
 from langchain_openai import ChatOpenAI
-from .tools import evaluation_extraction_tool
+from .tools import evaluation_extraction_tool, evaluation_extraction
 import uuid
 
 from langgraph.prebuilt import ToolNode, tools_condition
@@ -124,7 +124,7 @@ def execute_agent_with_api(user_input: str):
 
 def execute(query_word: str, request_id: str):
     logger.info(f"开始处理,request_id: {request_id}, query_word: {query_word}")
-    result = evaluation_extraction_tool(request_id, query_word)
+    result = evaluation_extraction(request_id, query_word)
     return result
 
 def main():
@@ -136,7 +136,8 @@ def main():
         os.environ["HTTPS_PROXY"] = proxy_url
         os.environ["HTTP_PROXY"] = proxy_url
     # 执行Agent
-    result = execute_agent_with_api('{"query_word":"图文策划方法","request_id":"REQUEST_001"}')
+    # result = execute_agent_with_api('{"query_word":"图文策划方法","request_id":"REQUEST_001"}')
+    result = execute("图文策划方法", "REQUEST_001")
     print(result)
 
 if __name__ == '__main__':