mirror of
https://github.com/katanemo/plano.git
synced 2026-05-09 07:42:43 +02:00
Add first-class ChatGPT subscription provider support
This commit is contained in:
parent
128059e7c1
commit
bbe9946207
16 changed files with 637 additions and 7 deletions
|
|
@ -370,6 +370,8 @@ pub enum LlmProviderType {
|
|||
AmazonBedrock,
|
||||
#[serde(rename = "plano")]
|
||||
Plano,
|
||||
#[serde(rename = "chatgpt")]
|
||||
ChatGPT,
|
||||
}
|
||||
|
||||
impl Display for LlmProviderType {
|
||||
|
|
@ -391,6 +393,7 @@ impl Display for LlmProviderType {
|
|||
LlmProviderType::Qwen => write!(f, "qwen"),
|
||||
LlmProviderType::AmazonBedrock => write!(f, "amazon_bedrock"),
|
||||
LlmProviderType::Plano => write!(f, "plano"),
|
||||
LlmProviderType::ChatGPT => write!(f, "chatgpt"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -457,6 +460,7 @@ pub struct LlmProvider {
|
|||
pub base_url_path_prefix: Option<String>,
|
||||
pub internal: Option<bool>,
|
||||
pub passthrough_auth: Option<bool>,
|
||||
pub headers: Option<HashMap<String, String>>,
|
||||
}
|
||||
|
||||
pub trait IntoModels {
|
||||
|
|
@ -500,6 +504,7 @@ impl Default for LlmProvider {
|
|||
base_url_path_prefix: None,
|
||||
internal: None,
|
||||
passthrough_auth: None,
|
||||
headers: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ mod tests {
|
|||
internal: None,
|
||||
stream: None,
|
||||
passthrough_auth: None,
|
||||
headers: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue