remove comments

This commit is contained in:
2025-10-29 13:37:30 +08:00
parent a661e3a724
commit a8a16a5363

View File

@@ -120,8 +120,7 @@ class RoutingGraph(GraphBase):
decision:Route = self.router.invoke( decision:Route = self.router.invoke(
[ [
SystemMessage( SystemMessage(
# content="Return a JSON object with 'step'.the value should be one of 'chat' or 'order' based on the user input" content=self.prompt_dict["route_prompt"]
content=self.prompt_dict.get("route_prompt")
), ),
self._get_human_msg(state) self._get_human_msg(state)
] ]
@@ -157,12 +156,11 @@ class RoutingGraph(GraphBase):
if self.prompt_dict.get("chat_prompt") is not None: if self.prompt_dict.get("chat_prompt") is not None:
inp = {"messages":[ inp = {"messages":[
SystemMessage( SystemMessage(
# "You must use tool to complete the possible task" self.prompt_dict["chat_prompt"]
self.prompt_dict["chat_prompt"] ),
), *state["inp"][0]["messages"][1:]
*state["inp"][0]["messages"][1:] ]}, state["inp"][1]
]}, state["inp"][1]
out = self.chat_model.invoke(*inp) out = self.chat_model.invoke(*inp)
@@ -172,7 +170,6 @@ class RoutingGraph(GraphBase):
def _tool_model_call(self, state:State): def _tool_model_call(self, state:State):
inp = {"messages":[ inp = {"messages":[
SystemMessage( SystemMessage(
# "You must use tool to complete the possible task"
self.prompt_dict["tool_prompt"] self.prompt_dict["tool_prompt"]
), ),
*state["inp"][0]["messages"][1:] *state["inp"][0]["messages"][1:]