noteFromLastSpeech()

wllama
Fabien Benetou 6 months ago
parent bd2df76dd4
commit 825388b59e
  1. 7
      index.html

@ -37,6 +37,11 @@
<script> <script>
function noteFromLastSpeech(){
let text = addedContent.at(-1)?.getAttribute("value")
if (text) noteFromPrompt( text )
}
function noteFromPrompt(prompt){ function noteFromPrompt(prompt){
let y = 1.5 + Math.random() - .5 let y = 1.5 + Math.random() - .5
wllama.createCompletion(prompt, { wllama.createCompletion(prompt, {
@ -565,6 +570,8 @@ setTimeout( _ => {
<a-troika-text anchor=left value="jxr noteFromPrompt( 'hi said the penguin' )" target position=" -0.3 1.45 0" rotation="0 40 0" scale="0.1 0.1 0.1"></a-troika-text> <a-troika-text anchor=left value="jxr noteFromPrompt( 'hi said the penguin' )" target position=" -0.3 1.45 0" rotation="0 40 0" scale="0.1 0.1 0.1"></a-troika-text>
<a-troika-text anchor=left value="jxr noteFromLastSpeech()" target position=" -0.3 1.55 0" rotation="0 40 0" scale="0.1 0.1 0.1"></a-troika-text>
</a-scene> </a-scene>
</body> </body>
</script> </script>

Loading…
Cancel
Save