Learn R Programming

EnTraineR (version 1.0.0)

trainer_core_llm_generate: LLM generation helper for TraineR

Description

Thin wrapper around the chosen LLM backend. By default, uses ollamar if installed; otherwise returns only the prompt so the caller can still inspect it without failing.

Usage

trainer_core_llm_generate(model, prompt, engine = c("ollamar", "none"), ...)

Value

A list with elements prompt, response, model, and engine. If the backend isn't available, response is NULL.

Arguments

model

Character scalar, model name (e.g., "llama3").

prompt

Character scalar, the prompt to send.

engine

Character scalar, backend engine. Currently "ollamar" or "none". If "none" or if the backend is not available, returns the prompt only.

...

Passed to the backend generator.