generate


Description:

public async Generate generate (string model, string prompt, string system = "", Options? options = null, Cancellable? cancellable = null) throws Error

Generates a response for the provided prompt.

Uses the /api/generate endpoint to generate a response without maintaining conversation history. This is useful for simple prompt- response scenarios.

Parameters:

model

The model name to use for generation

prompt

The text prompt to generate a response for

system

Optional system prompt

options

Optional Call.Options for the generate request

cancellable

Optional cancellable for cancelling the request

Returns:

Response.Generate object with the generated response and metadata

Since:

1.0