Spaces:
Sleeping
Sleeping
Commit
·
fc6e06b
1
Parent(s):
d4c0b27
Update services/pipeline_executor.py
Browse files
services/pipeline_executor.py
CHANGED
|
@@ -149,12 +149,20 @@ Then you can take another Action or provide your Final Answer.
|
|
| 149 |
CRITICAL RULES:
|
| 150 |
- Write "Action:" followed by the tool name
|
| 151 |
- Write "Action Input:" followed by valid JSON on the SAME line or next line
|
|
|
|
|
|
|
| 152 |
- For page parameters: start_page must be >= 1, end_page must be >= 1
|
| 153 |
- To process ALL pages, use end_page: 999 (NOT -1!)
|
| 154 |
- After seeing Observation, you can take another Action
|
| 155 |
- When done, write "Final Answer:" followed by summary
|
| 156 |
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
Pipeline components to execute:
|
| 159 |
{json.dumps(pipeline.get('components', []), indent=2)}
|
| 160 |
|
|
|
|
| 149 |
CRITICAL RULES:
|
| 150 |
- Write "Action:" followed by the tool name
|
| 151 |
- Write "Action Input:" followed by valid JSON on the SAME line or next line
|
| 152 |
+
- ALWAYS include "file_path" parameter in your Action Input
|
| 153 |
+
- The file_path is: {file_path}
|
| 154 |
- For page parameters: start_page must be >= 1, end_page must be >= 1
|
| 155 |
- To process ALL pages, use end_page: 999 (NOT -1!)
|
| 156 |
- After seeing Observation, you can take another Action
|
| 157 |
- When done, write "Final Answer:" followed by summary
|
| 158 |
|
| 159 |
+
EXAMPLE of correct tool call:
|
| 160 |
+
Action: extract_text
|
| 161 |
+
Action Input: {{"file_path": "{file_path}", "start_page": 1, "end_page": 5}}
|
| 162 |
+
|
| 163 |
+
IMPORTANT: Every tool call MUST include the file_path parameter!
|
| 164 |
+
|
| 165 |
+
File to process: {file_path}
|
| 166 |
Pipeline components to execute:
|
| 167 |
{json.dumps(pipeline.get('components', []), indent=2)}
|
| 168 |
|