diff --git a/server/utils/openAi/index.js b/server/utils/AiProviders/openAi/index.js similarity index 100% rename from server/utils/openAi/index.js rename to server/utils/AiProviders/openAi/index.js diff --git a/server/utils/chats/index.js b/server/utils/chats/index.js index 5e099dad0..b6f74c158 100644 --- a/server/utils/chats/index.js +++ b/server/utils/chats/index.js @@ -1,5 +1,5 @@ const { v4: uuidv4 } = require("uuid"); -const { OpenAi } = require("../openAi"); +const { OpenAi } = require("../AiProviders/openAi"); const { WorkspaceChats } = require("../../models/workspaceChats"); const { resetMemory } = require("./commands/reset"); const moment = require("moment"); diff --git a/server/utils/vectorDbProviders/chroma/index.js b/server/utils/vectorDbProviders/chroma/index.js index d66a669a1..ee8ac4850 100644 --- a/server/utils/vectorDbProviders/chroma/index.js +++ b/server/utils/vectorDbProviders/chroma/index.js @@ -8,7 +8,7 @@ const { storeVectorResult, cachedVectorInformation } = require("../../files"); const { v4: uuidv4 } = require("uuid"); const { toChunks } = require("../../helpers"); const { chatPrompt } = require("../../chats"); -const { OpenAi } = require("../../openAi"); +const { OpenAi } = require("../../AiProviders/openAi"); const Chroma = { name: "Chroma", @@ -324,10 +324,10 @@ const Chroma = { 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 openAiConnector.getChatCompletion(memory, { diff --git a/server/utils/vectorDbProviders/lance/index.js b/server/utils/vectorDbProviders/lance/index.js index 3fc0f01c3..38b30af92 100644 --- a/server/utils/vectorDbProviders/lance/index.js +++ b/server/utils/vectorDbProviders/lance/index.js @@ -5,7 +5,7 @@ const { RecursiveCharacterTextSplitter } = require("langchain/text_splitter"); const { storeVectorResult, cachedVectorInformation } = require("../../files"); const { v4: uuidv4 } = require("uuid"); const { chatPrompt } = require("../../chats"); -const { OpenAi } = require("../../openAi"); +const { OpenAi } = require("../../AiProviders/openAi"); const LanceDb = { uri: `${ diff --git a/server/utils/vectorDbProviders/pinecone/index.js b/server/utils/vectorDbProviders/pinecone/index.js index a392dc400..6021cfa37 100644 --- a/server/utils/vectorDbProviders/pinecone/index.js +++ b/server/utils/vectorDbProviders/pinecone/index.js @@ -8,7 +8,7 @@ const { storeVectorResult, cachedVectorInformation } = require("../../files"); const { v4: uuidv4 } = require("uuid"); const { toChunks } = require("../../helpers"); const { chatPrompt } = require("../../chats"); -const { OpenAi } = require("../../openAi"); +const { OpenAi } = require("../../AiProviders/openAi"); const Pinecone = { name: "Pinecone",