-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.js
More file actions
29 lines (25 loc) · 745 Bytes
/
setup.js
File metadata and controls
29 lines (25 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { runQuery } from "./utils/utils.js";
const kbName = "notes_kb";
const agentName = "notes_assistant";
async function createNotesProject() {
const query = "CREATE PROJECT IF NOT EXISTS notes_project;";
const result = await runQuery(query);
console.log("--------Project \n", result);
if (result.success) {
await createMLEngine();
}
}
async function createMLEngine() {
const query = `
CREATE ML_ENGINE IF NOT EXISTS google_gemini_engine
FROM google_gemini
USING
api_key = '${process.env.google_api_key}';
`;
const result = await runQuery(query);
console.log("\n------------ML Engine\n", result);
return result;
}
export default async function setup() {
return await createNotesProject();
}