File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,14 @@ impl AiStudioClient {
3838 if address. is_some ( ) {
3939 api_bail ! ( "Gemini doesn't support custom API address" ) ;
4040 }
41-
41+
4242 let api_key = if let Some ( key) = api_key {
4343 key
4444 } else {
4545 std:: env:: var ( "GEMINI_API_KEY" )
4646 . map_err ( |_| anyhow:: anyhow!( "GEMINI_API_KEY environment variable must be set" ) ) ?
4747 } ;
48-
48+
4949 Ok ( Self {
5050 api_key,
5151 client : reqwest:: Client :: new ( ) ,
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ impl Client {
1010 _api_config : Option < super :: LlmApiConfig > ,
1111 ) -> anyhow:: Result < Self > {
1212 let address = address. unwrap_or_else ( || "http://127.0.0.1:4000" . to_string ( ) ) ;
13-
13+
1414 let api_key = api_key. or_else ( || std:: env:: var ( "LITELLM_API_KEY" ) . ok ( ) ) ;
15-
15+
1616 let mut config = OpenAIConfig :: new ( ) . with_api_base ( address) ;
1717 if let Some ( api_key) = api_key {
1818 config = config. with_api_key ( api_key) ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ impl Client {
6262 api_bail ! ( "OPENAI_API_KEY environment variable must be set" ) ;
6363 }
6464 }
65-
65+
6666 Ok ( Self {
6767 client : OpenAIClient :: with_config ( openai_config) ,
6868 } )
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ impl Client {
1010 _api_config : Option < super :: LlmApiConfig > ,
1111 ) -> anyhow:: Result < Self > {
1212 let address = address. unwrap_or_else ( || "https://openrouter.ai/api/v1" . to_string ( ) ) ;
13-
13+
1414 let api_key = api_key. or_else ( || std:: env:: var ( "OPENROUTER_API_KEY" ) . ok ( ) ) ;
15-
15+
1616 let mut config = OpenAIConfig :: new ( ) . with_api_base ( address) ;
1717 if let Some ( api_key) = api_key {
1818 config = config. with_api_key ( api_key) ;
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ impl Client {
1010 _api_config : Option < super :: LlmApiConfig > ,
1111 ) -> anyhow:: Result < Self > {
1212 let address = address. unwrap_or_else ( || "http://127.0.0.1:8000/v1" . to_string ( ) ) ;
13-
13+
1414 let api_key = api_key. or_else ( || std:: env:: var ( "VLLM_API_KEY" ) . ok ( ) ) ;
15-
15+
1616 let mut config = OpenAIConfig :: new ( ) . with_api_base ( address) ;
1717 if let Some ( api_key) = api_key {
1818 config = config. with_api_key ( api_key) ;
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ impl SimpleFunctionFactoryBase for Factory {
127127 spec. api_type
128128 )
129129 }
130- } ,
130+ }
131131 } )
132132 } else {
133133 spec. api_config . clone ( )
You can’t perform that action at this time.
0 commit comments