Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appwrite/assistant
Appwrite's AI assistant 🧠
https://github.com/appwrite/assistant
ai appwrite backend-as-a-service openai
Last synced: about 19 hours ago
JSON representation
Appwrite's AI assistant 🧠
- Host: GitHub
- URL: https://github.com/appwrite/assistant
- Owner: appwrite
- Created: 2023-05-19T10:14:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-20T10:31:37.000Z (19 days ago)
- Last Synced: 2025-01-30T18:13:47.158Z (8 days ago)
- Topics: ai, appwrite, backend-as-a-service, openai
- Language: JavaScript
- Homepage: https://appwrite.io
- Size: 361 KB
- Stars: 54
- Watchers: 13
- Forks: 17
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Assistant ✨
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![appwrite.io](https://img.shields.io/badge/appwrite-.io-f02e65?style=flat-square)](https://appwrite.io)Appwrite Assistant is an AI-powered API that helps you with Appwrite-related tasks, powered by the official Appwrite documentation.
## Installation
Make sure you have [pnpm](https://pnpm.io/) installed.
To install, run the following command.
```bash
pnpm i
```Next, fetch the Appwrite-specific sources used by the assistant. This will download the sources from the Appwrite documentation and store them in the `./sources` directory.
```bash
pnpm run fetch-sources
```The scripts will pull the latest documentation from the `main` branch of the [website repository](https://github.com/appwrite/website), and the latest API reference from live [Appwrite documentation](https://appwrite.io/docs).
If you want to pull from a different branch or repository, you can set the `_BUILD_GIT_URL` and `_BUILD_WEBSITE_URL` environment variables.
## Usage
First, retrieve an API key from OpenAI. You can sign up for an API key at [OpenAI](https://beta.openai.com/signup/). Once you have an API key, set it as the `_APP_ASSISTANT_OPENAI_API_KEY` environment variable.
To run the server, execute the `dev` command. By default, the server will be available at `http://localhost:3003`
```bash
pnpm run dev
```The server exposes a POST endpoint at `/`. The endpoint expects a raw text body containing the query for the assistant. The answer to the query will be streamed back to the client as raw text.
Use cURL to test the server, for example:
```bash
curl -X POST -H "Content-Type: application/json" -d "{\"prompt\": \"How do I create a new user?\"}" http://localhost:3003/v1/models/assistant/prompt
```## Contributing
All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).