pub enum Error {
Show 22 variants
IOError(Error),
StreamingRequired(String),
StreamingNotSupported(String),
SerdeJsonError(Error),
TimeComponentRangeError(ComponentRange),
ReqwestError(Error),
InvalidHeaderName(String, InvalidHeaderName),
InvalidHeaderValue(String, InvalidHeaderValue),
EnvVarError(String, VarError),
ChatCompletionRequestBuilderError(ChatCompletionRequestBuilderError),
ChatCompletionRequestStreamOptionsBuilderError(ChatCompletionRequestStreamOptionsBuilderError),
ChatCompletionResponseBuilderError(ChatCompletionResponseBuilderError),
ChatCompletionResponseMessageBuilderError(ChatCompletionResponseMessageBuilderError),
ChatCompletionChunkChoiceBuilderError(ChatCompletionChunkChoiceBuilderError),
ChatCompletionChoiceBuilderError(ChatCompletionChoiceBuilderError),
ChatCompletionToolFunctionDefinitionBuilderError(ChatCompletionToolFunctionDefinitionBuilderError),
ChatCompletionUsageBuilderError(UsageBuilderError),
AzureOpenAIClientBuilderError(ClientBuilderError),
OpenAIClientBuilderError(ClientBuilderError),
Cancelled,
UnknownError(String),
OtherError(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
The main error type for the AI crate
.
Variants§
IOError(Error)
Represents errors that occur during IO operations.
StreamingRequired(String)
StreamingNotSupported(String)
SerdeJsonError(Error)
Represents errors that occur during JSON serialization/deserialization.
TimeComponentRangeError(ComponentRange)
An error type indicating that a component provided to a method was out of range, causing a failure.
ReqwestError(Error)
Represents errors that occur during HTTP operations.
InvalidHeaderName(String, InvalidHeaderName)
Represent invalid header name.
InvalidHeaderValue(String, InvalidHeaderValue)
Represent invalid header values.
EnvVarError(String, VarError)
The error type for operations interacting with environment variables.
Possibly returned from std::env::var()
.
ChatCompletionRequestBuilderError(ChatCompletionRequestBuilderError)
Represents crate::chat_completions::ChatCompletionRequestBuilder
errors.
ChatCompletionRequestStreamOptionsBuilderError(ChatCompletionRequestStreamOptionsBuilderError)
Represents crate::chat_completions::ChatCompletionRequestStreamOptionsBuilderError
errors.
ChatCompletionResponseBuilderError(ChatCompletionResponseBuilderError)
Represents crate::chat_completions::ChatCompletionResponseBuilder
errors.
ChatCompletionResponseMessageBuilderError(ChatCompletionResponseMessageBuilderError)
Represents crate::chat_completions::ChatCompletionResponseMessageBuilderError
errors.
ChatCompletionChunkChoiceBuilderError(ChatCompletionChunkChoiceBuilderError)
Represents crate::chat_completions::ChatCompletionChunkChoiceBuilderError
errors.
ChatCompletionChoiceBuilderError(ChatCompletionChoiceBuilderError)
Represents crate::chat_completions::ChatCompletionChoiceBuilder
errors.
ChatCompletionToolFunctionDefinitionBuilderError(ChatCompletionToolFunctionDefinitionBuilderError)
Represents crate::chat_completions::ChatCompletionToolFunctionDefinitionBuilder
errors.
ChatCompletionUsageBuilderError(UsageBuilderError)
Represents crate::chat_completions::UsageBuilderError
errors.
AzureOpenAIClientBuilderError(ClientBuilderError)
Represents crate::clients::azure_openai::ClientBuilder
errors.
OpenAIClientBuilderError(ClientBuilderError)
Represents crate::clients::openai::ClientBuilder
errors.
Cancelled
The operation was cancelled
UnknownError(String)
Represents errors that are uknown or not yet categorized.
OtherError(Box<dyn Error + Send + Sync + 'static>)
Catches any other error types that don’t fit into the above categories. Uses a boxed trait object to support a wide range of error types.