Properties that control what is returned.

interface ReturnOptionProperties {
    generated_tokens?: boolean;
    input_text?: boolean;
    input_tokens?: boolean;
    token_logprobs?: boolean;
    token_ranks?: boolean;
    top_n_tokens?: number;
}

Properties

generated_tokens?: boolean

Include the list of individual generated tokens. Extra token information is included based on the other flags below.

input_text?: boolean

Include input text in the generated_text field.

input_tokens?: boolean

Include the list of input tokens. Extra token information is included based on the other flags here, but only for decoder-only models.

token_logprobs?: boolean

Include logprob (natural log of probability) for each returned token. Applicable only if generated_tokens == true and/or input_tokens == true.

token_ranks?: boolean

Include rank of each returned token. Applicable only if generated_tokens == true and/or input_tokens == true.

top_n_tokens?: number

Include top n candidate tokens at the position of each returned token. The maximum value permitted is 5, but more may be returned if there is a tie for nth place. Applicable only if generated_tokens == true and/or input_tokens == true.