ai-connector -> ai
This commit is contained in:
parent
52a209c57a
commit
5744f56ff6
11 changed files with 9 additions and 33 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import { kv } from '@vercel/kv'
|
import { kv } from '@vercel/kv'
|
||||||
import { OpenAIStream, StreamingTextResponse } from 'ai-connector'
|
import { OpenAIStream, StreamingTextResponse } from 'ai'
|
||||||
import { Configuration, OpenAIApi } from 'openai-edge'
|
import { Configuration, OpenAIApi } from 'openai-edge'
|
||||||
|
|
||||||
import { auth } from '@/auth'
|
import { auth } from '@/auth'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { type Message } from 'ai-connector'
|
import { type Message } from 'ai'
|
||||||
|
|
||||||
import { Separator } from '@/components/ui/separator'
|
import { Separator } from '@/components/ui/separator'
|
||||||
import { ChatMessage } from '@/components/chat-message'
|
import { ChatMessage } from '@/components/chat-message'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { type Message } from 'ai-connector'
|
import { type Message } from 'ai'
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { IconCheck, IconCopy } from '@/components/ui/icons'
|
import { IconCheck, IconCopy } from '@/components/ui/icons'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Message } from 'ai-connector'
|
import { Message } from 'ai'
|
||||||
import remarkGfm from 'remark-gfm'
|
import remarkGfm from 'remark-gfm'
|
||||||
import remarkMath from 'remark-math'
|
import remarkMath from 'remark-math'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { type UseChatHelpers } from 'ai-connector/react'
|
import { type UseChatHelpers } from 'ai/react'
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { PromptForm } from '@/components/prompt-form'
|
import { PromptForm } from '@/components/prompt-form'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useChat, type Message } from 'ai-connector/react'
|
import { useChat, type Message } from 'ai/react'
|
||||||
|
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { ChatList } from '@/components/chat-list'
|
import { ChatList } from '@/components/chat-list'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { UseChatHelpers } from 'ai-connector/react'
|
import { UseChatHelpers } from 'ai/react'
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { ExternalLink } from '@/components/external-link'
|
import { ExternalLink } from '@/components/external-link'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import Textarea from 'react-textarea-autosize'
|
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 { useEnterSubmit } from '@/lib/hooks/use-enter-submit'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { type Message } from 'ai-connector'
|
import { type Message } from 'ai'
|
||||||
|
|
||||||
export interface Chat extends Record<string, any> {
|
export interface Chat extends Record<string, any> {
|
||||||
id: string
|
id: string
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
"@vercel/kv": "^0.2.1",
|
"@vercel/kv": "^0.2.1",
|
||||||
"@vercel/og": "^0.5.7",
|
"@vercel/og": "^0.5.7",
|
||||||
"ai": "^2.1.2",
|
"ai": "^2.1.2",
|
||||||
"ai-connector": "^0.0.12",
|
|
||||||
"body-scroll-lock": "4.0.0-beta.0",
|
"body-scroll-lock": "4.0.0-beta.0",
|
||||||
"class-variance-authority": "^0.4.0",
|
"class-variance-authority": "^0.4.0",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
|
|
|
||||||
23
pnpm-lock.yaml
generated
23
pnpm-lock.yaml
generated
|
|
@ -47,9 +47,6 @@ dependencies:
|
||||||
ai:
|
ai:
|
||||||
specifier: ^2.1.2
|
specifier: ^2.1.2
|
||||||
version: 2.1.2(react@18.2.0)(svelte@3.59.1)(vue@3.3.4)
|
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:
|
body-scroll-lock:
|
||||||
specifier: 4.0.0-beta.0
|
specifier: 4.0.0-beta.0
|
||||||
version: 4.0.0-beta.0
|
version: 4.0.0-beta.0
|
||||||
|
|
@ -1487,26 +1484,6 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: 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):
|
/ai@2.1.2(react@18.2.0)(svelte@3.59.1)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-WhyGH95Pv/gpgVMQT5eCyKXJh7irozr+bmpJ94somfRYBcAN2U270ii/OOHzGLrPM3liTbBilGQL2Ds7/5sz9Q==}
|
resolution: {integrity: sha512-WhyGH95Pv/gpgVMQT5eCyKXJh7irozr+bmpJ94somfRYBcAN2U270ii/OOHzGLrPM3liTbBilGQL2Ds7/5sz9Q==}
|
||||||
engines: {node: '>=14.6'}
|
engines: {node: '>=14.6'}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue