Skip to content

Commit ee76783

Browse files
authored
Merge pull request #18 from gitpod-io/rebuild
2 parents cc56f82 + d737d3a commit ee76783

File tree

8 files changed

+700
-354
lines changed

8 files changed

+700
-354
lines changed

packages/api/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
},
1010
"devDependencies": {
1111
"@gitpod/docs-qa": "workspace:^",
12-
"@types/node": "^20.2.1",
13-
"dotenv": "^16.0.3",
14-
"nodemon": "^2.0.22",
15-
"pino-logflare": "^0.3.12",
12+
"@types/node": "^20.5.8",
13+
"dotenv": "^16.3.1",
14+
"nodemon": "^3.0.1",
15+
"pino-logflare": "^0.4.0",
1616
"tsm": "^2.3.0",
17-
"typescript": "^5.0.4"
17+
"typescript": "^5.2.2"
1818
},
1919
"dependencies": {
20-
"@fastify/rate-limit": "^8.0.0",
21-
"@nerujs/fastify": "^1.0.1",
22-
"@sinclair/typebox": "^0.28.11",
20+
"@fastify/rate-limit": "^8.0.3",
21+
"@nerujs/fastify": "^1.0.2",
22+
"@sinclair/typebox": "^0.31.8",
2323
"desm": "^1.3.0",
24-
"fastify": "^4.17.0",
25-
"neru": "^1.0.1",
26-
"pino-pretty": "^10.0.0",
24+
"fastify": "^4.22.2",
25+
"neru": "^1.0.2",
26+
"pino-pretty": "^10.2.0",
2727
"qabox": "^0.1.1"
2828
}
2929
}

packages/discord/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"devDependencies": {
99
"@gitpod/docs-qa": "workspace:^",
1010
"@types/common-tags": "^1.8.1",
11-
"@types/node": "^20.2.1",
11+
"@types/node": "^20.5.8",
1212
"common-tags": "^1.8.2",
13-
"discord.js": "^14.11.0",
14-
"dotenv": "^16.0.3",
13+
"discord.js": "^14.13.0",
14+
"dotenv": "^16.3.1",
1515
"hnswlib-node": "^1.4.2",
1616
"jellycommands": "1.0.0-next.43",
17-
"langchain": "^0.0.78",
17+
"langchain": "^0.0.140",
1818
"qabox": "^0.1.1",
1919
"tsm": "^2.3.0",
20-
"typescript": "^5.0.4"
20+
"typescript": "^5.2.2"
2121
}
2222
}

packages/qa/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"build": "tsm src/build.ts"
77
},
88
"devDependencies": {
9-
"@types/node": "^20.2.1",
9+
"@types/node": "^20.5.8",
1010
"desm": "^1.3.0",
1111
"hnswlib-node": "^1.4.2",
12-
"langchain": "^0.0.78",
12+
"langchain": "^0.0.140",
1313
"qabox": "^0.1.1",
14-
"simple-git": "^3.18.0",
14+
"simple-git": "^3.19.1",
1515
"totalist": "^3.0.1",
1616
"tsm": "^2.3.0",
17-
"typescript": "^5.0.4"
17+
"typescript": "^5.2.2"
1818
}
1919
}

packages/qa/src/build.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@ console.log('Finding MD files');
2222

2323
const paths: { path: string; url: string }[] = [];
2424

25-
await totalist(repoPath, (relative, path) => {
26-
if (!relative.endsWith('.md') || !relative.startsWith('src/routes')) return;
27-
28-
const pathname = relative
29-
.replace('src/routes', '')
25+
await totalist(`${repoPath}/src/content`, (relative, path) => {
26+
if (
27+
!relative.endsWith('.md') ||
28+
!['docs', 'guides'].includes(relative.slice(0, relative.indexOf('/')))
29+
)
30+
return;
31+
32+
let pathname = relative
3033
.slice(0, -3)
3134
.replace(/\/index$/gm, '/')
3235
.replace(/\/$/gm, '');
3336

3437
paths.push({
35-
url: `https://www.gitpod.io${pathname}`,
38+
url: `https://www.gitpod.io/${pathname}`,
3639
path,
3740
});
3841
});

packages/qa/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { QABox } from 'qabox';
66

77
export async function getQABox() {
88
const store = await HNSWLib.load(SEARCH_PATH, new OpenAIEmbeddings());
9-
const qabox = new QABox(store, new OpenAI({ temperature: 0 }));
9+
10+
const qabox = new QABox(
11+
store,
12+
new OpenAI({ temperature: 0, modelName: 'gpt-4' }),
13+
);
1014

1115
return qabox;
1216
}

0 commit comments

Comments
 (0)