mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
* Fix all but one flake8 linting errors * Remove unused imports * Wrap strings that are too long * Add basic autogpts/autogpt/.flake8 * Delete planning_agent.py * Delete default_prompts.py * Delete _test_json_parser.py * Refactor the example function call in AgentProfileGeneratorConfiguration from a string to an object * Rewrite/update docstrings here and there while I'm at it * Minor change to the description of the `open_file` command * Use `user-agent` from config in web_selenium.py * Delete hardcoded ABILITIES from core/planning/templates.py * Delete duplicate and superseded test from test_image_gen.py * Fix parameter definitions in mock_commands.py * Delete code analysis blocks from test_spinner.py, test_url_validation.py
30 lines
691 B
Python
30 lines
691 B
Python
from autogpt.command_decorator import command
|
|
from autogpt.core.utils.json_schema import JSONSchema
|
|
|
|
COMMAND_CATEGORY = "mock"
|
|
|
|
|
|
@command(
|
|
"function_based_cmd",
|
|
"Function-based test command",
|
|
{
|
|
"arg1": JSONSchema(
|
|
type=JSONSchema.Type.INTEGER,
|
|
description="arg 1",
|
|
required=True,
|
|
),
|
|
"arg2": JSONSchema(
|
|
type=JSONSchema.Type.STRING,
|
|
description="arg 2",
|
|
required=True,
|
|
),
|
|
},
|
|
)
|
|
def function_based_cmd(arg1: int, arg2: str) -> str:
|
|
"""A function-based test command.
|
|
|
|
Returns:
|
|
str: the two arguments separated by a dash.
|
|
"""
|
|
return f"{arg1} - {arg2}"
|