by funerr on 6/6/23, 6:15 AM with 2 comments
by peter_l_downs on 6/7/23, 2:42 AM
I ask because in the example, you ask it to find bugs in a script that immediately fails when you run it. So I'm not sure what the value add is here.
$ ipython
Python 3.11.3 (main, Apr 7 2023, 21:05:46) [Clang 14.0.0 (clang-1400.0.29.202)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.13.2 -- An enhanced Interactive Python. Type '?' for help.
In [1]: def greet(name, age):
...: print("hello, my name is {} and I am {} years old".format(name))
...:
In [2]: greet("John", 25)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[2], line 1
----> 1 greet("John", 25)
Cell In[1], line 2, in greet(name, age)
1 def greet(name, age):
----> 2 print("hello, my name is {} and I am {} years old".format(name))
IndexError: Replacement index 1 out of range for positional args tuple
EDIT: For anyone else who is wondering, this is just:system prompt:
Find bugs in the user's code.
- Format results as JSON like so:
[{"line":1,"reason":"short reason", "type":"type"},...]
- It is better to return an empty array than a mistake (not really a bug).
user prompt: Here is my code:
${source_code}
JSON Result:
@funerr why would you even create this and post it here? Is it just to try to market your newsletter? Who do you think would look at this and be impressed?