added shell support

This commit is contained in:
Saifeddine ALOUI 2023-10-22 04:14:24 +02:00
parent a9c6026ddf
commit a7a7e6a315

3
app.py
View File

@ -581,8 +581,9 @@ class LoLLMsWebUI(LoLLMsAPPI):
if language=="python":
return self.execute_python(code, discussion_id, message_id)
elif language=="bash":
elif language in ["bash","shell","cmd","powershell"]:
return self.execute_bash(code, discussion_id, message_id)
return {"output": "Unsupported language", "execution_time": 0}
def copy_files(self, src, dest):
for item in os.listdir(src):