Skip to content

Commit d1d7f6f

Browse files
authored
accommodate gpt-4
1 parent 911b7c9 commit d1d7f6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main_simple_lib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def load_image(path):
254254

255255
def get_code(query):
256256
code = forward('codex', prompt=query, input_type="image")
257-
if config.codex.model != 'gpt-3.5-turbo':
258-
code = f'def execute_command(image, my_fig, time_wait_between_lines, syntax):' + code # ChatGPT gives execute_command due to its system behaviour
257+
if config.codex.model not in ('gpt-3.5-turbo', 'gpt-4'):
258+
code = f'def execute_command(image, my_fig, time_wait_between_lines, syntax):' + code # chat models give execute_command due to system behaviour
259259
code_for_syntax = code.replace("(image, my_fig, time_wait_between_lines, syntax)", "(image)")
260260
syntax_1 = Syntax(code_for_syntax, "python", theme="monokai", line_numbers=True, start_line=0)
261261
console.print(syntax_1)

0 commit comments

Comments
 (0)