Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ class LangGraphAgent:
|
|
100 |
raw_response = self.model(content)
|
101 |
|
102 |
# Detect tool usage
|
103 |
-
match = re.search(
|
104 |
if match:
|
105 |
tool_name, tool_input = match.groups()
|
106 |
tool_fn = self.tools.get(tool_name)
|
|
|
100 |
raw_response = self.model(content)
|
101 |
|
102 |
# Detect tool usage
|
103 |
+
match = re.search(r"Action:\s*(\w+)\s*Action Input:\s*\"(.+?)\"", raw_response, re.DOTALL)
|
104 |
if match:
|
105 |
tool_name, tool_input = match.groups()
|
106 |
tool_fn = self.tools.get(tool_name)
|