From efca8a2db281b1e7b4a6a5823f6fdfe0e2c6eea2 Mon Sep 17 00:00:00 2001 From: Caleb Owens Date: Sat, 11 May 2024 13:35:10 +0100 Subject: [PATCH] Updated enums - Removed duplicated ModelKind enum - Fixed enum spelling --- app/src/lib/ai/service.ts | 7 +------ app/src/lib/ai/types.ts | 3 ++- app/src/routes/settings/ai/+page.svelte | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/src/lib/ai/service.ts b/app/src/lib/ai/service.ts index 9edd9ff1b..6c86ce524 100644 --- a/app/src/lib/ai/service.ts +++ b/app/src/lib/ai/service.ts @@ -1,7 +1,7 @@ import { AnthropicAIClient } from '$lib/ai/anthropicClient'; import { ButlerAIClient } from '$lib/ai/butlerClient'; import { OpenAIClient } from '$lib/ai/openAIClient'; -import { OpenAIModelName, type AIClient, AnthropicModelName } from '$lib/ai/types'; +import { OpenAIModelName, type AIClient, AnthropicModelName, ModelKind } from '$lib/ai/types'; import { splitMessage } from '$lib/utils/commitMessage'; import * as toasts from '$lib/utils/toasts'; import OpenAI from 'openai'; @@ -39,11 +39,6 @@ Here is my git diff: %{diff} `; -export enum ModelKind { - OpenAI = 'openai', - Anthropic = 'anthropic' -} - export enum KeyOption { BringYourOwn = 'bringYourOwn', ButlerAPI = 'butlerAPI' diff --git a/app/src/lib/ai/types.ts b/app/src/lib/ai/types.ts index cc2d71135..f81588b1b 100644 --- a/app/src/lib/ai/types.ts +++ b/app/src/lib/ai/types.ts @@ -1,6 +1,7 @@ export enum ModelKind { OpenAI = 'openai', - Anthropic = 'anthropic' + Anthropic = 'anthropic', + Ollama = 'ollama' } export enum OpenAIModelName { diff --git a/app/src/routes/settings/ai/+page.svelte b/app/src/routes/settings/ai/+page.svelte index 6a53f0e80..ff9fe9968 100644 --- a/app/src/routes/settings/ai/+page.svelte +++ b/app/src/routes/settings/ai/+page.svelte @@ -1,6 +1,6 @@