completions


Description:

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

Runs a completions call (OpenAI v1/completions) and returns the result as Response.Generate. Same argument shape as generate() but without system prompt (API has no system).

Parameters:

model

The model name to use

prompt

The text prompt (required)

options

Optional Call.Options; used as fallback for max_tokens, temperature, etc.

cancellable

Optional cancellable

Returns:

Response.Generate with choices list and response = first choice; usage flattened.