You can utilize the Run a Program sub-action to execute scripts with Streamer.bot
stdout from scriptspython from cmd.llama3.1 model in ollama:ollama run llama3.1
data and then create a scripts directory.import sys
import ollama
# Load the prompt from command line arguments
prompt = " ".join(sys.argv[1:])
# Generate text using llama3.1 model
response = ollama.generate(model="llama3.1", prompt=prompt)
# Print the response as a single line, truncated at 500 characters
output = response["response"].replace("\n", " ")
print(output[0:499])
scripts directory in Windows Explorer, Right-Click and open the current location in terminal.pip install ollama
Name to anything you'd like, such as !ollamaCommands list: !ollamaIgnore Internal Messages option

Ollama ExampleCore > Commands > Command Triggered!ollama command we just createdCore > System > Run a ProgramTarget: pythonWorking Directory: path\to\Streamer.bot\data\scriptsArguments: ollama-example.py %rawInput%%rawInput% variable as a python argument.Wait: 1
Twitch > Chat > Send Message to ChannelBot or Broadcaster accountMessage value to %output0%

!ollama command in chat!
Import this code into your Streamer.bot to have the command and action (mostly) set up for you!
U0JBRR+LCAAAAAAABAClVsuO2zYU3QfIP7gGZhcaetpWdqk7aWfVotMmizgLPq40xEikysfYxmD+vaQetmXJRpEuxXN1eHnOvZd8ff9uNptXYPD84+zVf7hPgStwn/PfyxJXeLZ5wma2kVWFBZt/6GKwNU9S+aivT7zWhtPnQmoj62PECyjNpfAh4SJYBEeAgaaK16YDzynln1Z8oh0ibFn2WMUFr2z15cjpQY+9NRFzhgcnwA2Hdivf2pVZDzUwZ37jGBiBLAlRHmUBSmJYI7zEgIJVQMOMxHECYZ9c89s/FiwME2vWQWBSguc0ysIA2dPSMvisZPUbd+qogwvKcakHURd63+9xVZcw2LpQ0tY+pgP1AMXlDh+0026KXTnbZHVUdYRTKahVCoSZQo3iReFUP5fyQs6OpamPh0bZPAhZACmgdI0pStIcI0LCNQoJi3AchWnC8vMDnJlCgeYpTpcoSHGIkpBGKCPLGFGCgxhCFkercPSrOdRewCQIL5Gr1pzs0X2lfD9H304f3wdSjyvrhhz+RPXBdYoY5YxVYSsnuqeay8Z5BK25i/owu1N49yBqa+5Gf+6keuai+IU37Xf/cbv9Q8lC4Upvt49GgasmtSDSbLe+K7bbttv0iAfEyxfcOPv6NtoDc/NZqvs991URB9NmLdfO0TR2xjqjUZKt1oikUY5CTDLCKM4DiMfpAy+ePKubCVeMXF6u9+V/0XndMW5ZzAWDvd9sYO6HW94Z2Pv05nfSGmdAMHagVpCDaxn2iVJpm8a5ohBZLWmeMFe/a7ZGSR6nKFuyDOU0iVdRlJFwRX5EoXAE/H+Jwv9e/7/6zdqmGY4SV8e1BnaG93BH2Me3w3RA0TfN1bGtpVUURr0XXEm1BlVxY4D9rbsBNg1fOQz/oVF2HOY/tT09wE4+jOYsF81NMXGHVLJZDoZCH8fL1D4KCtjf7+uSU242uDZWwdSmpaS4uxYG9LwQUsHP0pzq+zKrNuRBGFACl1Pktb+rtdl4AlA3Irw9N6Io1vAIQnPDXyZPUZSS4HIjZcnkbnQW27BPY8db9eKuxcL81fZZcK18d0C0pM9gHkG9XJTXCdyUvBvxJ9Dwqo8/e8CcXktda7vLqZbKlad/PPgcg0W0SBFxT7VF0uY7fhU1QUkbtJy/f/f2L14ggMXgCQAAYou will still need to create the python script, and update the working directory of the Run a Program sub-action accordingly.
This is just a basic example, but it can be improved in many ways.