fix: add missing Ollama, Moonshot, and DeepSeek providers to GetAPIKey and GetAPIBase
This commit is contained in:
parent
512fd885e3
commit
e1acce7166
1 changed files with 18 additions and 0 deletions
|
|
@ -526,6 +526,15 @@ func (c *Config) GetAPIKey() string {
|
|||
if c.Providers.Nvidia.APIKey != "" {
|
||||
return c.Providers.Nvidia.APIKey
|
||||
}
|
||||
if c.Providers.Ollama.APIKey != "" {
|
||||
return c.Providers.Ollama.APIKey
|
||||
}
|
||||
if c.Providers.Moonshot.APIKey != "" {
|
||||
return c.Providers.Moonshot.APIKey
|
||||
}
|
||||
if c.Providers.DeepSeek.APIKey != "" {
|
||||
return c.Providers.DeepSeek.APIKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
@ -551,6 +560,15 @@ func (c *Config) GetAPIBase() string {
|
|||
}
|
||||
return "https://integrate.api.nvidia.com/v1"
|
||||
}
|
||||
if c.Providers.Ollama.APIKey != "" {
|
||||
return c.Providers.Ollama.APIBase
|
||||
}
|
||||
if c.Providers.Moonshot.APIKey != "" {
|
||||
return c.Providers.Moonshot.APIBase
|
||||
}
|
||||
if c.Providers.DeepSeek.APIKey != "" {
|
||||
return c.Providers.DeepSeek.APIBase
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue