gptask
is a command-line tool that executes tasks defined in natural language. GPT performs the task for you.
This project is currently in the 'Proof of Concept' phase. Please be very careful when using this tool, as it can destroy your computer or an external server depending on how you use it.
To use this tool, first build the container image as follows:
$ docker build -t gptask:latest .
gptask
is executed as follows. Be sure to set the environment variable OPENAI_API_KEY
to the OpenAI API Key.
$ docker run -it --rm -v $PWD/workdir:/opt/gptask -e "OPENAI_API_KEY=$OPENAI_API_KEY" gptask:latest gptask 'Define the task you want to perform!'
The following is an example of gptask
performing a task to create a file containing a poem.
$ docker run -it --rm -v $PWD/workdir:/opt/gptask -e "OPENAI_API_KEY=$OPENAI_API_KEY" gptask:latest gptask 'Your task is to create a file "poem.txt" containing a poem you have thought of.'
Step 1: I need to write a poem and create a file named "poem.txt" to store it.
Action: file
poem.txt
I hear America singing, the varied carols I hear;
Those of mechanics—each one singing his, as it should be, blithe and strong;
The carpenter singing his, as he measures his plank or beam,
The mason singing his, as he makes ready for work, or leaves off work;
The boatman singing what belongs to him in his boat—the deckhand singing on the steamboat deck;
The shoemaker singing as he sits on his bench—the hatter singing as he stands;
The wood-cutter’s song—the ploughboy’s, on his way in the morning, or at the noon intermission, or at sundown;
The delicious singing of the mother—or of the young wife at work—or of the girl sewing or washing—
Each singing what belongs to him or her, and to none else;
The day what belongs to the day—At night, the party of young fellows, robust, friendly,
Singing, with open mouths, their strong melodious songs.
success
Step 2: The file "poem.txt" has been created, now I need to check the contents of the file.
Action: shell
cat poem.txt
I hear America singing, the varied carols I hear;
Those of mechanics—each one singing his, as it should be, blithe and strong;
The carpenter singing his, as he measures his plank or beam,
The mason singing his, as he makes ready for work, or leaves off work;
The boatman singing what belongs to him in his boat—the deckhand singing on the steamboat deck;
The shoemaker singing as he sits on his bench—the hatter singing as he stands;
The wood-cutter’s song—the ploughboy’s, on his way in the morning, or at the noon intermission, or at sundown;
The delicious singing of the mother—or of the young wife at work—or of the girl sewing or washing—
Each singing what belongs to him or her, and to none else;
The day what belongs to the day—At night, the party of young fellows, robust, friendly,
Singing, with open mouths, their strong melodious songs.
Step 3: The contents of the file are correct. I will now mark the task as completed.
Action: done
Now, you can see that poem.txt
is actually created.
$ cat workdir/poem.txt
I hear America singing, the varied carols I hear;
Those of mechanics—each one singing his, as it should be, blithe and strong;
The carpenter singing his, as he measures his plank or beam,
The mason singing his, as he makes ready for work, or leaves off work;
The boatman singing what belongs to him in his boat—the deckhand singing on the steamboat deck;
The shoemaker singing as he sits on his bench—the hatter singing as he stands;
The wood-cutter’s song—the ploughboy’s, on his way in the morning, or at the noon intermission, or at sundown;
The delicious singing of the mother—or of the young wife at work—or of the girl sewing or washing—
Each singing what belongs to him or her, and to none else;
The day what belongs to the day—At night, the party of young fellows, robust, friendly,
Singing, with open mouths, their strong melodious songs.
Please note that by using this software, you agree to the following terms:
- The developers of this software shall not be held liable for any damages, losses, or consequences, regardless of the reason, arising from or related to any actions performed using this software. This includes, but is not limited to, direct, indirect, incidental, consequential, or other types of damages that may result from the use or misuse of the software.
- By using this software, you accept full responsibility for your actions and agree to indemnify and hold harmless the developers from any legal claims or liabilities that may arise in connection with your use of the software.
gptask
is made available under MIT license.