Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Moved argument parsing statements into a separate function #503

Merged
merged 3 commits into from
Apr 1, 2024

Conversation

aravindsomaraj
Copy link
Contributor

I just made a minor change in main.py by moving these lines into a separate function parse_arguments(), and having it be called from main(). I think it would improve readability a bit.
Lines in question:

parser = argparse.ArgumentParser(description="Run an agent with a specific task")
parser.add_argument("-d", "--directory", required=True, type=str, help="The working directory for the agent")
parser.add_argument("-t", "--task", type=str, default="", help="The task for the agent to perform")
parser.add_argument("-f", "--file", type=str, help="Path to a file containing the task. Overrides -t if both are provided.")
parser.add_argument("-c", "--agent-cls", default="LangchainsAgent", type=str, help="The agent class to use")
parser.add_argument("-m", "--model-name", default=config.get_or_default("LLM_MODEL", "gpt-4-0125-preview"), type=str, help="The (litellm) model name to use")
parser.add_argument("-i", "--max-iterations", default=100, type=int, help="The maximum number of iterations to run the agent")

@rbren rbren merged commit 26c9ce1 into All-Hands-AI:main Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants