Skip to content

Commit 78e8e77

Browse files
authored
Merge pull request #91 from Nebhay/fix-FIREWORKS
Fix Fireworks
2 parents 7a80047 + 75502c1 commit 78e8e77

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/config.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ const MOONSHOT_PROVIDER_BASE_URL: &str = "https://api.moonshot.ai";
194194
const ZHIPU_PROVIDER_BASE_URL: &str = "https://api.z.ai/api/paas/v4";
195195
const ZAI_CODING_PLAN_BASE_URL: &str = "https://api.z.ai/api/coding/paas/v4";
196196
const NVIDIA_PROVIDER_BASE_URL: &str = "https://integrate.api.nvidia.com";
197+
const FIREWORKS_PROVIDER_BASE_URL: &str = "https://api.fireworks.ai/inference";
197198
pub(crate) const GEMINI_PROVIDER_BASE_URL: &str =
198199
"https://generativelanguage.googleapis.com/v1beta/openai";
199200

@@ -1924,6 +1925,17 @@ impl Config {
19241925
});
19251926
}
19261927

1928+
if let Some(fireworks_key) = llm.fireworks_key.clone() {
1929+
llm.providers
1930+
.entry("fireworks".to_string())
1931+
.or_insert_with(|| ProviderConfig {
1932+
api_type: ApiType::OpenAiCompletions,
1933+
base_url: FIREWORKS_PROVIDER_BASE_URL.to_string(),
1934+
api_key: fireworks_key,
1935+
name: None,
1936+
});
1937+
}
1938+
19271939
if let Some(gemini_key) = llm.gemini_key.clone() {
19281940
llm.providers
19291941
.entry("gemini".to_string())
@@ -2260,6 +2272,17 @@ impl Config {
22602272
});
22612273
}
22622274

2275+
if let Some(fireworks_key) = llm.fireworks_key.clone() {
2276+
llm.providers
2277+
.entry("fireworks".to_string())
2278+
.or_insert_with(|| ProviderConfig {
2279+
api_type: ApiType::OpenAiCompletions,
2280+
base_url: FIREWORKS_PROVIDER_BASE_URL.to_string(),
2281+
api_key: fireworks_key,
2282+
name: None,
2283+
});
2284+
}
2285+
22632286
if let Some(gemini_key) = llm.gemini_key.clone() {
22642287
llm.providers
22652288
.entry("gemini".to_string())

0 commit comments

Comments
 (0)