Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Random Values 0.1.0 #86

Merged
merged 6 commits into from
May 4, 2023
Merged

Conversation

sidewaysthought
Copy link
Contributor

I added a plugin that provides the following utilities

  • make_uuids generates 1 or more UUIDs (128-bit label)
  • generate_string generates 1 or more alphanumeric strings of at least 2 characters in length
  • generate_password generates 1 or more passwords of 6 or more characters using letters, numbers and punctuation
  • generate_placeholder_text generates 1 or more sentences of lorem ipsum text
  • random_number draws 1 or more random numbers between min and max

@sidewaysthought sidewaysthought requested review from a team April 30, 2023 02:12
@johnseth97
Copy link
Contributor

It looks like there are some typing errors when AutoGPT doesn't pass the right datatype. Since python can handle type conversion itself, make the args type agnostic

Input:generate a random number
SYSTEM:  Human feedback: generate a random number
 THOUGHTS:  I will generate a random number for the user.
REASONING:  As an AI, I can perform simple tasks like generating random numbers for the user. This will help me to be useful to the user and provide value.
PLAN: 
-  Generate a random number for the user
CRITICISM:  I need to ensure that the random number I generate is truly random and that I am not generating the same number multiple times.
NEXT ACTION:  COMMAND = random_number ARGUMENTS = {'min': '1', 'max': '100', 'count': '1'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command random_number returned: Error: '<=' not supported between instances of 'int' and 'str'
 THOUGHTS:  I will generate a random number for the user.
REASONING:  As an AI, I can perform simple tasks like generating random numbers for the user. This will help me to be useful to the user and provide value.
PLAN: 
-  Generate a random number for the user
CRITICISM:  I need to ensure that the random number I generate is truly random and that I am not generating the same number multiple times.
NEXT ACTION:  COMMAND = random_number ARGUMENTS = {'min': 1, 'max': 100, 'count': 1}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command random_number returned: [11]

Copy link
Contributor

@johnseth97 johnseth97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

…istakes; make arguments more tolerant of GPT madness.
Copy link
Contributor

@johnseth97 johnseth97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test output for:

Random Number:

NEXT ACTION:  COMMAND = Random Number ARGUMENTS = {'min': '0', 'max': '100', 'count': '10'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command Random Number returned: [4, 77, 33, 84, 20, 38, 24, 61, 12, 14]

UUID

NEXT ACTION:  COMMAND = make_uuids ARGUMENTS = {'count': '5'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command make_uuids returned: ["4116864c-7fe6-4d9d-82df-14563c047994", "7e989c21-baf0-43b1-962f-cabc5fb9ab3d", "21dbef81-d657-4546-8d89-11ed6272902d", "babe2044-0285-4769-8628-e662dab4f98b", "54dac78b-f1f4-44b5-ba4e-6588529fd200"]

Generate String

NEXT ACTION:  COMMAND = generate_string ARGUMENTS = {'length': '10', 'count': '5'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command generate_string returned: ["pxUxqyGJOJ", "ciUQskmOqU", "xBJKlTPmXo", "KYqUURUHFZ", "XUYvcvBdhu"]

Generate Password:

NEXT ACTION:  COMMAND = generate_password ARGUMENTS = {'length': '12', 'count': '1'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command generate_password returned: ["So7hmit_@lpl"]

Generate Placeholder

NEXT ACTION:  COMMAND = generate_placeholder_text ARGUMENTS = {'sentences': '5'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= 
SYSTEM:  Command generate_placeholder_text returned: ["Mollit aliquip consequat officia.", "Nostrud exercitation anim sint dolor, reprehenderit enim cillum sed proident ut velit.", "Laborum fugiat veniam est quis.", "Aute ullamco reprehenderit sit mollit amet.", "Ea non officia ut aliqua aliquip exercitation nisi, lorem incididunt ex ipsum."]

Success!

@johnseth97 johnseth97 requested a review from ntindle May 1, 2023 00:58
@ntindle ntindle self-assigned this May 2, 2023
@ntindle ntindle added this to the v0.3.1 release milestone May 2, 2023
@ntindle ntindle merged commit 8584f31 into Significant-Gravitas:master May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants