Squiso je brezplačno, zmogljivo orodje za avtomatizacijo, ki vam omogoča prilagajanje toka Twitch s preprostimi skripti.

Kako pozdraviti prve klepete s smešnim odzivom umetne inteligence

Ta primer skripta posluša vsa sporočila v klepetu Twitch in če je sporočilo njihovo prvo sporočilo v vašem kanalu (uvodno sporočilo), bo ustvaril smešen pozdravni odgovor AI.

Oglejte si video

Primer skripta

import com.squiso.*; import com.squiso.exception.*; import com.squiso.scripting.*; import com.squiso.scripting.data.*; import com.squiso.keyboard.*; import com.squiso.twitch.*; import com.squiso.datatypes.*; import com.squiso.utils.*; // Important - Please do not change the row below - otherwise you will get a compilation error! public class Script_Example extends SquisoScript { @Override public void onTwitchChatMessage(OnTwitchChatMessageData data, API api) throws SquisoException { // If the message is not their first time (introduction), end here and do nothing if (!data.isMessageFirstTime()) { return; } SquisoString systemMessage = new SquisoString(""); systemMessage.append("You are an AI in Squiso's Twitch chat."); systemMessage.append("A viewer with the username \"" + data.getUserName() + "\" just entered the chat and wrote for the first time."); systemMessage.append("Generate a funny greeting back to the viewer."); systemMessage.append("Follow the Twitch chat guidelines. "); systemMessage.append("Use same language as the chat message. "); // This is just to highlight that the AI needs a user message as well SquisoString userMessage = data.getMessageText(); // Generate an AI response SquisoString aiResponse = api.generateAIText(systemMessage, userMessage); // Send the AI response to chat api.sendTwitchChatMessage(aiResponse); } }