Version 0.3 of GrapeTwine improves things a whole lot! First off, GrapeTwine no longer uses the ChatGPT API. Instead, you'll need to host your own server which utilizes a <a href="https://huggingface.co/spaces">Hugging Face Space</a>. More information on how to do this, visit the official <a href="https://huggingface.co/spaces">GrapeTwine wiki</a>.
<<speech "Jimmy">>Hey Bob, tell me a joke!<</speech>>
<<speech "Bob">><<generate-text "Tell me a joke" "$response" "You are a comedian" 128 0.9 0.9>><</speech>>
Just about all requirements are now filled in as arguements in the widget:
<code><< generate-text "Tell me a joke" "$response" "You are a comedian" 128 0.9 0.9 >></code>
This example sets the prompt, Twine variable, system message, max tokens, temperature, and top-p values.
<<button [[Next Example->Conversation Example #2]]>><</button>>
<<set $passage to "">>v0.3
Examples:
[[Conversation Example #1]]
[[Conversation Example #2]]
[[Setting Description Example]]<img src="Img\logo.png" width="400">
GrapeTwine is a <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">FOSS</a> set of tools/widgets for twine sugarcube, that makes it easier to implement AI into your text based game. This project includes all of the widgets, as well as a few examples of how to implement it, which you can navigate from the sidebar to the left.
Currently, GrapeTwine supports any text generation model that you find hosted on a <a href="https://huggingface.co/spaces">Hugging Face Space</a>.
Developed by <a href="https://github.com/BwendyGames">BwendyDev</a>
This example includes a speech text box widget, made by <a href="https://www.patreon.com/HiEv">Hiev</a>
<a href="https://github.com/BwendyGames/GrapeTwine">Source code</a><<speech "Bob">>Hey Jimmy, can you tell me a story?<</speech>>
<<speech "Jimmy">><<generate-text "Hey Jimmy, can you tell me a lighthearted story?" "$response" "You are Jimmy, just a cool guy. Keep things casual and fun." 128 0.9 0.9>><</speech>>
<code><< generate-text "Hey Jimmy, can you tell me a lighthearted story?" "$response" "You are Jimmy, just a cool guy. Keep things casual and fun." 128 0.9 0.9 >></code>
<<button [[Next Example->Setting Description Example]]>><</button>>
<<generate-text "Describe a fantasy setting" "$joke" "You are a omnipotent narrator." 128 0.9 0.9>>
<code><< generate-text "Describe a fantasy setting" "$response" "You are a omnipotent narrator." 128 1.0 1.0>></code>