OllamaClient.chat

Engages in a chat interaction using the specified model and message history.

class OllamaClient
JSONValue
chat
(
string model
,,
JSONValue options = JSONValue.init
,
bool stream = false
)

Parameters

model string

The name of the model to use.

messages Message[]

An array of Message structs representing the chat history.

options JSONValue

Additional chat options (e.g., temperature).

stream bool

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

Return Value

Type: JSONValue

A JSONValue object containing the chat response and metadata.

Meta