Added openai compatible v1 completions and ollama api key compatibility (#73) (#74)

Added:
    - v1 completions (OpenAI compatible) and testing connection
    - Add API key handling for Ollama and v1 completions if required
Co-authored-by: midhun kumar <midh0001@student.monash.edu>
Reviewed-on: https://codeberg.org/ArkHost/HelixNotes/pulls/74
This commit is contained in:
qyrhal
2026-06-03 18:49:11 +02:00
committed by ArkHost
parent 8ceb44df78
commit 4b82d51f6c
6 changed files with 319 additions and 26 deletions
+7 -1
View File
@@ -351,8 +351,14 @@ export async function setAiSettings(
model: string,
writingStyle: string | null,
baseUrl: string | null = null,
ollamaApiKey: string | null = null,
openaiCompatibleBaseUrl: string | null = null,
openaiCompatibleApiKey: string | null = null,
): Promise<void> {
return invoke("set_ai_settings", { provider, apiKey, model, writingStyle, baseUrl });
return invoke("set_ai_settings", {
provider, apiKey, model, writingStyle, baseUrl,
ollamaApiKey, openaiCompatibleBaseUrl, openaiCompatibleApiKey,
});
}
export async function testAiConnection(): Promise<void> {