feat: allow setting ollama host (#874)

This commit is contained in:
Yingjie He
2025-01-29 11:34:41 -08:00
committed by GitHub
parent c59bf888e8
commit 129e4a9e44
12 changed files with 40 additions and 12 deletions
@@ -2,6 +2,11 @@ import { Provider, ProviderResponse } from './types';
import { getApiUrl, getSecretKey } from '../../../config';
import { special_provider_cases } from '../providers/utils';
export function isSecretKey(keyName: string): boolean {
// Ollama and Databricks use host name right now and it should not be stored as secret.
return keyName != 'DATABRICKS_HOST' && keyName != 'OLLAMA_HOST';
}
export async function getActiveProviders(): Promise<string[]> {
try {
// Fetch the secrets settings