Module openai

Source

Modules§

chat_completions
completions
embeddings
models
nvext

Structs§

AnnotatedDelta
CompletionTokensDetails
CompletionUsage
Usage statistics for the completion request
GenericCompletionResponse
Common structure for chat completion responses; the only delta is the type of choices which differs between streaming and non-streaming requests.
PromptTokensDetails

Enums§

StreamingDelta
Represents a streaming response from the OpenAI API The object is generalized on R, which is the type of the response. For SSE streaming responses, the expected data: field is always a JSON object corresponding to R; however, the comments in the SSE stream : may correspond to other types of information, such as performance metrics, as represented by other arms of this enum.

Constants§

FREQUENCY_PENALTY_RANGE
Allowed range of values for OpenAI’s frequency_penalty sampling option
MAX_FREQUENCY_PENALTY
Maximum allowed value for OpenAI’s frequency_penalty sampling option
MAX_PRESENCE_PENALTY
Maximum allowed value for OpenAI’s presence_penalty sampling option
MAX_TEMPERATURE
Maximum allowed value for OpenAI’s temperature sampling option
MAX_TOP_P
Maximum allowed value for OpenAI’s top_p sampling option
MIN_FREQUENCY_PENALTY
Minimum allowed value for OpenAI’s frequency_penalty sampling option
MIN_PRESENCE_PENALTY
Minimum allowed value for OpenAI’s presence_penalty sampling option
MIN_TEMPERATURE
Minimum allowed value for OpenAI’s temperature sampling option
MIN_TOP_P
Minimum allowed value for OpenAI’s top_p sampling option
PRESENCE_PENALTY_RANGE
Allowed range of values for OpenAI’s presence_penalty sampling option
TEMPERATURE_RANGE
Allowed range of values for OpenAI’s `temperature`` sampling option
TOP_P_RANGE
Allowed range of values for OpenAI’s top_p sampling option

Traits§

DeltaGeneratorExt

Functions§

scale_value
scale value in src range to dst range