Move AI Client related stuff into its own folder

This commit is contained in:
Caleb Owens 2024-04-04 18:53:03 +01:00 committed by Mattias Granlund
parent 91538281ec
commit 3cb86afae7
6 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import { type AIClient, type PromptMessage, MessageRole } from '$lib/backend/aiClient';
import { fetch, Body } from '@tauri-apps/api/http';
import type { AnthropicModelName } from './types';
import type { AnthropicModelName } from '../types';
type AnthropicAPIResponse = { content: { text: string }[] };

View File

@ -1,6 +1,6 @@
import { MessageRole, type AIClient, type PromptMessage } from '$lib/backend/aiClient';
import type { CloudClient } from '$lib/backend/cloud';
import type { ModelKind } from './types';
import type { ModelKind } from '../types';
export class ButlerAIClient implements AIClient {
constructor(

View File

@ -1,5 +1,5 @@
import { type AIClient, type PromptMessage, MessageRole } from '$lib/backend/aiClient';
import type { OpenAIModelName } from './types';
import type { OpenAIModelName } from '../types';
import type OpenAI from 'openai';
export class OpenAIClient implements AIClient {

View File

@ -1,9 +1,9 @@
import { CloudClient } from './cloud';
import { AnthropicModelName, ModelKind, OpenAIModelName } from './types';
import { AnthropicAIClient } from '$lib/backend/aiClient/anthropic';
import { ButlerAIClient } from '$lib/backend/aiClient/butler';
import { OpenAIClient } from '$lib/backend/aiClient/openAI';
import { AIService, GitAIConfigKey, KeyOption, buildDiff } from '$lib/backend/aiService';
import { AnthropicAIClient } from '$lib/backend/anthropic';
import { ButlerAIClient } from '$lib/backend/butler';
import { OpenAIClient } from '$lib/backend/openAI';
import * as toasts from '$lib/utils/toasts';
import { Hunk } from '$lib/vbranches/types';
import { plainToInstance } from 'class-transformer';

View File

@ -1,7 +1,7 @@
import { AnthropicModelName, OpenAIModelName } from './types';
import { AnthropicAIClient } from '$lib/backend/anthropic';
import { ButlerAIClient } from '$lib/backend/butler';
import { OpenAIClient } from '$lib/backend/openAI';
import { AnthropicAIClient } from '$lib/backend/aiClient/anthropic';
import { ButlerAIClient } from '$lib/backend/aiClient/butler';
import { OpenAIClient } from '$lib/backend/aiClient/openAI';
import { splitMessage } from '$lib/utils/commitMessage';
import * as toasts from '$lib/utils/toasts';
import OpenAI from 'openai';