mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-05 06:23:17 +00:00
fix(docker config): Environment Variable Handling and Configuration Logic (#605)
* fixed custom openai endpoint not working * minor fix
This commit is contained in:
committed by
GitHub
parent
56382a9fdc
commit
d6919f3033
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user