This repo's purpose is to be a starting point for contextual based chat interactions with Open Ai's gpt-3.5-turbo API.
It is meant to be forked, cloned, and copied so folks can play around with the API. Please customize the styling, break things, and most of all, have fun!
- Clone or fork the repo
- Run
npm i
- Create an
.env
file in root and add your Open AI API key to it (this file is not tracked)
OPENAI_API_KEY=superSecretAPIKey
- Run
npm run dev
- Open in your browser
http://localhost:3000/
- Start playing with the context you wish to add in
/app/context/index.ts
This is build using Remix (a react based framework), Typescript, and uses Tailwind for CSS. Some key notes:
- Pages can be found under
/app/routes
- Styling can be found in
/app/stylesheets
and can be added in the/app/root.tsx
file in thelinks()
function - Context for the chat interaction should be stored in
/app/context/index.ts
and should follow the data format for messages (role, content)
This repo was set up to deploy to Vercel as the main deplopyment source but you can customize it if you wish to suit your needs.
Would love to hear some feedback. Please feel free to open issues or hit me up on Twitter.