mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-04 22:10:12 +01:00
hot fix storage path for unix
This commit is contained in:
parent
d6a079e8c8
commit
a048cf451a
@ -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)),
|
||||
|
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user