fix: resolve clippy lint warnings
- Remove unused import AsyncBufReadExt in compatible.rs - Remove unused mut keywords from response and tx - Remove unused variable 'name' - Prefix unused parameters with _ in traits.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4070131bb8
commit
1fc5ecc4ff
2 changed files with 5 additions and 9 deletions
|
|
@ -277,15 +277,11 @@ fn parse_sse_line(line: &str) -> StreamResult<Option<String>> {
|
|||
|
||||
/// Convert SSE byte stream to text chunks.
|
||||
async fn sse_bytes_to_chunks(
|
||||
mut response: reqwest::Response,
|
||||
response: reqwest::Response,
|
||||
count_tokens: bool,
|
||||
) -> stream::BoxStream<'static, StreamResult<StreamChunk>> {
|
||||
use tokio::io::AsyncBufReadExt;
|
||||
|
||||
let name = "stream".to_string();
|
||||
|
||||
// Create a channel to send chunks
|
||||
let (mut tx, rx) = tokio::sync::mpsc::channel::<StreamResult<StreamChunk>>(100);
|
||||
let (tx, rx) = tokio::sync::mpsc::channel::<StreamResult<StreamChunk>>(100);
|
||||
|
||||
tokio::spawn(async move {
|
||||
// Buffer for incomplete lines
|
||||
|
|
|
|||
|
|
@ -308,9 +308,9 @@ pub trait Provider: Send + Sync {
|
|||
fn stream_chat_with_history(
|
||||
&self,
|
||||
messages: &[ChatMessage],
|
||||
model: &str,
|
||||
temperature: f64,
|
||||
options: StreamOptions,
|
||||
_model: &str,
|
||||
_temperature: f64,
|
||||
_options: StreamOptions,
|
||||
) -> stream::BoxStream<'static, StreamResult<StreamChunk>> {
|
||||
let system = messages
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue