top | item 38661633

(no title)

jayunit | 2 years ago

Played it for a bit - very cool! Is there a way in GPTs to use the Python variables to control the prompts? Curious how that part works.

discuss

order

ilaksh|2 years ago

Thanks.

You just check the Analysis/Interpreter box and tell it to how and when to use Python in the GPT instructions.

I put a mini Python lib for rolling dice and skill checks in the GPT instructions and just enabled the Analysis or whatever checkbox. And I told it to run the code in the beginning to initialize and use the functions for dice rolls etc.

It can write and call functions on the fly, but I wrote them ahead of time and have it call the library functions to reduce the amount of code needed to the minimum to try to speed things like dice rolls up.