增加不同类型中转站
This commit is contained in:
@@ -838,6 +838,11 @@ impl StationAdapter for CustomAdapter {
|
||||
pub fn create_adapter(adapter_type: &RelayStationAdapter) -> Box<dyn StationAdapter> {
|
||||
match adapter_type {
|
||||
RelayStationAdapter::Packycode => Box::new(PackycodeAdapter),
|
||||
// DeepSeek、GLM、Qwen、Kimi 都使用类似 NewAPI 的适配器
|
||||
RelayStationAdapter::Deepseek => Box::new(NewApiAdapter),
|
||||
RelayStationAdapter::Glm => Box::new(NewApiAdapter),
|
||||
RelayStationAdapter::Qwen => Box::new(NewApiAdapter),
|
||||
RelayStationAdapter::Kimi => Box::new(NewApiAdapter),
|
||||
RelayStationAdapter::Newapi => Box::new(NewApiAdapter),
|
||||
RelayStationAdapter::Oneapi => Box::new(NewApiAdapter), // OneAPI 兼容 NewAPI
|
||||
RelayStationAdapter::Yourapi => Box::new(YourApiAdapter::new()),
|
||||
|
@@ -15,6 +15,10 @@ use crate::claude_config;
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum RelayStationAdapter {
|
||||
Packycode, // PackyCode 平台(放在第一位)
|
||||
Deepseek, // DeepSeek v3.1
|
||||
Glm, // 智谱GLM
|
||||
Qwen, // 千问Qwen
|
||||
Kimi, // Kimi k2
|
||||
Newapi, // NewAPI 兼容平台
|
||||
Oneapi, // OneAPI 兼容平台
|
||||
Yourapi, // YourAPI 特定平台
|
||||
@@ -25,6 +29,10 @@ impl RelayStationAdapter {
|
||||
pub fn as_str(&self) -> &str {
|
||||
match self {
|
||||
RelayStationAdapter::Packycode => "packycode",
|
||||
RelayStationAdapter::Deepseek => "deepseek",
|
||||
RelayStationAdapter::Glm => "glm",
|
||||
RelayStationAdapter::Qwen => "qwen",
|
||||
RelayStationAdapter::Kimi => "kimi",
|
||||
RelayStationAdapter::Newapi => "newapi",
|
||||
RelayStationAdapter::Oneapi => "oneapi",
|
||||
RelayStationAdapter::Yourapi => "yourapi",
|
||||
|
Reference in New Issue
Block a user