User avatar
🇨🇦Samuel Proulx🇨🇦
@fastfinge@interfree.ca
@jscholes I assume because the gameplay transcripts continued in that way after restart. If I was writing professional code, rather than slapping together a quick script for a blog entry, I could have solved this with Stop sequences: a way to tell the API to prevent the model from generating anything more when the Stop sequence is generated. For this application I could have used newline as the Stop sequence and it probably would have worked. I mean effectively that's what I did, by only passing line 1 to the interpreter anyway. But that would have been less interesting; the AI would have just died and restarted a couple times, then quit. Another technique is to give the AI JSON, and require valid JSON as output. If you don't get correctly formed JSON, you know the AI has gone off the rails and can make it retry.