OllamaClient.completions

Performs an OpenAI-style text completion.

class OllamaClient
@trusted
JSONValue
completions
(
string model
,
string prompt
,
int maxTokens = 0
,
float temperature = 1.0
,
bool stream = false
)

Parameters

model string

The name of the model to use.

prompt string

The input prompt to complete.

maxTokens int

Maximum number of tokens to generate (0 for unlimited).

temperature float

Sampling temperature (default: 1.0).

stream bool

Whether to stream the response (ignored in this implementation).

Return Value

Type: JSONValue

A JSONValue object in OpenAI-compatible format.

Meta