nikhmr1235 commited on
Commit
2cd125f
·
verified ·
1 Parent(s): 6f20cc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -226,10 +226,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
226
  {tools}
227
 
228
  **File Handling:**
229
- 1. Always check if a file attachment is provided in `additional_args['file']`. This will contain a 'path' to the file (e.g., `additional_args['file']['path']`).
230
  2. **IF** a file path is present:
231
- * **Action:** First, use the `load_text_file_tool` with the file's 'path' to read its content.
232
- * **Action:** Next, use the available tools or parse and extract the answer from the intermediate output
233
  3. **IF** input has an image:
234
  * **Action:** image is available in kwargs['images']
235
  4. **ELSE** link to the file is directly part of the input,use available tools to access the file
@@ -248,7 +248,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
248
  ... (This Thought/Action/Action Input/Observation cycle can repeat N times) ...
249
 
250
  **Thought:** I have now gathered all the necessary information and can confidently answer the user's original question. I will now format the final answer exactly as requested.
251
- **Final Answer:** [The final, direct, and precisely formatted answer to the user's question]
252
  NOTE: Final Answer format: YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
253
  Remember that you can open xlsx files using pandas
254
  Remember that you are smart and a perceptive reader! If you need to extract information from a piece of text, you should be able to do that just by reading the text and without writing code to extract entities.
 
226
  {tools}
227
 
228
  **File Handling:**
229
+ 1. Always check if a file attachment is provided in `additional_args['file']`. This will contain a 'path' to the file (`additional_args['file']['path']`).
230
  2. **IF** a file path is present:
231
+ * **Action:** First, use the `load_text_file_tool` with the file path: additional_args['file']['path'] to read its content.
232
+ * **Action:** Next, use the available tools to parse and extract the answer from the intermediate output
233
  3. **IF** input has an image:
234
  * **Action:** image is available in kwargs['images']
235
  4. **ELSE** link to the file is directly part of the input,use available tools to access the file
 
248
  ... (This Thought/Action/Action Input/Observation cycle can repeat N times) ...
249
 
250
  **Thought:** I have now gathered all the necessary information and can confidently answer the user's original question. I will now format the final answer exactly as requested.
251
+ Final Answer:[The final, direct, and precisely formatted answer to the user's question]
252
  NOTE: Final Answer format: YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
253
  Remember that you can open xlsx files using pandas
254
  Remember that you are smart and a perceptive reader! If you need to extract information from a piece of text, you should be able to do that just by reading the text and without writing code to extract entities.