mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-04 22:10:12 +01:00
move OpenAI to AiProvider folder in preparation for new AI provider support
This commit is contained in:
parent
8929d96ed0
commit
9bea7739ed
@ -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");
|
||||
|
@ -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, {
|
||||
|
@ -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: `${
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user