Skip to content

Commit 283ccbf

Browse files
committed
Improve if VERBOSE log and prompt
1 parent 5f2d717 commit 283ccbf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

operate/models/apis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ async def call_gpt_4_vision_preview_ocr(messages, objective, model):
247247
)
248248

249249
content = response.choices[0].message.content
250+
if VERBOSE:
251+
print("[call_gpt_4_vision_preview_ocr] response content", content)
250252

251253
if content.startswith("```json"):
252254
content = content[len("```json") :] # Remove starting ```json
@@ -256,8 +258,6 @@ async def call_gpt_4_vision_preview_ocr(messages, objective, model):
256258
content_str = content
257259

258260
content = json.loads(content)
259-
if VERBOSE:
260-
print("[call_gpt_4_vision_preview_ocr] content", content)
261261

262262
processed_content = []
263263

operate/models/prompts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
You have 4 possible operation actions available to you. The `pyautogui` library will be used to execute your decision. Your output will be used in a `json.loads` loads statement.
209209
210210
1. click - Move mouse and click
211-
[{{ "thought": "write a thought here", "operation": "click", "text": "The text in the button or link to click" }}] # Look for buttons or links with text to click. If the button you want to click doesn't have text you can say `"no button"` for the text value and we'll try a different method.
211+
[{{ "thought": "write a thought here", "operation": "click", "text": "The text in the button or link to click" }}] # Look for text to click. Try to find relevant text to click, but if there's nothing relevant enough you can return `"nothing to click"` for the text value and we'll try a different method.
212212
213213
2. write - Write with your keyboard
214214
[{{ "thought": "write a thought here", "operation": "write", "content": "text to write here" }}]
@@ -258,7 +258,7 @@
258258
You have 4 possible operation actions available to you. The `pyautogui` library will be used to execute your decision. Your output will be used in a `json.loads` loads statement.
259259
260260
1. click - Move mouse and click
261-
[{{ "thought": "write a thought here", "operation": "click", "text": "The text in the button or link to click" }}] # Look for buttons or links with text to click. If the button you want to click doesn't have text you can say `"no button"` for the text value and we'll try a different method.
261+
[{{ "thought": "write a thought here", "operation": "click", "text": "The text in the button or link to click" }}] # Look for text to click. Try to find relevant text to click, but if there's nothing relevant enough you can return `"nothing to click"` for the text value and we'll try a different method.
262262
263263
2. write - Write with your keyboard
264264
[{{ "thought": "write a thought here", "operation": "write", "content": "text to write here" }}]

0 commit comments

Comments
 (0)