@assistant-ui/react 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +37 -0
- package/package.json +32 -2
package/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# `@assistant-ui/react`
|
2
|
+
|
3
|
+
`@assistant-ui/react` is a set of React components for AI chat.
|
4
|
+
|
5
|
+
- [Website](https://assistant-ui.com/)
|
6
|
+
- [Demo](https://assistant-ui-rsc-example.vercel.app/)
|
7
|
+
|
8
|
+
## Documentation
|
9
|
+
|
10
|
+
- [Documentation](https://www.assistant-ui.com/docs/getting-started)
|
11
|
+
|
12
|
+
## Minimal Example with Vercel AI SDK
|
13
|
+
|
14
|
+
```sh
|
15
|
+
npx @assistant-ui/shadcn add thread
|
16
|
+
```
|
17
|
+
|
18
|
+
```tsx
|
19
|
+
"use client";
|
20
|
+
|
21
|
+
import { useChat } from "@ai-sdk/react";
|
22
|
+
import { AssistantRuntimeProvider, useVercelAIRuntime } from "@assistant-ui/react";
|
23
|
+
import { Thread } from "@/components/ui/assistant-ui/thread";
|
24
|
+
|
25
|
+
const MyApp = () => {
|
26
|
+
const chat = useChat({
|
27
|
+
api: "/api/chat" // your backend route
|
28
|
+
});
|
29
|
+
const runtime = useVercelAIRuntime(chat);
|
30
|
+
|
31
|
+
return (
|
32
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
33
|
+
<Thread />
|
34
|
+
</AssistantRuntimeProvider>
|
35
|
+
);
|
36
|
+
}
|
37
|
+
```
|
package/package.json
CHANGED
@@ -1,6 +1,35 @@
|
|
1
1
|
{
|
2
2
|
"name": "@assistant-ui/react",
|
3
|
-
"
|
3
|
+
"description": "React components for AI chat.",
|
4
|
+
"keywords": [
|
5
|
+
"radix-ui",
|
6
|
+
"nextjs",
|
7
|
+
"vercel",
|
8
|
+
"ai-sdk",
|
9
|
+
"react",
|
10
|
+
"components",
|
11
|
+
"ui",
|
12
|
+
"frontend",
|
13
|
+
"tailwind",
|
14
|
+
"shadcn",
|
15
|
+
"assistant",
|
16
|
+
"openai",
|
17
|
+
"ai",
|
18
|
+
"chat",
|
19
|
+
"chatbot",
|
20
|
+
"copilot",
|
21
|
+
"assistant",
|
22
|
+
"ai-chat",
|
23
|
+
"ai-chatbot",
|
24
|
+
"ai-assistant",
|
25
|
+
"ai-copilot",
|
26
|
+
"chatgpt",
|
27
|
+
"gpt4",
|
28
|
+
"gpt-4",
|
29
|
+
"conversational-ui",
|
30
|
+
"conversational-ai"
|
31
|
+
],
|
32
|
+
"version": "0.0.23",
|
4
33
|
"license": "MIT",
|
5
34
|
"exports": {
|
6
35
|
".": {
|
@@ -67,6 +96,7 @@
|
|
67
96
|
"url": "https://github.com/Yonom/assistant-ui/issues"
|
68
97
|
},
|
69
98
|
"scripts": {
|
70
|
-
"build": "tsup src/index.ts --format cjs,esm --dts"
|
99
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
100
|
+
"prepublish": "cp ../../README.md ./README.md"
|
71
101
|
}
|
72
102
|
}
|