mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
* refactor(framer): replace Framer trait with tokio-util codecs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(framer): port SSE and AWS event stream framing to codecs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(rust): drop clone on Copy capabilities in messages request test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(rust): use field init shorthand in messages request test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
21 lines
670 B
Rust
21 lines
670 B
Rust
#[cfg(feature = "sse")]
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum SseError {
|
|
#[error("body stream failed: {0}")]
|
|
Body(#[from] std::io::Error),
|
|
#[error("SSE field is not UTF-8: {0}")]
|
|
InvalidUtf8(#[from] std::str::Utf8Error),
|
|
}
|
|
|
|
#[cfg(feature = "aws")]
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum EventStreamError {
|
|
#[error("body stream failed: {0}")]
|
|
Body(#[from] std::io::Error),
|
|
#[error("invalid AWS EventStream frame length: {0}")]
|
|
InvalidLength(usize),
|
|
#[error("truncated AWS EventStream frame")]
|
|
Truncated,
|
|
#[error("malformed AWS EventStream frame: {0}")]
|
|
Malformed(#[from] aws_smithy_eventstream::error::Error),
|
|
}
|