diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 450ae72..d2ead0a 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -1,5 +1,5 @@ import { kv } from '@vercel/kv' -import { OpenAIStream, StreamingTextResponse } from 'ai-connector' +import { OpenAIStream, StreamingTextResponse } from 'ai' import { Configuration, OpenAIApi } from 'openai-edge' import { auth } from '@/auth' diff --git a/components/chat-list.tsx b/components/chat-list.tsx index 43a1588..0aa677e 100644 --- a/components/chat-list.tsx +++ b/components/chat-list.tsx @@ -1,4 +1,4 @@ -import { type Message } from 'ai-connector' +import { type Message } from 'ai' import { Separator } from '@/components/ui/separator' import { ChatMessage } from '@/components/chat-message' diff --git a/components/chat-message-actions.tsx b/components/chat-message-actions.tsx index b42c22f..2905f8a 100644 --- a/components/chat-message-actions.tsx +++ b/components/chat-message-actions.tsx @@ -1,6 +1,6 @@ 'use client' -import { type Message } from 'ai-connector' +import { type Message } from 'ai' import { Button } from '@/components/ui/button' import { IconCheck, IconCopy } from '@/components/ui/icons' diff --git a/components/chat-message.tsx b/components/chat-message.tsx index cdd18f8..75f6e6f 100644 --- a/components/chat-message.tsx +++ b/components/chat-message.tsx @@ -1,4 +1,4 @@ -import { Message } from 'ai-connector' +import { Message } from 'ai' import remarkGfm from 'remark-gfm' import remarkMath from 'remark-math' diff --git a/components/chat-panel.tsx b/components/chat-panel.tsx index 85ff951..13e3c2f 100644 --- a/components/chat-panel.tsx +++ b/components/chat-panel.tsx @@ -1,4 +1,4 @@ -import { type UseChatHelpers } from 'ai-connector/react' +import { type UseChatHelpers } from 'ai/react' import { Button } from '@/components/ui/button' import { PromptForm } from '@/components/prompt-form' diff --git a/components/chat.tsx b/components/chat.tsx index 165a77b..bc2ffda 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -1,6 +1,6 @@ 'use client' -import { useChat, type Message } from 'ai-connector/react' +import { useChat, type Message } from 'ai/react' import { cn } from '@/lib/utils' import { ChatList } from '@/components/chat-list' diff --git a/components/empty-screen.tsx b/components/empty-screen.tsx index f47d1b0..0f211c8 100644 --- a/components/empty-screen.tsx +++ b/components/empty-screen.tsx @@ -1,4 +1,4 @@ -import { UseChatHelpers } from 'ai-connector/react' +import { UseChatHelpers } from 'ai/react' import { Button } from '@/components/ui/button' import { ExternalLink } from '@/components/external-link' diff --git a/components/prompt-form.tsx b/components/prompt-form.tsx index 3656407..75258c8 100644 --- a/components/prompt-form.tsx +++ b/components/prompt-form.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import Link from 'next/link' import Textarea from 'react-textarea-autosize' -import { UseChatHelpers } from 'ai-connector/react' +import { UseChatHelpers } from 'ai/react' import { useEnterSubmit } from '@/lib/hooks/use-enter-submit' import { cn } from '@/lib/utils' diff --git a/lib/types.ts b/lib/types.ts index 4434987..6f86a9c 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,4 +1,4 @@ -import { type Message } from 'ai-connector' +import { type Message } from 'ai' export interface Chat extends Record { id: string diff --git a/package.json b/package.json index 2824695..da0515d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "@vercel/kv": "^0.2.1", "@vercel/og": "^0.5.7", "ai": "^2.1.2", - "ai-connector": "^0.0.12", "body-scroll-lock": "4.0.0-beta.0", "class-variance-authority": "^0.4.0", "clsx": "^1.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 619bbcd..48550b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,9 +47,6 @@ dependencies: ai: specifier: ^2.1.2 version: 2.1.2(react@18.2.0)(svelte@3.59.1)(vue@3.3.4) - ai-connector: - specifier: ^0.0.12 - version: 0.0.12(react@18.2.0)(svelte@3.59.1) body-scroll-lock: specifier: 4.0.0-beta.0 version: 4.0.0-beta.0 @@ -1487,26 +1484,6 @@ packages: hasBin: true dev: true - /ai-connector@0.0.12(react@18.2.0)(svelte@3.59.1): - resolution: {integrity: sha512-sUnGgl3w7dd+j1TQSH9SifQv6eoei7f7kqOgnY2OhOVOoUyQ1vJeum7jkO38OAEQ8hU0vA0yYsR3G4TkcsMFEg==} - engines: {node: '>=14.6'} - peerDependencies: - react: ^18.0.0 - svelte: ^3.29.0 - peerDependenciesMeta: - react: - optional: true - svelte: - optional: true - dependencies: - eventsource-parser: 1.0.0 - nanoid: 3.3.6 - react: 18.2.0 - sswr: 1.10.0(svelte@3.59.1) - svelte: 3.59.1 - swr: 2.1.5(react@18.2.0) - dev: false - /ai@2.1.2(react@18.2.0)(svelte@3.59.1)(vue@3.3.4): resolution: {integrity: sha512-WhyGH95Pv/gpgVMQT5eCyKXJh7irozr+bmpJ94somfRYBcAN2U270ii/OOHzGLrPM3liTbBilGQL2Ds7/5sz9Q==} engines: {node: '>=14.6'}