pub struct TaskCompletion<'a> {
    pub prompt: Prompt<'a>,
    pub maximum_tokens: u32,
    pub sampling: Sampling,
}
Expand description

Completes a prompt. E.g. continues a text.

Fields

prompt: Prompt<'a>

The prompt (usually text) to be completed. Unconditional completion can be started with an empty string. The prompt may contain a zero shot or few shot task.

maximum_tokens: u32

The maximum number of tokens to be generated. Completion will terminate after the maximum number of tokens is reachedIncrease this value to allow for longer outputs. A text is split into tokens. Usually there are more tokens than words. The total number of tokens of prompt and maximum_tokens depends on the model.

sampling: Sampling

Sampling controls how the tokens (“words”) are selected for the completion.

Trait Implementations

Output returned by Client::execute

Expected answer of the Aleph Alpha API

Prepare the request for the Aleph Alpha API. Authentication headers can be assumed to be already set. Read more

Parses the response of the server into higher level structs for the user.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more