OllamaClient.chatCompletions

Performs an OpenAI-style chat completion.

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

Parameters

model string

The name of the model to use.

messages Message[]

An array of Message structs representing the chat history.

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