hank9999
commited on
Commit
·
4052aea
1
Parent(s):
5e790cf
fix(converter): 移除 "AUTO" 模式以避免可能的 400 错误
Browse files- src/anthropic/converter.rs +2 -10
src/anthropic/converter.rs
CHANGED
|
@@ -201,16 +201,8 @@ pub fn convert_request(req: &MessagesRequest) -> Result<ConversionResult, Conver
|
|
| 201 |
}
|
| 202 |
|
| 203 |
/// 确定聊天触发类型
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
if let Some(ref tool_choice) = req.tool_choice {
|
| 207 |
-
if let Some(tc_type) = tool_choice.get("type").and_then(|v| v.as_str()) {
|
| 208 |
-
if tc_type == "any" || tc_type == "tool" {
|
| 209 |
-
return "AUTO".to_string();
|
| 210 |
-
}
|
| 211 |
-
}
|
| 212 |
-
}
|
| 213 |
-
}
|
| 214 |
"MANUAL".to_string()
|
| 215 |
}
|
| 216 |
|
|
|
|
| 201 |
}
|
| 202 |
|
| 203 |
/// 确定聊天触发类型
|
| 204 |
+
/// "AUTO" 模式可能会导致 400 Bad Request 错误
|
| 205 |
+
fn determine_chat_trigger_type(_req: &MessagesRequest) -> String {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
"MANUAL".to_string()
|
| 207 |
}
|
| 208 |
|