feat(agent): 移除未使用的导入并简化条件表达式
This commit is contained in:
@@ -21,7 +21,7 @@ use tracing::{debug, error, info, warn};
|
||||
use super::{LlmProvider, ProviderCapabilities, ProviderFeatures};
|
||||
use crate::llm::error::LlmError;
|
||||
use crate::llm::types::message::{ContentBlock, ContentBlockType, Message};
|
||||
use crate::llm::types::request_v2::{MessageRequest, ThinkingConfig};
|
||||
use crate::llm::types::request_v2::MessageRequest;
|
||||
use crate::llm::types::response_v2::{
|
||||
MessageResponse, PartialMessageResponse, PartialUsage, StopReason, StreamEvent,
|
||||
};
|
||||
@@ -193,7 +193,7 @@ impl AnthropicProvider {
|
||||
.json(&body)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| Self::map_reqwest_error(e))?;
|
||||
.map_err(Self::map_reqwest_error)?;
|
||||
|
||||
let status = response.status();
|
||||
if !status.is_success() {
|
||||
@@ -229,7 +229,7 @@ impl AnthropicProvider {
|
||||
.json(&body)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| Self::map_reqwest_error(e))?;
|
||||
.map_err(Self::map_reqwest_error)?;
|
||||
|
||||
let status = response.status();
|
||||
if !status.is_success() {
|
||||
|
||||
Reference in New Issue
Block a user