Background for Skyrim SE
Member of the POW_functions script
intfunctionOllamaGenerate(stringmodel="", stringprompt, intmaxLineWidth=0)NativeGlobal

Description

Documentation Comment

Starts an asynchronous AI generation request that runs in the background
Configuration is auto-detected based on calling script name:

  • If script is "MyMod_BookGen", looks for "Data/SKSE/Plugins/MyMod_POW.toml"
  • Falls back to POW.toml if no mod-specific config exists

Parameters:
model - Ollama model name (e.g. "llama3:8b"). If empty, uses model from config file
prompt - Input text for generation
maxLineWidth - Characters per line for text wrapping (default = 0 (no wrap), 20 fits properly in vanilla books)

Returns callback ID to track this specific request


Parameters

  1. stringmodel=""

  2. stringprompt

  3. intmaxLineWidth=0


Examples

Auto-Generated Example

string myString__model
string myString__prompt
int myInt__maxLineWidth

int returnedValue = POW_functions.OllamaGenerate(myString__model, myString__prompt, myInt__maxLineWidth)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.