Merge branch 'master' into autogpt/agent-protocol

This commit is contained in:
Reinier van der Leer
2023-10-16 16:02:03 -07:00
25 changed files with 117 additions and 10 deletions

3
.gitattributes vendored
View File

@@ -1,2 +1,3 @@
frontend/build/* linguist-generated
frontend/build/* linguist-vendored
**/poetry.lock linguist-generated

6
arena/Auto.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/Nikhil8652/AutoGPT",
"timestamp": "2023-10-16T09:12:17.452121",
"commit_hash_to_benchmark": "2f79caa6b901d006a78c1ac9e69db4465c0f971a",
"branch_to_benchmark": "master"
}

View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/cagdasbas/AutoGPT",
"timestamp": "2023-10-15T08:43:40.193080",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/ExampleAgent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/janekdijkstra/AutoGPT",
"timestamp": "2023-10-16T12:12:54.998033",
"commit_hash_to_benchmark": "2f79caa6b901d006a78c1ac9e69db4465c0f971a",
"branch_to_benchmark": "master"
}

6
arena/MyFirstAgent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/smaxaddington/AutoGPT",
"timestamp": "2023-10-14T15:27:15.090035",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/Raslebot.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/Jimcau/AutoGPT.git",
"timestamp": "2023-10-16T10:50:47.524483",
"commit_hash_to_benchmark": "2f79caa6b901d006a78c1ac9e69db4465c0f971a",
"branch_to_benchmark": "master"
}

6
arena/TraceLLMAgent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/vmwsree/AutoGPT",
"timestamp": "2023-10-15T21:48:38.027553",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/UmaruAgent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/g1331/Auto-GPT",
"timestamp": "2023-10-16T13:51:10.464650",
"commit_hash_to_benchmark": "2f79caa6b901d006a78c1ac9e69db4465c0f971a",
"branch_to_benchmark": "master"
}

6
arena/billy.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/khelil/AutoGPT",
"timestamp": "2023-10-14T17:51:54.044334",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/dda.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/aiherrera1/AutoGPT",
"timestamp": "2023-10-15T18:03:04.765167",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/dev_agent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/pedrovvitor/AutoGPT",
"timestamp": "2023-10-15T14:25:07.534330",
"commit_hash_to_benchmark": "93e3ec36ed6cd9e5e60585f016ad3bef4e1c52cb",
"branch_to_benchmark": "master"
}

6
arena/robot.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/brisklad/AutoGPT",
"timestamp": "2023-10-15T13:49:47.384228",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/searchagent.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/sanjeevsaara/AutoGPT",
"timestamp": "2023-10-16T00:01:53.051453",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/teacher.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/miaowacao/AutoGPT1",
"timestamp": "2023-10-16T07:21:48.209351",
"commit_hash_to_benchmark": "c77ade5b2f62c5373fc7573e5c45581f003c77a3",
"branch_to_benchmark": "master"
}

6
arena/testGPT.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/PZON2/testGPT",
"timestamp": "2023-10-15T12:06:56.373935",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/web_developer.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/paul726/AutoGPT",
"timestamp": "2023-10-15T13:36:03.387061",
"commit_hash_to_benchmark": "74ee69daf1c0a2603f19bdb1edcfdf1f4e06bcff",
"branch_to_benchmark": "master"
}

6
arena/xt0m-GPT.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/jcartes/xt0m-GPT",
"timestamp": "2023-10-15T01:31:05.785913",
"commit_hash_to_benchmark": "57bcbdf45c6c1493a4e5f6a4e72594ea13c10f93",
"branch_to_benchmark": "master"
}

6
arena/zze.json Normal file
View File

@@ -0,0 +1,6 @@
{
"github_repo_url": "https://github.com/quasimodo7614/AutoGPT",
"timestamp": "2023-10-16T07:49:29.399457",
"commit_hash_to_benchmark": "2f79caa6b901d006a78c1ac9e69db4465c0f971a",
"branch_to_benchmark": "master"
}

View File

@@ -644,7 +644,7 @@ async def get_user_feedback(
console_input = await clean_input(config, "Waiting for your response...")
else:
console_input = await clean_input(
config, Fore.MAGENTA + "Input: " + Style.RESET_ALL
config, Fore.MAGENTA + "Input:" + Style.RESET_ALL
)
# Parse user input

View File

@@ -51,7 +51,7 @@ async def clean_input(config: Config, prompt: str = ""):
# handle_sigint must be set to False, so the signal handler in the
# autogpt/main.py could be employed properly. This referes to
# https://github.com/Significant-Gravitas/AutoGPT/pull/4799/files/3966cdfd694c2a80c0333823c3bc3da090f85ed3#r1264278776
answer = await session.prompt_async(ANSI(prompt), handle_sigint=False)
answer = await session.prompt_async(ANSI(prompt + " "), handle_sigint=False)
return answer
except KeyboardInterrupt:
logger.info("You interrupted AutoGPT")

View File

@@ -27,7 +27,6 @@ from autogpt.core.utils.json_schema import JSONSchema
enabled=lambda config: not config.noninteractive_mode,
)
async def ask_user(question: str, agent: Agent) -> str:
resp = await clean_input(
agent.legacy_config, f"{agent.ai_profile.ai_name} asks: '{question}': "
)
print(f"\nQ: {question}")
resp = await clean_input(agent.legacy_config, "A:")
return f"The user's answer: '{resp}'"

View File

@@ -57,6 +57,11 @@ def web_search(query: str, agent: Agent, num_results: int = 8) -> str:
time.sleep(1)
attempts += 1
search_results = [
{"title": r["title"], "url": r["href"], "description": r["body"]}
for r in search_results
]
results = json.dumps(search_results, ensure_ascii=False, indent=4)
return safe_google_results(results)

View File

@@ -111,11 +111,12 @@ async def read_webpage(url: str, agent: Agent, question: str = "") -> str:
links = links[:LINKS_TO_RETURN]
text_fmt = f"'''{text}'''" if "\n" in text else f"'{text}'"
links_fmt = "\n".join(f"- {link}" for link in links)
return (
f"Page content{' (summary)' if summarized else ''}:"
if return_literal_content
else "Answer gathered from webpage:"
) + f" {text_fmt}\n\nLinks: {links}"
) + f" {text_fmt}\n\nLinks:\n{links_fmt}"
except WebDriverException as e:
# These errors are often quite long and include lots of context.

View File

@@ -25,8 +25,7 @@ ERROR_LOG_FILE = "error.log"
SIMPLE_LOG_FORMAT = "%(asctime)s %(levelname)s %(title)s%(message)s"
DEBUG_LOG_FORMAT = (
"%(asctime)s.%(msecs)03d %(levelname)s %(filename)s:%(lineno)d"
" %(title)s%(message)s"
"%(asctime)s %(levelname)s %(filename)s:%(lineno)d" " %(title)s%(message)s"
)
SPEECH_OUTPUT_LOGGER = "VOICE"

View File

@@ -30,4 +30,4 @@ def format_hyperlinks(hyperlinks: list[tuple[str, str]]) -> list[str]:
Returns:
List[str]: The formatted hyperlinks
"""
return [f"{link_text} ({link_url})" for link_text, link_url in hyperlinks]
return [f"{link_text.strip()} ({link_url})" for link_text, link_url in hyperlinks]