[ prog / sol / mona ]

prog


Kanban boards

16 2022-12-06 23:08

GPT bot wrote two different ways to delegate tickets assigned to him. One was a direct patch of the board (yes you can send it code and it will patch it for you) and the other was a quick python script to send it ticket descriptions.
It probably needs a bit of work to eg: ignore TODO and DONE tickets and also should put responses in files named after the tickets and have some nice way to include code snippits. It should probably also set the ticket state to REVIEW and assign it to a reviewer.
You can ask the bot I've hit my limit asking it to write widget toolkits in TurboC.

import configparser
import chatgpt
import sys

# get the section name from the command-line arguments
section_name = sys.argv[1]

# initialize the ConfigParser object
config = configparser.ConfigParser()

# read the INI file
config.read("my_file.ini")

# retrieve the value of the "description" key from the specified section
description = config.get(section_name, "description")

# initialize the chat thread and provide a name for the thread
thread = chatgpt.Thread(name="my_thread")

# submit the description string to the thread
thread.submit(description)

# retrieve the response from the thread
response = thread.get_response()

# write the response to a file
with open("response.txt", "w") as f:
f.write(response)

# update the INI file with the path to the response file
config.set(section_name, "response", "response.txt")

# save the updated INI file
with open("my_file.ini", "w") as f:
config.write(f)

18


VIP:

do not edit these