Completions

interface Completions

Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun completion(request: CompletionRequest): TextCompletion

This is the main endpoint of the API. Returns the predicted completion for the given prompt, and can also return the probabilities of alternative tokens at each position if requested.

Link copied to clipboard
abstract fun completions(request: CompletionRequest): Flow<TextCompletion>

Stream variant of completion.