Files
office-data-matcher/frontend/wailsjs/go/main/App.js
RainySY 6f9ffc59f3 feat: support any OpenAI-compatible AI API
Backend:
- Add apiEndpoint / apiModel fields to App struct (configurable, with Deepseek defaults)
- New SetAIConfig(endpoint, model, key) unified config method
- New SetAPIKey(key) for key-only updates
- GetAIStatus() returns { ready, endpoint, model }
- callDeepseekAPI → callAIAPI with configurable endpoint and model
- Remove hardcoded Deepseek URL/model; defaults remain as fallback

Frontend:
- Replace Deepseek-specific state with generic AI config (endpoint / model / key)
- Add endpoint URL and model name input fields
- saveApiKey → saveApiConfig using SetAIConfig
- onMounted restores full AI config via GetAIStatus
- Rename all user-facing 'Deepseek' labels to 'AI / AI API'

Now supports: Deepseek, OpenAI, Ollama, vLLM, or any OpenAI-compatible endpoint.
2026-05-20 14:33:10 +08:00

64 lines
1.6 KiB
JavaScript

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function CalculateSimilarity(arg1, arg2) {
return window['go']['main']['App']['CalculateSimilarity'](arg1, arg2);
}
export function CleanString(arg1) {
return window['go']['main']['App']['CleanString'](arg1);
}
export function ClearAICache() {
return window['go']['main']['App']['ClearAICache']();
}
export function ExportResults(arg1) {
return window['go']['main']['App']['ExportResults'](arg1);
}
export function GetAICacheInfo() {
return window['go']['main']['App']['GetAICacheInfo']();
}
export function GetAIStatus() {
return window['go']['main']['App']['GetAIStatus']();
}
export function OpenDailyReport() {
return window['go']['main']['App']['OpenDailyReport']();
}
export function OpenFileA() {
return window['go']['main']['App']['OpenFileA']();
}
export function OpenFileB() {
return window['go']['main']['App']['OpenFileB']();
}
export function OpenMonthlyReport() {
return window['go']['main']['App']['OpenMonthlyReport']();
}
export function ParseHeaders(arg1) {
return window['go']['main']['App']['ParseHeaders'](arg1);
}
export function RunMatch(arg1) {
return window['go']['main']['App']['RunMatch'](arg1);
}
export function RunMatchWithAI(arg1) {
return window['go']['main']['App']['RunMatchWithAI'](arg1);
}
export function SetAIConfig(arg1, arg2, arg3) {
return window['go']['main']['App']['SetAIConfig'](arg1, arg2, arg3);
}
export function SetAPIKey(arg1) {
return window['go']['main']['App']['SetAPIKey'](arg1);
}