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

changed rstrip for strip and added case for empty string #2193

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

Lootheo
Copy link
Contributor

@Lootheo Lootheo commented Apr 17, 2023

changed rstrip for strip and added case for empty string in agent.py

Background

Sometimes when prompting I accidentally press the enter or space key resulting in a prompt instruction that confuses autogpt. I added changes to the agent to remove that.

Changes

in agent.py

if console_input.lower().rstrip() == "y":
                    if console_input.lower().strip() == "y":
                        user_input = "GENERATE NEXT COMMAND JSON"
                        break
                    elif console_input.lower().strip() == "":
                        print("Invalid input format.")
                        continue

Documentation

Test Plan

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

Lootheo added 2 commits April 17, 2023 09:17
changed rstrip for strip and added case for empty string in agent.py
@richbeales richbeales merged commit 9cb1555 into Significant-Gravitas:master Apr 17, 2023
@Lootheo Lootheo deleted the betterparsing branch April 17, 2023 19:51
sindlinger pushed a commit to Orgsindlinger/Auto-GPT-WebUI that referenced this pull request Sep 25, 2024
changed rstrip for strip and added case for empty string
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