https://github.com/ceramicstudio/ceramic-ai
A realtime chat application using ComposeDB and OpenAI API
https://github.com/ceramicstudio/ceramic-ai
Last synced: about 1 year ago
JSON representation
A realtime chat application using ComposeDB and OpenAI API
- Host: GitHub
- URL: https://github.com/ceramicstudio/ceramic-ai
- Owner: ceramicstudio
- Created: 2023-10-06T16:15:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T22:51:22.000Z (almost 2 years ago)
- Last Synced: 2024-06-27T20:41:12.446Z (almost 2 years ago)
- Language: TypeScript
- Size: 3.27 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Save Chats and Context from OpenAI to ComposeDB on Ceramic
Realtime chat using GraphQL Live Queries, Next.js, and ComposeDB.
To follow the full tutorial, go to the [tutorial](/tutorial.md) page.
## Getting Started
1. Install your dependencies:
```bash
npm install
```
2. Generate your admin seed, admin did, and ComposeDB configuration file:
```bash
npm run generate
```
The server configuration that's auto-generated when running this command is inmemory.
3. Create a .env file and enter the three required environment variables outlined in .env.example
(the only environment variable needed for this app is an openai API key)
4. Run the application (make sure you are using node version 20):
#### Development
```bash
nvm use 20
npm run dev
```
#### Build
```bash
npm run build
```
## Learn More
To learn more about Ceramic please visit the following links
- [ComposeDB Sandbox](https://composedb.js.org/sandbox) - Test your queries directly from your browser without any local dependencies.
- [Ceramic Documentation](https://developers.ceramic.network/learn/welcome/) - Learn more about the Ceramic Ecosystem.
- [ComposeDB](https://composedb.js.org/) - Details on how to use and develop with ComposeDB!
## Credit
Credit to [ChatBase](https://github.com/notrab/chatbase) for an awesome template to work with.