joshjaysalazar / IntelliCaster

An AI race commentator for iRacing
GNU General Public License v3.0
3 stars 1 forks source link

Refactor the commentary generate method #84

Closed joshjaysalazar closed 7 months ago

joshjaysalazar commented 7 months ago

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.

Additional context N/A