#[non_exhaustive]pub enum StreamEventError {
IncompleteCompletion(Box<ResponseEvidence>),
IncompleteStream(Option<Box<ResponseEvidence>>),
ProviderError {
status: Option<u16>,
error: Value,
},
UnexpectedToolCalls,
InvalidStreamEvent(String),
StreamEventsUnsupported,
RequestFailed(MojenticError),
}Expand description
Why a single-turn event stream ended without a completed response.
The variants follow the cross-port reason vocabulary:
incomplete_completion, incomplete_stream, provider_error,
unexpected_tool_calls, invalid_stream_event,
stream_events_unsupported and request_failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IncompleteCompletion(Box<ResponseEvidence>)
The provider finished for a reason other than stop, for example
length. Carries the finish reason, usage, provider model and metadata.
Ollama servers too old to send done_reason always end here.
IncompleteStream(Option<Box<ResponseEvidence>>)
The stream ended without the provider’s terminal marker. Carries the
evidence that arrived before the end (such as model and usage), or
None when none did.
ProviderError
The provider reported an error, either as an error frame in the stream or as a non-success HTTP status.
Fields
UnexpectedToolCalls
The provider streamed a native tool call. The events API supplies no tools and executes none.
InvalidStreamEvent(String)
A frame could not be read as a provider stream event.
StreamEventsUnsupported
The gateway does not implement the events API. No request was sent.
RequestFailed(MojenticError)
Building the request, connecting, or reading the response body failed.
Trait Implementations§
Source§impl Debug for StreamEventError
impl Debug for StreamEventError
Source§impl Display for StreamEventError
impl Display for StreamEventError
Source§impl Error for StreamEventError
impl Error for StreamEventError
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()