process static method

Future<AiPromptResult> process(
  1. String prompt, {
  2. String? profile,
  3. String? model,
  4. int timeoutSeconds = 120,
})

Expand a prompt using the local Ollama model.

prompt — the short prompt text to expand (required). profile — profile key to use (null → default profile). model — model config key to use (null → default model). timeoutSeconds — max wait time (default 120s).

Returns an AiPromptResult with the expanded text and metadata.

Implementation

static Future<AiPromptResult> process(
  String prompt, {
  String? profile,
  String? model,
  int timeoutSeconds = 120,
}) async {
  final result = await _adapter.sendRequest(
    'localLlm.processVce',
    {'prompt': prompt, 'profile': ?profile, 'model': ?model},
    scriptName: 'AiPromptApi.process',
    timeout: Duration(seconds: timeoutSeconds),
  );
  return AiPromptResult.fromJson(result);
}