' ---------------------------------------------- ' Commands to Theremino_OLLAMA ' ---------------------------------------------- Variable Numeric Slot_Commands = 85 Variable Numeric Slot_Responses = 86 Button 1 Label Stop_ Button 3 Label SetModel Button 4 Label SetRandomness Button 6 Label SendMessage1 Button 7 Label SendMessage2 Button 8 Label SendMessage3 Button 10 Label NewChat Controls OpenTextBox Loop Stop Label Loop If SlotText(Slot_Responses) <> "" s1 = SlotText(Slot_Responses) If StringContains(s1, "<<>>") 'Controls ClearTextBox Print s1 'SlotText(Slot_Responses) = "" EndIf EndIf Goto Loop ' ============================================================= ' SEND COMMAND (default timeout = 0.5 Sec) ' ============================================================= Label SendCommand Variable Numeric SC1 '<-- Parameter Destinat.-Slot Variable String SC2 '<-- Parameter Command-String Variable Numeric SC3 = 0.5 '<-- The timeout in seconds Variable Numeric SC4 SlotText SC1 = SC2 For SC4 = 0.1 To SC3 Step 0.1 If SlotText(SC1) = "" Exit EndIf Wait Seconds 0.1 Next Return Label Stop_ SendCommand(Slot_Commands)("Stop") Return Label SetModel SendCommand(Slot_Commands)("SetModel " + Int(Rnd * 10)) Return Label SetRandomness SendCommand(Slot_Commands)("SetRandomness " + Int(Rnd * 150)) Return Label SendMessage1 SendCommand(Slot_Commands)("SendPrompt" + " How are you ?") Return Label SendMessage2 SendCommand(Slot_Commands)("SendPrompt" + " What time is it ?") Return Label SendMessage3 SendCommand(Slot_Commands)("SendPrompt" + " What is your name ?") Return Label NewChat Controls ClearTextBox SendCommand(Slot_Commands)("NewChat") Return 'BOOKMARKS 'EDITEDLINES 29 1 27 2 53 3 8 4 10 5 11 6 13 7 14 8 15 9 17 10