1. LLM接口改为字节级流式接口,防止超时错误,也避免utf-8长字节字符拼接错误
This commit is contained in:
@@ -51,8 +51,8 @@ class ReportStructureNode(StateMutationNode):
|
||||
try:
|
||||
logger.info(f"正在为查询生成报告结构: {self.query}")
|
||||
|
||||
# 调用LLM
|
||||
response = self.llm_client.invoke(SYSTEM_PROMPT_REPORT_STRUCTURE, self.query)
|
||||
# 调用LLM(流式,安全拼接UTF-8)
|
||||
response = self.llm_client.stream_invoke_to_string(SYSTEM_PROMPT_REPORT_STRUCTURE, self.query)
|
||||
|
||||
# 处理响应
|
||||
processed_response = self.process_output(response)
|
||||
|
||||
Reference in New Issue
Block a user