Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v1 #21

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
_APP_ASSISTANT_OPENAI_API_KEY=YOUR_OPENAI_API_KEY
_APP_ASSISTANT_OPENAI_MODEL=gpt-4o
_APP_ASSISTANT_TEMPERATURE=0.5
_APP_ASSISTANT_MAX_TOKENS=1000

_BUILD_GIT_URL=https://github.com/appwrite/website.git
_BUILD_GIT_BRANCH=main
_BUILD_WEBSITE_URL=https://appwrite.io
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.vscode
.env
venv
sources
index
.DS_Store
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV _BUILD_GIT_BRANCH=${_BUILD_GIT_BRANCH}
ENV _BUILD_WEBSITE_URL=${_BUILD_WEBSITE_URL}
ENV _BUILD_WEBSITE_VERSION=${_BUILD_WEBSITE_VERSION}

RUN pnpm run fetch-sources
RUN pnpm run index

ENV _APP_ASSISTANT_OPENAI_API_KEY=''

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ To install, run the following command.
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.
Next, fetch the Appwrite-specific sources used by the assistant. This will download the sources from the Appwrite documentation and store them in the `./index` directory.

```bash
pnpm run fetch-sources
pnpm run index
```

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).
Expand Down
30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
{
"name": "ai-api",
"name": "appwrite-assistant",
"version": "0.1.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "node src/main.js",
"test": "node scripts/test-prompts.js",
"dev": "nodemon src/main.js",
"fetch-sources": "node scripts/git-sources.js && node scripts/web-sources.js"
"index": "node scripts/git-sources.js && node scripts/web-sources.js && node scripts/vector-store.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.20.2",
"@langchain/community": "^0.3.17",
"@langchain/core": "^0.3.22",
"@langchain/openai": "^0.3.14",
"body-parser": "^1.20.3",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"execa": "^8.0.1",
"express": "^4.18.2",
"glob": "^10.3.10",
"hnswlib-node": "^1.4.2",
"langchain": "^0.0.199",
"node-html-markdown": "^1.3.0",
"nodemon": "^3.0.1",
"peggy": "^3.0.2"
"dotenv": "^16.4.7",
"execa": "^9.5.2",
"express": "^4.21.2",
"glob": "^11.0.0",
"hnswlib-node": "^3.0.0",
"html-to-text": "^9.0.5",
"langchain": "^0.3.6",
"nodemon": "^3.1.7"
},
"devDependencies": {
"@types/body-parser": "^1.19.5",
"@types/express": "^5.0.0"
},
"type": "module"
}
Loading