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

Model name.

prompt string

Input prompt.

maxTokens int

Maximum tokens to generate (0 = unlimited).

temperature float

Sampling temperature (default 1.0).

stream bool

Whether to stream (not fully supported).

Return Value

Type: JSONValue

A JSONValue in OpenAI Completion format.

Meta