修改中转站
This commit is contained in:
@@ -204,15 +204,6 @@ pub fn apply_relay_station_to_config(station: &RelayStation) -> Result<(), Strin
|
||||
"packycode" => {
|
||||
// PackyCode 使用原始配置,不做特殊处理
|
||||
}
|
||||
"newapi" | "oneapi" => {
|
||||
// NewAPI 和 OneAPI 兼容 OpenAI 格式,不需要特殊处理
|
||||
}
|
||||
"yourapi" => {
|
||||
// YourAPI 可能需要特殊的路径格式
|
||||
if !station.api_url.ends_with("/v1") {
|
||||
config.env.anthropic_base_url = Some(format!("{}/v1", station.api_url));
|
||||
}
|
||||
}
|
||||
"custom" => {
|
||||
// 自定义适配器,使用原始配置
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,6 @@ pub enum RelayStationAdapter {
|
||||
Glm, // 智谱GLM
|
||||
Qwen, // 千问Qwen
|
||||
Kimi, // Kimi k2
|
||||
Newapi, // NewAPI 兼容平台
|
||||
Oneapi, // OneAPI 兼容平台
|
||||
Yourapi, // YourAPI 特定平台
|
||||
Custom, // 自定义简单配置
|
||||
}
|
||||
|
||||
@@ -33,9 +30,6 @@ impl RelayStationAdapter {
|
||||
RelayStationAdapter::Glm => "glm",
|
||||
RelayStationAdapter::Qwen => "qwen",
|
||||
RelayStationAdapter::Kimi => "kimi",
|
||||
RelayStationAdapter::Newapi => "newapi",
|
||||
RelayStationAdapter::Oneapi => "oneapi",
|
||||
RelayStationAdapter::Yourapi => "yourapi",
|
||||
RelayStationAdapter::Custom => "custom",
|
||||
}
|
||||
}
|
||||
@@ -60,7 +54,7 @@ pub struct RelayStation {
|
||||
pub adapter: RelayStationAdapter, // 适配器类型
|
||||
pub auth_method: AuthMethod, // 认证方式
|
||||
pub system_token: String, // 系统令牌
|
||||
pub user_id: Option<String>, // 用户 ID(NewAPI 必需)
|
||||
pub user_id: Option<String>, // 用户 ID(可选)
|
||||
pub adapter_config: Option<HashMap<String, serde_json::Value>>, // 适配器特定配置
|
||||
pub enabled: bool, // 启用状态
|
||||
pub created_at: i64, // 创建时间
|
||||
|
Reference in New Issue
Block a user