https://github.com/draganaleksic99/openai-assistant
Simple demo app demonstrating use of OpenAI Assistants API in Next.js and Vercel AI SDK with streaming, tool use (code interpreter and file search), and function calling.
https://github.com/draganaleksic99/openai-assistant
generative-ai nextjs openai-api shadcn-ui tailwindcss typescript vercel-ai-sdk
Last synced: 6 months ago
JSON representation
Simple demo app demonstrating use of OpenAI Assistants API in Next.js and Vercel AI SDK with streaming, tool use (code interpreter and file search), and function calling.
- Host: GitHub
- URL: https://github.com/draganaleksic99/openai-assistant
- Owner: DraganAleksic99
- Created: 2024-05-09T21:13:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-26T16:53:16.000Z (11 months ago)
- Last Synced: 2025-04-19T01:41:06.638Z (6 months ago)
- Topics: generative-ai, nextjs, openai-api, shadcn-ui, tailwindcss, typescript, vercel-ai-sdk
- Language: TypeScript
- Homepage: https://dub.sh/openai-assistant
- Size: 372 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenAI-Assistant
Simple demo app demonstrating use of OpenAI [Assistants API](https://platform.openai.com/docs/assistants/overview) in [Next.js](https://nextjs.org/) and [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction) with [streaming](https://platform.openai.com/docs/assistants/overview/step-4-create-a-run), tool use ([code interpreter](https://platform.openai.com/docs/assistants/tools/code-interpreter) and [file search](https://platform.openai.com/docs/assistants/tools/file-search)), and [function calling](https://platform.openai.com/docs/assistants/tools/function-calling).

## Stack
- Framework: [Next.js](https://nextjs.org/) 14 (App Router)
- Chat functionality: [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction)
- Assistant: [OpenAI Assistant API](https://platform.openai.com/docs/assistants/overview)
- Styling: [Tailwind CSS](https://tailwindcss.com/)## Quickstart
### 1. Clone this repository
Run the following command to clone the repo:
```
git clone https://github.com/DraganAleksic99/openai-assistant.git
```### 2. Install dependencies
```
cd openai-assistant
npm i
```### 3. Fill out secrets and create an assistant
```
cp .env.local.example .env.local
```### 4. Run app locally
```
npm run dev
```### Open in your browser
You can now visit http://localhost:3000.