feat:简化部分代码
This commit is contained in:
@@ -6,6 +6,7 @@ from langgraph.checkpoint.memory import InMemorySaver
|
||||
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
|
||||
from langgraph.graph import END, StateGraph
|
||||
|
||||
from app.config import settings
|
||||
from app.processor.nodes.action_node import ActionNode, can_generate_actions
|
||||
from app.processor.nodes.clarify_node import ClarifyNode
|
||||
from app.processor.nodes.component_resource_node import ComponentResourceNode
|
||||
@@ -46,8 +47,6 @@ def route_after_scope(state: QueryState) -> str:
|
||||
|
||||
|
||||
def build_graph(checkpointer=None):
|
||||
from app.config import settings
|
||||
|
||||
# 最大重试次数
|
||||
max_retries = settings.max_action_retries
|
||||
|
||||
@@ -331,8 +330,6 @@ if __name__ == "__main__":
|
||||
print(
|
||||
f"{index}. {option['label']}{marker}:{option['description']}"
|
||||
)
|
||||
if "error" in pending:
|
||||
print(pending["error"])
|
||||
answer = input("输入编号或自由回答(/cancel 取消):")
|
||||
reply = {"cancel": True} if answer == "/cancel" else {"answer": answer}
|
||||
if answer.isdigit() and 1 <= int(answer) <= len(options):
|
||||
|
||||
Reference in New Issue
Block a user