Commit
·
1a34264
1
Parent(s):
9aa6f67
debugging
Browse files- interface.py +0 -1
- medrax/agent/agent.py +2 -2
interface.py
CHANGED
@@ -143,7 +143,6 @@ class ChatInterface:
|
|
143 |
if message is not None:
|
144 |
messages.append({"role": "user", "content": [{"type": "text", "text": message}]})
|
145 |
|
146 |
-
print(f"Messages: {messages}")
|
147 |
try:
|
148 |
for event in self.agent.workflow.stream(
|
149 |
{"messages": messages}, {"configurable": {"thread_id": self.current_thread_id}}
|
|
|
143 |
if message is not None:
|
144 |
messages.append({"role": "user", "content": [{"type": "text", "text": message}]})
|
145 |
|
|
|
146 |
try:
|
147 |
for event in self.agent.workflow.stream(
|
148 |
{"messages": messages}, {"configurable": {"thread_id": self.current_thread_id}}
|
medrax/agent/agent.py
CHANGED
@@ -117,11 +117,11 @@ class ChatAgent:
|
|
117 |
Dict[str, List[AnyMessage]]: A dictionary containing the model's response.
|
118 |
"""
|
119 |
messages = state["messages"]
|
120 |
-
|
121 |
if self.prompts:
|
122 |
messages = [SystemMessage(content=self.prompts["MEDICAL_ASSISTANT"])] + messages
|
123 |
response = self.model.invoke(messages)
|
124 |
-
|
125 |
return {"messages": [response]}
|
126 |
|
127 |
def has_tool_calls(self, state: AgentState) -> bool:
|
|
|
117 |
Dict[str, List[AnyMessage]]: A dictionary containing the model's response.
|
118 |
"""
|
119 |
messages = state["messages"]
|
120 |
+
print('process_request input', state)
|
121 |
if self.prompts:
|
122 |
messages = [SystemMessage(content=self.prompts["MEDICAL_ASSISTANT"])] + messages
|
123 |
response = self.model.invoke(messages)
|
124 |
+
print('process_request output', response)
|
125 |
return {"messages": [response]}
|
126 |
|
127 |
def has_tool_calls(self, state: AgentState) -> bool:
|