chronicle_proxy/providers/
together.rs1use super::custom::{CustomProvider, OpenAiRequestFormatOptions, ProviderRequestFormat};
2use crate::config::CustomProviderConfig;
3
4pub struct Together;
5
6impl Together {
7 pub fn new(client: reqwest::Client, token: Option<String>) -> CustomProvider {
8 let config = CustomProviderConfig {
9 name: "together".into(),
10 label: Some("together.ai".to_string()),
11 url: "https://api.together.xyz/v1/chat/completions".into(),
12 format: ProviderRequestFormat::OpenAi(OpenAiRequestFormatOptions::default()),
13 api_key: None,
14 api_key_source: None,
15 headers: Default::default(),
16 prefix: Some("together/".to_string()),
17 }
18 .with_token_or_env(token, "TOGETHER_API_KEY");
19
20 CustomProvider::new(config, client)
21 }
22}