#[non_exhaustive]pub enum RequestError {
#[non_exhaustive] EmptySystemInstructionText {
index: usize,
},
#[non_exhaustive] NonTextSystemInstruction {
index: usize,
kind: i64,
},
#[non_exhaustive] UnknownSystemInstruction {
index: usize,
kind: i64,
},
ToolExchangeNotClosed,
EmptyToolCallId,
#[non_exhaustive] EmptyToolCallName {
call_id: String,
},
#[non_exhaustive] DuplicateToolCallId {
call_id: String,
},
EmptyToolResultId,
#[non_exhaustive] EmptyToolResultName {
call_id: String,
},
#[non_exhaustive] OrphanToolResult {
call_id: String,
},
#[non_exhaustive] ToolResultNameMismatch {
call_id: String,
expected: String,
actual: String,
},
#[non_exhaustive] UnresolvedToolCalls {
count: usize,
},
}Expand description
A stable failure while projecting owned transcript items into a model request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]EmptySystemInstructionText
A system-instruction text block was empty.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]NonTextSystemInstruction
A system-instruction block had a known, non-text kind.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnknownSystemInstruction
A system-instruction block had no portable interpretation.
Fields
This variant is marked as non-exhaustive
ToolExchangeNotClosed
A new user, system, or assistant item appeared before all preceding calls closed.
EmptyToolCallId
An assistant tool call had an empty correlation identity.
#[non_exhaustive]EmptyToolCallName
An assistant tool call had an empty tool name.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]DuplicateToolCallId
An assistant tool-call identity was reused anywhere in the request.
Fields
This variant is marked as non-exhaustive
EmptyToolResultId
A model-visible tool result had an empty correlation identity.
#[non_exhaustive]EmptyToolResultName
A model-visible tool result had an empty tool name.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]OrphanToolResult
A model-visible tool result did not correspond to a pending call.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ToolResultNameMismatch
A model-visible result named a different tool from its pending call.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnresolvedToolCalls
End-of-history arrived with calls that had no model-visible results.
Trait Implementations§
Source§impl Clone for RequestError
impl Clone for RequestError
Source§impl Debug for RequestError
impl Debug for RequestError
Source§impl Display for RequestError
impl Display for RequestError
impl Eq for RequestError
Source§impl Error for RequestError
impl Error for RequestError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()