mirror of
https://github.com/wisdgod/cursor-api.git
synced 2025-10-06 23:22:48 +08:00
fix: 重复处理首个 chunk
This commit is contained in:
@@ -125,6 +125,7 @@ impl ErrorResponse {
|
||||
pub enum StreamError {
|
||||
ChatError(ChatError),
|
||||
DataLengthLessThan5,
|
||||
EmptyStream,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for StreamError {
|
||||
@@ -132,6 +133,7 @@ impl std::fmt::Display for StreamError {
|
||||
match self {
|
||||
StreamError::ChatError(error) => write!(f, "{}", error.error.code),
|
||||
StreamError::DataLengthLessThan5 => write!(f, "data length less than 5"),
|
||||
StreamError::EmptyStream => write!(f, "empty stream"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user