Skip to content

Commit 395f50d

Browse files
author
何涛
committed
fix: fix the system prompt formatter
1 parent a9351f2 commit 395f50d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

operate/models/apis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def call_qwen_vl_with_ocr(messages, objective, model):
179179
messages.append(vision_message)
180180

181181
response = client.chat.completions.create(
182-
model="qwen2.5-vl-72b-instruct",
182+
model="qwen2.5-vl-7b-instruct",
183183
messages=messages,
184184
)
185185

operate/models/prompts.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,16 @@ def get_system_prompt(model, objective):
213213
"""
214214

215215
if platform.system() == "Darwin":
216-
cmd_string = "command"
217-
os_search_str = ["command", "space"]
216+
cmd_string = "\"command\""
217+
os_search_str = "[\"command\", \"space\"]"
218218
operating_system = "Mac"
219219
elif platform.system() == "Windows":
220-
cmd_string = "ctrl"
221-
os_search_str = ["win"]
220+
cmd_string = "\"ctrl\""
221+
os_search_str = "[\"win\"]"
222222
operating_system = "Windows"
223223
else:
224-
cmd_string = "ctrl"
225-
os_search_str = ["win"]
224+
cmd_string = "\"ctrl\""
225+
os_search_str = "[\"win\"]"
226226
operating_system = "Linux"
227227

228228
if model == "gpt-4-with-som":
@@ -232,7 +232,7 @@ def get_system_prompt(model, objective):
232232
os_search_str=os_search_str,
233233
operating_system=operating_system,
234234
)
235-
elif model == "gpt-4-with-ocr" or model == "o1-with-ocr" or model == "claude-3":
235+
elif model == "gpt-4-with-ocr" or model == "o1-with-ocr" or model == "claude-3" or model == "qwen-vl":
236236

237237
prompt = SYSTEM_PROMPT_OCR.format(
238238
objective=objective,

0 commit comments

Comments
 (0)