Skip to content

Commit b864335

Browse files
authored
Move ai folder to lib/ (#542)
1 parent 914238b commit b864335

File tree

9 files changed

+8
-8
lines changed

9 files changed

+8
-8
lines changed

app/(chat)/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { CoreMessage, type CoreUserMessage, generateText } from 'ai';
44
import { cookies } from 'next/headers';
55

6-
import { customModel } from '@/ai';
6+
import { customModel } from '@/lib/ai';
77

88
export async function saveModelId(model: string) {
99
const cookieStore = await cookies();

app/(chat)/api/chat/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {
2-
convertToCoreMessages,
32
type Message,
43
StreamData,
4+
convertToCoreMessages,
55
streamObject,
66
streamText,
77
} from 'ai';
88
import { z } from 'zod';
99

10-
import { customModel } from '@/ai';
11-
import { models } from '@/ai/models';
12-
import { systemPrompt } from '@/ai/prompts';
1310
import { auth } from '@/app/(auth)/auth';
11+
import { customModel } from '@/lib/ai';
12+
import { models } from '@/lib/ai/models';
13+
import { systemPrompt } from '@/lib/ai/prompts';
1414
import {
1515
deleteChatById,
1616
getChatById,

app/(chat)/chat/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { CoreMessage } from 'ai';
22
import { cookies } from 'next/headers';
33
import { notFound } from 'next/navigation';
44

5-
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
65
import { auth } from '@/app/(auth)/auth';
76
import { Chat as PreviewChat } from '@/components/chat';
7+
import { DEFAULT_MODEL_NAME, models } from '@/lib/ai/models';
88
import { getChatById, getMessagesByChatId } from '@/lib/db/queries';
99
import { convertToUIMessages } from '@/lib/utils';
1010

app/(chat)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cookies } from 'next/headers';
22

3-
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
43
import { Chat } from '@/components/chat';
4+
import { DEFAULT_MODEL_NAME, models } from '@/lib/ai/models';
55
import { generateUUID } from '@/lib/utils';
66

77
export default async function Page() {

components/model-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { startTransition, useMemo, useOptimistic, useState } from 'react';
44

5-
import { models } from '@/ai/models';
65
import { saveModelId } from '@/app/(chat)/actions';
76
import { Button } from '@/components/ui/button';
87
import {
@@ -11,6 +10,7 @@ import {
1110
DropdownMenuItem,
1211
DropdownMenuTrigger,
1312
} from '@/components/ui/dropdown-menu';
13+
import { models } from '@/lib/ai/models';
1414
import { cn } from '@/lib/utils';
1515

1616
import { CheckCirclFillIcon, ChevronDownIcon } from './icons';
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)