mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Fix agent remembering do nothing command, use correct google function, disabled image_gen if not configured.
This commit is contained in:
@@ -187,7 +187,7 @@ class Agent:
|
||||
result = plugin.post_command(command_name, result)
|
||||
if self.next_action_count > 0:
|
||||
self.next_action_count -= 1
|
||||
|
||||
if command_name != "do_nothing":
|
||||
memory_to_add = (
|
||||
f"Assistant Reply: {assistant_reply} "
|
||||
f"\nResult: {result} "
|
||||
|
||||
@@ -11,7 +11,7 @@ from autogpt.config import Config
|
||||
CFG = Config()
|
||||
|
||||
|
||||
@command("google", "Google Search", '"input": "<search>"', not CFG.google_api_key)
|
||||
@command("google", "Google Search", '"query": "<search>"', not CFG.google_api_key)
|
||||
def google_search(query: str, num_results: int = 8) -> str:
|
||||
"""Return the results of a google search
|
||||
|
||||
@@ -40,7 +40,7 @@ def google_search(query: str, num_results: int = 8) -> str:
|
||||
@command(
|
||||
"google",
|
||||
"Google Search",
|
||||
'"input": "<search>"',
|
||||
'"query": "<search>"',
|
||||
bool(CFG.google_api_key),
|
||||
"Configure google_api_key.",
|
||||
)
|
||||
|
||||
@@ -14,7 +14,8 @@ from autogpt.workspace import path_in_workspace
|
||||
CFG = Config()
|
||||
|
||||
|
||||
@command("generate_image", "Generate Image", '"prompt": "<prompt>"')
|
||||
@command("generate_image", "Generate Image", '"prompt": "<prompt>"',
|
||||
CFG.image_provider)
|
||||
def generate_image(prompt: str) -> str:
|
||||
"""Generate an image from a prompt.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user