fix(docker config): Environment Variable Handling and Configuration Logic (#605)

* fixed custom openai endpoint not working

* minor fix
This commit is contained in:
Sibi Krishnamoorthy
2025-03-02 16:42:39 +05:30
committed by GitHub
parent 56382a9fdc
commit d6919f3033

View File

@@ -252,13 +252,16 @@ export const exportSQL = async (
const apiKey = window?.env?.OPENAI_API_KEY ?? OPENAI_API_KEY;
const baseUrl = window?.env?.OPENAI_API_ENDPOINT ?? OPENAI_API_ENDPOINT;
const modelName = window?.env?.LLM_MODEL_NAME || 'gpt-4o-mini-2024-07-18';
const modelName =
window?.env?.LLM_MODEL_NAME ??
LLM_MODEL_NAME ??
'gpt-4o-mini-2024-07-18';
let config: { apiKey: string; baseUrl?: string };
if (useCustomEndpoint) {
config = {
apiKey: 'sk-xxx', // minimal valid API key format
apiKey: apiKey,
baseUrl: baseUrl,
};
} else {