mgbam commited on
Commit
29659ac
·
verified ·
1 Parent(s): 5a1303c

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +10 -13
agent.py CHANGED
@@ -51,19 +51,16 @@ def _build_prompt_template(tool_names: List[str], tools) -> ChatPromptTemplate:
51
  - the current human input,
52
  - a placeholder for agent_scratchpad (List[BaseMessage]) to manage tool calls.
53
  """
54
- system_text = """
55
- You are Quantum Health Navigator, an AI assistant for healthcare professionals.
56
-
57
- Disclaim: you are an AI, not a substitute for clinical judgment.
58
- Patient context is provided as: {patient_context}
59
- • Available tools: {tool_names}
60
- {tools}
61
-
62
- To call a tool, reply *only* with a JSON block:
63
- {"action": "<tool_name>", "action_input": <input>}
64
-
65
- After receiving the tool’s output, craft a full answer for the user, citing any tools used.
66
- """.strip()
67
 
68
  return ChatPromptTemplate.from_messages([
69
  ("system", system_text),
 
51
  - the current human input,
52
  - a placeholder for agent_scratchpad (List[BaseMessage]) to manage tool calls.
53
  """
54
+ system_text = (
55
+ "You are Quantum Health Navigator, an AI assistant for healthcare professionals.\n\n"
56
+ "• Disclaim: you are an AI, not a substitute for clinical judgment.\n"
57
+ "Patient context: {patient_context}\n"
58
+ "Available tools: {tool_names}\n"
59
+ "{tools}\n\n"
60
+ "To call a tool, reply *only* with a JSON code block:\n"
61
+ "{{\"action\": \"<tool_name>\", \"action_input\": <input>}}\n\n"
62
+ "After you receive the tool’s output, craft a full answer for the user, citing any tools used."
63
+ )
 
 
 
64
 
65
  return ChatPromptTemplate.from_messages([
66
  ("system", system_text),