Fix an exception for gpt response with lang=sh (#105)

This commit is contained in:
jjzhuo
2023-06-17 07:35:43 -07:00
committed by GitHub
parent 98ebaa221f
commit cde2595ccc

View File

@@ -107,7 +107,7 @@ def execute_workspace(ai: AI, dbs: DBs):
)
[[lang, command]] = parse_chat(messages[-1]['content'])
assert lang in ['', 'bash']
assert lang in ['', 'bash', 'sh']
print('Do you want to execute this code?')
print(command)