mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-06 23:04:30 +01:00
Merge pull request #1826 from hdkiller/add-only-to-prompt-if-model-is-set
Only add audio to text command to the prompt if model is set
This commit is contained in:
@@ -82,10 +82,19 @@ def get_prompt() -> str:
|
||||
),
|
||||
("Execute Python File", "execute_python_file", {"file": "<file>"}),
|
||||
("Generate Image", "generate_image", {"prompt": "<prompt>"}),
|
||||
("Convert Audio to text", "read_audio_from_file", {"file": "<file>"}),
|
||||
("Send Tweet", "send_tweet", {"text": "<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": "<file>"}
|
||||
),
|
||||
)
|
||||
|
||||
# Only add shell command to the prompt if the AI is allowed to execute it
|
||||
if cfg.execute_local_commands:
|
||||
commands.append(
|
||||
|
||||
Reference in New Issue
Block a user