Skip to content

Commit

Permalink
chore: Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-paliychuk committed Jan 31, 2025
1 parent 9cce91b commit 8cf6480
Showing 1 changed file with 55 additions and 19 deletions.
74 changes: 55 additions & 19 deletions examples/vercel_ai/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,72 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# Vercel AI + Zep Integration Guide

## Getting Started
This guide demonstrates how to integrate Zep with the Vercel AI SDK to build an intelligent chatbot with memory capabilities.
We'll walk through setting up a Next.js project that uses Zep to store conversation history and contextual data about users.

First, run the development server:
The guide is available [here](https://help.getzep.com/docs/ecosystem/vercel-ai).

## Setup

1. Create a `.env.local` file in your project root with your API keys:

```text
OPENAI_API_KEY=<your-openai-key>
ZEP_API_KEY=<your-zep-key>
```

2. Seed initial data:

```bash
pnpm seed
```

After running the seed script, you should see output similar to:

```text
🤖 Seeding Zep with initial data...
Adding user:
userID: Emily163733bf-8ffc-4824-9613-9d1f7a86457e
email: [email protected]
firstName: Emily
lastName: Painter
Adding session: 2a36ba9a-1fd9-4b59-8832-18f5d0eb5140
Adding chat history...
Adding transactions...
Adding account status info...
Adding support cases...
✅ Seeding complete! Please wait a few minutes for all data to be ingested into the knowledge graph.
```

Note: Save the `userID` from the output as you'll need it for the chat interface.

## Running the app

To start the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the chat interface.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
## Project Structure

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
The main components of this project are:

## Learn More
- `app/page.tsx`: The chat interface component
- `app/api/chat/route.ts`: The route handler for chat functionality
- Various utility functions for working with Zep's memory and knowledge graph capabilities

To learn more about Next.js, take a look at the following resources:
## Learn More

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
To learn more about the technologies used in this project:

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
- [Vercel AI SDK Documentation](https://sdk.vercel.ai/docs)
- [Zep Documentation](https://help.getzep.com)
- [Next.js Documentation](https://nextjs.org/docs)

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new).

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Check out the [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

0 comments on commit 8cf6480

Please sign in to comment.