Is your feature request related to a problem? Please describe.
The generate method in the TextGenerator class has gotten out of hand and is hard to read. It badly needs to be refactored.
Describe the solution you'd like
Given that it's an issue of readability, nested functions within the method seem entirely reasonable here. It just needs to be better organized to make editing the prompt easier in the future.
Describe alternatives you've considered
Additional methods could be added to the class rather than nested functions, but given those functions wouldn't be used outside of the generate method, I don't think that's the best option here.
Is your feature request related to a problem? Please describe. The
generate
method in theTextGenerator
class has gotten out of hand and is hard to read. It badly needs to be refactored.Describe the solution you'd like Given that it's an issue of readability, nested functions within the method seem entirely reasonable here. It just needs to be better organized to make editing the prompt easier in the future.
Describe alternatives you've considered Additional methods could be added to the class rather than nested functions, but given those functions wouldn't be used outside of the
generate
method, I don't think that's the best option here.Additional context N/A