#GPT-3 for automation, not generation

14 messages · Page 1 of 1 (latest)

outer bough
#

GPT-3 + Command Line = Lots of possibilities, especially because the command line is such a versatile way to interact with the computer. Here, I use GPT-3 to fetch the content of a page, parse the page with BeautifulSoup, and output the title. It can adapt to its past mistakes and use stdout and stderr when constructing its responses. (I think it's pretty cool!)

Try it yourself with the Git repo https://github.com/myfatemi04/gpt3-automation (read the notes, there are some features like Bing search and text parsing that require more steps if you want to enable them)

GitHub

Automating tasks with GPT-3. Contribute to myfatemi04/gpt3-automation development by creating an account on GitHub.

#

GPT-3 for automation, not generation

outer bough
#

Another example:

User: write a program to generate the parabola y=x^2 + 5, with some random noise added to it. save it to parabola_noise.py.
Assistant: Executing: echo "(...code...)" > parabola_noise.py 

Assistant: Program written to parabola_noise.py. 

User: run the program
Assistant: Executing: python3 parabola_noise.py 

Command: python3 parabola_noise.py
Command line (Only seen by Assistant):


Assistant: Program executed. Parabola with noise image generated. 

User: add to the program a section that uses curve fitting to estimate the parameters of the parabola.
Assistant: Executing: echo "import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit

def parabola(x, a, b, c):
  return a*x**2 + b*x + c

x = np.linspace(-10, 10, 1000)
y = parabola(x, 1, 0, 5) + np.random.normal(0, 0.5, 1000)

parameters, covariance = curve_fit(parabola, x, y)

plt.plot(x, y)
plt.plot(x, parabola(x, *parameters))
plt.show()" > parabola_noise.py 

Assistant: Program written to parabola_noise.py. 

User: run the progrma
Assistant: Executing: python3 parabola_noise.py

Traceback (most recent call last):
  File "parabola_noise.py", line 3, in <module>
    from scipy.optimize import curve_fit
ModuleNotFoundError: No module named 'scipy'

Assistant: Program failed to execute. Scipy module not found. 

User: you can import it with pip
Assistant: Executing: pip3 install scipy 

Collecting scipy
<...>
Successfully installed scipy-1.9.3

Assistant: Scipy module installed. 

User: run the program
Assistant: Executing: python3 parabola_noise.py 

Assistant: Program executed. Parabola with noise and curve fitting image generated. 

User: 

eternal harness
#

@outer bough Hello, can you direct me how to use GPT-3 + Command Line?

modern wren
#

+1

outer bough
#

Sure @eternal harness @modern wren

#

I'll make a git repo

eternal harness
#

What is the file should I paste these codes to?

eternal harness
outer bough
#

Git repo ( @tawdry apex @eternal harness @modern wren )

eternal harness
#

Thank you.

modern wren
hollow sonnet
#

Its quite the obstacle, getting this setup to actually output code. Seems to have little to know ability to write much. Is this maybe a mac/windows issue?