OllamaClient.generate

Generates text based on a prompt using the specified model.

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

Parameters

model string

The name of the model to use (e.g., "llama3").

prompt string

The input text to generate from.

options JSONValue

Additional generation options (e.g., temperature, top_k).

stream bool

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

Return Value

Type: JSONValue

A JSONValue object containing the generated text and metadata.

Meta