Spaces:
Runtime error
Runtime error
Commit ·
976455f
1
Parent(s): 788a627
update README
Browse files- README.md +16 -7
- package-lock.json +1 -1
- public/file.svg +0 -1
- public/globe.svg +0 -1
- public/next.svg +0 -1
- public/vercel.svg +0 -1
- public/window.svg +0 -1
README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
# ChatKit Starter Template
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
This repository is the simplest way to bootstrap a [ChatKit](http://openai.github.io/chatkit-js/) application. It ships with a minimal Next.js UI, the ChatKit web component, and a ready-to-use session endpoint so you can experiment with OpenAI-hosted workflows built using [Agent Builder](https://platform.openai.com/agent-builder).
|
| 4 |
|
| 5 |
## What You Get
|
| 6 |
|
| 7 |
- Next.js app with `<openai-chatkit>` web component and theming controls
|
| 8 |
- API endpoint for creating a session at [`app/api/create-session/route.ts`](app/api/create-session/route.ts)
|
| 9 |
-
-
|
| 10 |
|
| 11 |
## Getting Started
|
| 12 |
|
| 13 |
-
Follow every step below to run the app locally and configure it for your preferred backend.
|
| 14 |
-
|
| 15 |
### 1. Install dependencies
|
| 16 |
|
| 17 |
```bash
|
|
@@ -26,6 +28,12 @@ Copy the example file and fill in the required values:
|
|
| 26 |
cp .env.example .env.local
|
| 27 |
```
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
### 3. Configure ChatKit credentials
|
| 30 |
|
| 31 |
Update `.env.local` with the variables that match your setup.
|
|
@@ -42,17 +50,18 @@ npm run dev
|
|
| 42 |
|
| 43 |
Visit `http://localhost:3000` and start chatting. Use the prompts on the start screen to verify your workflow connection, then customize the UI or prompt list in [`lib/config.ts`](lib/config.ts) and [`components/ChatKitPanel.tsx`](components/ChatKitPanel.tsx).
|
| 44 |
|
| 45 |
-
### 5.
|
| 46 |
|
| 47 |
```bash
|
| 48 |
npm run build
|
| 49 |
-
npm start
|
| 50 |
```
|
| 51 |
|
|
|
|
|
|
|
| 52 |
## Customization Tips
|
| 53 |
|
| 54 |
-
- Adjust starter prompts, greeting text, and placeholder copy in [`lib/config.ts`](lib/config.ts).
|
| 55 |
-
- Update the
|
| 56 |
|
| 57 |
## References
|
| 58 |
|
|
|
|
| 1 |
# ChatKit Starter Template
|
| 2 |
|
| 3 |
+
[](LICENSE)
|
| 4 |
+

|
| 5 |
+

|
| 6 |
+
|
| 7 |
This repository is the simplest way to bootstrap a [ChatKit](http://openai.github.io/chatkit-js/) application. It ships with a minimal Next.js UI, the ChatKit web component, and a ready-to-use session endpoint so you can experiment with OpenAI-hosted workflows built using [Agent Builder](https://platform.openai.com/agent-builder).
|
| 8 |
|
| 9 |
## What You Get
|
| 10 |
|
| 11 |
- Next.js app with `<openai-chatkit>` web component and theming controls
|
| 12 |
- API endpoint for creating a session at [`app/api/create-session/route.ts`](app/api/create-session/route.ts)
|
| 13 |
+
- Config file for starter prompts, theme, placeholder text, and greeting message
|
| 14 |
|
| 15 |
## Getting Started
|
| 16 |
|
|
|
|
|
|
|
| 17 |
### 1. Install dependencies
|
| 18 |
|
| 19 |
```bash
|
|
|
|
| 28 |
cp .env.example .env.local
|
| 29 |
```
|
| 30 |
|
| 31 |
+
You can get your workflow id from the [Agent Builder](https://platform.openai.com/agent-builder) interface, after clicking "Publish".
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+
You can get your OpenAI API key from the [OpenAI API Keys](https://platform.openai.com/api-keys) page.
|
| 36 |
+
|
| 37 |
### 3. Configure ChatKit credentials
|
| 38 |
|
| 39 |
Update `.env.local` with the variables that match your setup.
|
|
|
|
| 50 |
|
| 51 |
Visit `http://localhost:3000` and start chatting. Use the prompts on the start screen to verify your workflow connection, then customize the UI or prompt list in [`lib/config.ts`](lib/config.ts) and [`components/ChatKitPanel.tsx`](components/ChatKitPanel.tsx).
|
| 52 |
|
| 53 |
+
### 5. Deploy your app
|
| 54 |
|
| 55 |
```bash
|
| 56 |
npm run build
|
|
|
|
| 57 |
```
|
| 58 |
|
| 59 |
+
Before deploying your app, you need to verify the domain by adding it to the [Domain allowlist](https://platform.openai.com/settings/organization/security/domain-allowlist) on your dashboard.
|
| 60 |
+
|
| 61 |
## Customization Tips
|
| 62 |
|
| 63 |
+
- Adjust starter prompts, greeting text, [chatkit theme](https://chatkit.studio/playground), and placeholder copy in [`lib/config.ts`](lib/config.ts).
|
| 64 |
+
- Update the event handlers inside [`components/.tsx`](components/ChatKitPanel.tsx) to integrate with your product analytics or storage.
|
| 65 |
|
| 66 |
## References
|
| 67 |
|
package-lock.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
"name": "openai-chatkit-starter-app",
|
| 9 |
"version": "0.1.0",
|
| 10 |
"dependencies": {
|
| 11 |
-
"@openai/chatkit-react": ">=1.1.1 <
|
| 12 |
"next": "^15.5.4",
|
| 13 |
"react": "^19.2.0",
|
| 14 |
"react-dom": "^19.2.0"
|
|
|
|
| 8 |
"name": "openai-chatkit-starter-app",
|
| 9 |
"version": "0.1.0",
|
| 10 |
"dependencies": {
|
| 11 |
+
"@openai/chatkit-react": ">=1.1.1 <2.0.0",
|
| 12 |
"next": "^15.5.4",
|
| 13 |
"react": "^19.2.0",
|
| 14 |
"react-dom": "^19.2.0"
|
public/file.svg
DELETED
public/globe.svg
DELETED
public/next.svg
DELETED
public/vercel.svg
DELETED
public/window.svg
DELETED