hot fix storage path for unix

This commit is contained in:
timothycarambat 2023-08-10 13:50:17 -07:00
parent d6a079e8c8
commit a048cf451a
2 changed files with 12 additions and 11 deletions

View File

@ -14,7 +14,7 @@ function byteToGigaByte(n) {
async function getDiskStorage() {
try {
const checkDiskSpace = require("check-disk-space").default;
const { free, size } = await checkDiskSpace("/dev/xvda");
const { free, size } = await checkDiskSpace("/");
return {
current: Math.floor(byteToGigaByte(free)),
capacity: Math.floor(byteToGigaByte(size)),

View File

@ -357,10 +357,10 @@ const Weaviate = {
content: `${chatPrompt(workspace)}
Context:
${contextTexts
.map((text, i) => {
return `[CONTEXT ${i}]:\n${text}\n[END CONTEXT ${i}]\n\n`;
})
.join("")}`,
.map((text, i) => {
return `[CONTEXT ${i}]:\n${text}\n[END CONTEXT ${i}]\n\n`;
})
.join("")}`,
};
const memory = [prompt, { role: "user", content: input }];
const responseText = await LLMConnector.getChatCompletion(memory, {
@ -407,10 +407,10 @@ const Weaviate = {
content: `${chatPrompt(workspace)}
Context:
${contextTexts
.map((text, i) => {
return `[CONTEXT ${i}]:\n${text}\n[END CONTEXT ${i}]\n\n`;
})
.join("")}`,
.map((text, i) => {
return `[CONTEXT ${i}]:\n${text}\n[END CONTEXT ${i}]\n\n`;
})
.join("")}`,
};
const memory = [prompt, ...chatHistory, { role: "user", content: input }];
const responseText = await LLMConnector.getChatCompletion(memory, {
@ -438,8 +438,9 @@ const Weaviate = {
const details = await this.namespace(client, namespace);
await this.deleteVectorsInNamespace(client, namespace);
return {
message: `Namespace ${camelCase(namespace)} was deleted along with ${details?.vectorCount
} vectors.`,
message: `Namespace ${camelCase(namespace)} was deleted along with ${
details?.vectorCount
} vectors.`,
};
},
reset: async function () {