diff --git a/autogpt/prompt.py b/autogpt/prompt.py index 97bacb71..5cc98cd3 100644 --- a/autogpt/prompt.py +++ b/autogpt/prompt.py @@ -82,10 +82,19 @@ def get_prompt() -> str: ), ("Execute Python File", "execute_python_file", {"file": ""}), ("Generate Image", "generate_image", {"prompt": ""}), - ("Convert Audio to text", "read_audio_from_file", {"file": ""}), ("Send Tweet", "send_tweet", {"text": ""}), ] + # Only add the audio to text command if the model is specified + if cfg.huggingface_audio_to_text_model: + commands.append( + ( + "Convert Audio to text", + "read_audio_from_file", + {"file": ""} + ), + ) + # Only add shell command to the prompt if the AI is allowed to execute it if cfg.execute_local_commands: commands.append(