mirror of
https://github.com/katanemo/plano.git
synced 2026-05-09 07:42:43 +02:00
cargo clippy (#660)
This commit is contained in:
parent
c75e7606f9
commit
ca95ffb63d
62 changed files with 1864 additions and 1187 deletions
|
|
@ -133,9 +133,7 @@ impl ResponseHandler {
|
|||
let response_headers = llm_response.headers();
|
||||
let is_sse_streaming = response_headers
|
||||
.get(hyper::header::CONTENT_TYPE)
|
||||
.map_or(false, |v| {
|
||||
v.to_str().unwrap_or("").contains("text/event-stream")
|
||||
});
|
||||
.is_some_and(|v| v.to_str().unwrap_or("").contains("text/event-stream"));
|
||||
|
||||
let response_bytes = llm_response
|
||||
.bytes()
|
||||
|
|
@ -164,7 +162,7 @@ impl ResponseHandler {
|
|||
match transformed_event.provider_response() {
|
||||
Ok(provider_response) => {
|
||||
if let Some(content) = provider_response.content_delta() {
|
||||
accumulated_text.push_str(&content);
|
||||
accumulated_text.push_str(content);
|
||||
} else {
|
||||
info!("No content delta in provider response");
|
||||
}
|
||||
|
|
@ -174,7 +172,7 @@ impl ResponseHandler {
|
|||
}
|
||||
}
|
||||
}
|
||||
return Ok(accumulated_text);
|
||||
Ok(accumulated_text)
|
||||
} else {
|
||||
// If not SSE, treat as regular text response
|
||||
let response_text = String::from_utf8(response_bytes.to_vec()).map_err(|e| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue