Add OpenAI-compatible API support with configuration management and response handling

This commit is contained in:
Илья Глазунов
2026-02-14 20:18:02 +03:00
parent bfd76dc0c1
commit bd62cf5524
4 changed files with 340 additions and 19 deletions
+7
View File
@@ -56,6 +56,13 @@ const storage = {
async setGroqApiKey(groqApiKey) {
return ipcRenderer.invoke('storage:set-groq-api-key', groqApiKey);
},
async getOpenAICompatibleConfig() {
const result = await ipcRenderer.invoke('get-openai-compatible-config');
return result.success ? result.config : { apiKey: '', baseUrl: '', model: '' };
},
async setOpenAICompatibleConfig(apiKey, baseUrl, model) {
return ipcRenderer.invoke('set-openai-compatible-config', apiKey, baseUrl, model);
},
// Preferences
async getPreferences() {