chore: consolidate model utils and drive-by cleanups (#476)

Signed-off-by: Thibault Sottiaux <tibo@openai.com>
This commit is contained in:
Thibault Sottiaux
2025-04-21 12:33:57 -04:00
committed by GitHub
parent dc276999a9
commit 3c4f1fea9b
21 changed files with 196 additions and 205 deletions

View File

@@ -41,7 +41,7 @@ export function setApiKey(apiKey: string): void {
OPENAI_API_KEY = apiKey;
}
export function getBaseUrl(provider: string = "openai"): string | undefined {
export function getBaseUrl(provider: string): string | undefined {
const providerInfo = providers[provider.toLowerCase()];
if (providerInfo) {
return providerInfo.baseURL;
@@ -49,7 +49,7 @@ export function getBaseUrl(provider: string = "openai"): string | undefined {
return undefined;
}
export function getApiKey(provider: string = "openai"): string | undefined {
export function getApiKey(provider: string): string | undefined {
const providerInfo = providers[provider.toLowerCase()];
if (providerInfo) {
if (providerInfo.name === "Ollama") {