mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-21 21:20:19 +09:00
fix: #352
This commit is contained in:
parent
f704e7a271
commit
48fe84024f
@ -31,13 +31,13 @@ async function handle(req: NextRequest) {
|
|||||||
// const pineconeIndex = pinecone.Index(serverConfig.pineconeIndex!);
|
// const pineconeIndex = pinecone.Index(serverConfig.pineconeIndex!);
|
||||||
const apiKey = getOpenAIApiKey(token);
|
const apiKey = getOpenAIApiKey(token);
|
||||||
const baseUrl = getOpenAIBaseUrl(reqBody.baseUrl);
|
const baseUrl = getOpenAIBaseUrl(reqBody.baseUrl);
|
||||||
const embeddings = new OpenAIEmbeddings(
|
const embeddings = new OpenAIEmbeddings({
|
||||||
{
|
modelName: serverConfig.ragEmbeddingModel ?? "text-embedding-3-large",
|
||||||
modelName: serverConfig.ragEmbeddingModel ?? "text-embedding-3-large",
|
openAIApiKey: apiKey,
|
||||||
openAIApiKey: apiKey,
|
configuration: {
|
||||||
|
baseURL: baseUrl,
|
||||||
},
|
},
|
||||||
{ basePath: baseUrl },
|
});
|
||||||
);
|
|
||||||
// const vectorStore = await PineconeStore.fromExistingIndex(embeddings, {
|
// const vectorStore = await PineconeStore.fromExistingIndex(embeddings, {
|
||||||
// pineconeIndex,
|
// pineconeIndex,
|
||||||
// });
|
// });
|
||||||
|
@ -94,13 +94,11 @@ async function handle(req: NextRequest) {
|
|||||||
baseUrl: process.env.OLLAMA_BASE_URL,
|
baseUrl: process.env.OLLAMA_BASE_URL,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
embeddings = new OpenAIEmbeddings(
|
embeddings = new OpenAIEmbeddings({
|
||||||
{
|
modelName: serverConfig.ragEmbeddingModel,
|
||||||
modelName: serverConfig.ragEmbeddingModel,
|
openAIApiKey: apiKey,
|
||||||
openAIApiKey: apiKey,
|
configuration: { baseURL: baseUrl },
|
||||||
},
|
});
|
||||||
{ basePath: baseUrl },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// https://js.langchain.com/docs/integrations/vectorstores/pinecone
|
// https://js.langchain.com/docs/integrations/vectorstores/pinecone
|
||||||
// https://js.langchain.com/docs/integrations/vectorstores/qdrant
|
// https://js.langchain.com/docs/integrations/vectorstores/qdrant
|
||||||
@ -181,12 +179,10 @@ async function handle(req: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function bufferToBlob(buffer: Buffer, mimeType?: string): Blob {
|
function bufferToBlob(buffer: Buffer, mimeType?: string): Blob {
|
||||||
const arrayBuffer: ArrayBuffer = buffer.buffer.slice(
|
const arrayBuffer = new Uint8Array(buffer).buffer;
|
||||||
buffer.byteOffset,
|
|
||||||
buffer.byteOffset + buffer.byteLength,
|
|
||||||
);
|
|
||||||
return new Blob([arrayBuffer], { type: mimeType || "" });
|
return new Blob([arrayBuffer], { type: mimeType || "" });
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOpenAIApiKey(token: string) {
|
function getOpenAIApiKey(token: string) {
|
||||||
const serverConfig = getServerSideConfig();
|
const serverConfig = getServerSideConfig();
|
||||||
const isApiKey = !token.startsWith(ACCESS_CODE_PREFIX);
|
const isApiKey = !token.startsWith(ACCESS_CODE_PREFIX);
|
||||||
|
@ -39,7 +39,11 @@ import {
|
|||||||
ChatPromptTemplate,
|
ChatPromptTemplate,
|
||||||
MessagesPlaceholder,
|
MessagesPlaceholder,
|
||||||
} from "@langchain/core/prompts";
|
} from "@langchain/core/prompts";
|
||||||
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
|
import {
|
||||||
|
AzureChatOpenAI,
|
||||||
|
ChatOpenAI,
|
||||||
|
OpenAIEmbeddings,
|
||||||
|
} from "@langchain/openai";
|
||||||
import { ChatAnthropic } from "@langchain/anthropic";
|
import { ChatAnthropic } from "@langchain/anthropic";
|
||||||
import {
|
import {
|
||||||
BaseMessage,
|
BaseMessage,
|
||||||
@ -74,6 +78,8 @@ export interface RequestBody {
|
|||||||
returnIntermediateSteps: boolean;
|
returnIntermediateSteps: boolean;
|
||||||
useTools: (undefined | string)[];
|
useTools: (undefined | string)[];
|
||||||
provider: ServiceProvider;
|
provider: ServiceProvider;
|
||||||
|
max_tokens?: number;
|
||||||
|
max_completion_tokens?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ResponseBody {
|
export class ResponseBody {
|
||||||
@ -254,14 +260,14 @@ export class AgentApi {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new ChatOpenAI(
|
return new ChatOpenAI({
|
||||||
{
|
temperature: 0,
|
||||||
temperature: 0,
|
modelName: reqBody.model,
|
||||||
modelName: reqBody.model,
|
openAIApiKey: apiKey,
|
||||||
openAIApiKey: apiKey,
|
configuration: {
|
||||||
|
baseURL: baseUrl,
|
||||||
},
|
},
|
||||||
{ basePath: baseUrl },
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getToolEmbeddings(reqBody: RequestBody, apiKey: string, baseUrl: string) {
|
getToolEmbeddings(reqBody: RequestBody, apiKey: string, baseUrl: string) {
|
||||||
@ -275,19 +281,19 @@ export class AgentApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new OpenAIEmbeddings(
|
return new OpenAIEmbeddings({
|
||||||
{
|
openAIApiKey: apiKey,
|
||||||
openAIApiKey: apiKey,
|
configuration: {
|
||||||
|
baseURL: baseUrl,
|
||||||
},
|
},
|
||||||
{ basePath: baseUrl },
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLLM(reqBody: RequestBody, apiKey: string, baseUrl: string) {
|
getLLM(reqBody: RequestBody, apiKey: string, baseUrl: string) {
|
||||||
const serverConfig = getServerSideConfig();
|
const serverConfig = getServerSideConfig();
|
||||||
if (reqBody.isAzure || serverConfig.isAzure) {
|
if (reqBody.isAzure || serverConfig.isAzure) {
|
||||||
console.log("[use Azure ChatOpenAI]");
|
console.log("[use Azure ChatOpenAI]");
|
||||||
return new ChatOpenAI({
|
return new AzureChatOpenAI({
|
||||||
temperature: reqBody.temperature,
|
temperature: reqBody.temperature,
|
||||||
streaming: reqBody.stream,
|
streaming: reqBody.stream,
|
||||||
topP: reqBody.top_p,
|
topP: reqBody.top_p,
|
||||||
@ -299,22 +305,26 @@ export class AgentApi {
|
|||||||
: serverConfig.azureApiVersion,
|
: serverConfig.azureApiVersion,
|
||||||
azureOpenAIApiDeploymentName: reqBody.model,
|
azureOpenAIApiDeploymentName: reqBody.model,
|
||||||
azureOpenAIBasePath: baseUrl,
|
azureOpenAIBasePath: baseUrl,
|
||||||
|
maxTokens: reqBody.max_tokens,
|
||||||
|
maxCompletionTokens: reqBody.max_completion_tokens,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (reqBody.provider === ServiceProvider.OpenAI) {
|
if (reqBody.provider === ServiceProvider.OpenAI) {
|
||||||
console.log("[use ChatOpenAI]");
|
console.log("[use ChatOpenAI]");
|
||||||
return new ChatOpenAI(
|
return new ChatOpenAI({
|
||||||
{
|
modelName: reqBody.model,
|
||||||
modelName: reqBody.model,
|
openAIApiKey: apiKey,
|
||||||
openAIApiKey: apiKey,
|
temperature: reqBody.temperature,
|
||||||
temperature: reqBody.temperature,
|
streaming: reqBody.stream,
|
||||||
streaming: reqBody.stream,
|
topP: reqBody.top_p,
|
||||||
topP: reqBody.top_p,
|
presencePenalty: reqBody.presence_penalty,
|
||||||
presencePenalty: reqBody.presence_penalty,
|
frequencyPenalty: reqBody.frequency_penalty,
|
||||||
frequencyPenalty: reqBody.frequency_penalty,
|
maxTokens: reqBody.max_tokens,
|
||||||
|
maxCompletionTokens: reqBody.max_completion_tokens,
|
||||||
|
configuration: {
|
||||||
|
baseURL: baseUrl,
|
||||||
},
|
},
|
||||||
{ basePath: baseUrl },
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (reqBody.provider === ServiceProvider.Anthropic) {
|
if (reqBody.provider === ServiceProvider.Anthropic) {
|
||||||
console.log("[use ChatAnthropic]");
|
console.log("[use ChatAnthropic]");
|
||||||
@ -439,11 +449,16 @@ export class AgentApi {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const pastMessages = new Array();
|
const pastMessages = new Array();
|
||||||
|
const isO1OrO3 =
|
||||||
|
reqBody.model.startsWith("o1") || reqBody.model.startsWith("o3");
|
||||||
reqBody.messages
|
reqBody.messages
|
||||||
.slice(0, reqBody.messages.length - 1)
|
.slice(0, reqBody.messages.length - 1)
|
||||||
.forEach((message) => {
|
.forEach((message) => {
|
||||||
if (message.role === "system" && typeof message.content === "string")
|
if (
|
||||||
|
!isO1OrO3 &&
|
||||||
|
message.role === "system" &&
|
||||||
|
typeof message.content === "string"
|
||||||
|
)
|
||||||
pastMessages.push(new SystemMessage(message.content));
|
pastMessages.push(new SystemMessage(message.content));
|
||||||
if (message.role === "user")
|
if (message.role === "user")
|
||||||
typeof message.content === "string"
|
typeof message.content === "string"
|
||||||
@ -458,6 +473,15 @@ export class AgentApi {
|
|||||||
pastMessages.push(new AIMessage(message.content));
|
pastMessages.push(new AIMessage(message.content));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
reqBody.temperature = !isO1OrO3 ? reqBody.temperature : 1;
|
||||||
|
reqBody.presence_penalty = !isO1OrO3 ? reqBody.presence_penalty : 0;
|
||||||
|
reqBody.frequency_penalty = !isO1OrO3 ? reqBody.frequency_penalty : 0;
|
||||||
|
reqBody.top_p = !isO1OrO3 ? reqBody.top_p : 1;
|
||||||
|
|
||||||
|
if (isO1OrO3) {
|
||||||
|
reqBody.max_completion_tokens = reqBody.max_tokens;
|
||||||
|
}
|
||||||
|
|
||||||
let llm = this.getLLM(reqBody, apiKey, baseUrl);
|
let llm = this.getLLM(reqBody, apiKey, baseUrl);
|
||||||
|
|
||||||
const MEMORY_KEY = "chat_history";
|
const MEMORY_KEY = "chat_history";
|
||||||
|
@ -49,14 +49,11 @@ async function handle(req: NextRequest) {
|
|||||||
baseUrl: process.env.OLLAMA_BASE_URL,
|
baseUrl: process.env.OLLAMA_BASE_URL,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ragEmbeddings = new OpenAIEmbeddings(
|
ragEmbeddings = new OpenAIEmbeddings({
|
||||||
{
|
modelName: process.env.RAG_EMBEDDING_MODEL ?? "text-embedding-3-large",
|
||||||
modelName:
|
openAIApiKey: apiKey,
|
||||||
process.env.RAG_EMBEDDING_MODEL ?? "text-embedding-3-large",
|
configuration: { baseURL: baseUrl },
|
||||||
openAIApiKey: apiKey,
|
});
|
||||||
},
|
|
||||||
{ basePath: baseUrl },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var dalleCallback = async (data: string) => {
|
var dalleCallback = async (data: string) => {
|
||||||
|
@ -21,6 +21,7 @@ import {
|
|||||||
preProcessImageAndWebReferenceContent,
|
preProcessImageAndWebReferenceContent,
|
||||||
preProcessImageContent,
|
preProcessImageContent,
|
||||||
stream,
|
stream,
|
||||||
|
streamWithThink,
|
||||||
} from "@/app/utils/chat";
|
} from "@/app/utils/chat";
|
||||||
import { cloudflareAIGatewayUrl } from "@/app/utils/cloudflare";
|
import { cloudflareAIGatewayUrl } from "@/app/utils/cloudflare";
|
||||||
import { DalleSize, DalleQuality, DalleStyle } from "@/app/typing";
|
import { DalleSize, DalleQuality, DalleStyle } from "@/app/typing";
|
||||||
@ -49,6 +50,7 @@ import {
|
|||||||
isVisionModel,
|
isVisionModel,
|
||||||
isDalle3 as _isDalle3,
|
isDalle3 as _isDalle3,
|
||||||
getWebReferenceMessageTextContent,
|
getWebReferenceMessageTextContent,
|
||||||
|
getTimeoutMSByModel,
|
||||||
} from "@/app/utils";
|
} from "@/app/utils";
|
||||||
|
|
||||||
export interface OpenAIListModelResponse {
|
export interface OpenAIListModelResponse {
|
||||||
@ -73,6 +75,7 @@ export interface RequestPayload {
|
|||||||
frequency_penalty: number;
|
frequency_penalty: number;
|
||||||
top_p: number;
|
top_p: number;
|
||||||
max_tokens?: number;
|
max_tokens?: number;
|
||||||
|
max_completion_tokens?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DalleRequestPayload {
|
export interface DalleRequestPayload {
|
||||||
@ -223,7 +226,9 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
let requestPayload: RequestPayload | DalleRequestPayload;
|
let requestPayload: RequestPayload | DalleRequestPayload;
|
||||||
|
|
||||||
const isDalle3 = _isDalle3(options.config.model);
|
const isDalle3 = _isDalle3(options.config.model);
|
||||||
const isO1 = options.config.model.startsWith("o1");
|
const isO1OrO3 =
|
||||||
|
options.config.model.startsWith("o1") ||
|
||||||
|
options.config.model.startsWith("o3");
|
||||||
if (isDalle3) {
|
if (isDalle3) {
|
||||||
const prompt = getMessageTextContent(
|
const prompt = getMessageTextContent(
|
||||||
options.messages.slice(-1)?.pop() as any,
|
options.messages.slice(-1)?.pop() as any,
|
||||||
@ -245,23 +250,28 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
const content = visionModel
|
const content = visionModel
|
||||||
? await preProcessImageAndWebReferenceContent(v)
|
? await preProcessImageAndWebReferenceContent(v)
|
||||||
: getWebReferenceMessageTextContent(v);
|
: getWebReferenceMessageTextContent(v);
|
||||||
if (!(isO1 && v.role === "system"))
|
if (!(isO1OrO3 && v.role === "system"))
|
||||||
messages.push({ role: v.role, content });
|
messages.push({ role: v.role, content });
|
||||||
}
|
}
|
||||||
|
|
||||||
// O1 not support image, tools (plugin in ChatGPTNextWeb) and system, stream, logprobs, temperature, top_p, n, presence_penalty, frequency_penalty yet.
|
// O1 not support image, tools (plugin in ChatGPTNextWeb) and system, stream, logprobs, temperature, top_p, n, presence_penalty, frequency_penalty yet.
|
||||||
requestPayload = {
|
requestPayload = {
|
||||||
messages,
|
messages,
|
||||||
stream: !isO1 ? options.config.stream : false,
|
stream: options.config.stream,
|
||||||
model: modelConfig.model,
|
model: modelConfig.model,
|
||||||
temperature: !isO1 ? modelConfig.temperature : 1,
|
temperature: !isO1OrO3 ? modelConfig.temperature : 1,
|
||||||
presence_penalty: !isO1 ? modelConfig.presence_penalty : 0,
|
presence_penalty: !isO1OrO3 ? modelConfig.presence_penalty : 0,
|
||||||
frequency_penalty: !isO1 ? modelConfig.frequency_penalty : 0,
|
frequency_penalty: !isO1OrO3 ? modelConfig.frequency_penalty : 0,
|
||||||
top_p: !isO1 ? modelConfig.top_p : 1,
|
top_p: !isO1OrO3 ? modelConfig.top_p : 1,
|
||||||
// max_tokens: Math.max(modelConfig.max_tokens, 1024),
|
// max_tokens: Math.max(modelConfig.max_tokens, 1024),
|
||||||
// Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
|
// Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// O1 使用 max_completion_tokens 控制token数 (https://platform.openai.com/docs/guides/reasoning#controlling-costs)
|
||||||
|
if (isO1OrO3) {
|
||||||
|
requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
|
||||||
|
}
|
||||||
|
|
||||||
// add max_tokens to vision model
|
// add max_tokens to vision model
|
||||||
if (visionModel) {
|
if (visionModel) {
|
||||||
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
|
requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
|
||||||
@ -270,7 +280,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
|
|
||||||
console.log("[Request] openai payload: ", requestPayload);
|
console.log("[Request] openai payload: ", requestPayload);
|
||||||
|
|
||||||
const shouldStream = !isDalle3 && !!options.config.stream && !isO1;
|
const shouldStream = !isDalle3 && !!options.config.stream;
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
options.onController?.(controller);
|
options.onController?.(controller);
|
||||||
|
|
||||||
@ -307,15 +317,16 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (shouldStream) {
|
if (shouldStream) {
|
||||||
|
let index = -1;
|
||||||
// const [tools, funcs] = usePluginStore
|
// const [tools, funcs] = usePluginStore
|
||||||
// .getState()
|
// .getState()
|
||||||
// .getAsTools(
|
// .getAsTools(
|
||||||
// useChatStore.getState().currentSession().mask?.plugin || [],
|
// useChatStore.getState().currentSession().mask?.plugin || [],
|
||||||
// );
|
// );
|
||||||
// console.log("getAsTools", tools, funcs);
|
|
||||||
const tools = null;
|
const tools = null;
|
||||||
const funcs: Record<string, Function> = {};
|
const funcs: Record<string, Function> = {};
|
||||||
stream(
|
// console.log("getAsTools", tools, funcs);
|
||||||
|
streamWithThink(
|
||||||
chatPath,
|
chatPath,
|
||||||
requestPayload,
|
requestPayload,
|
||||||
getHeaders(),
|
getHeaders(),
|
||||||
@ -330,14 +341,18 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
delta: {
|
delta: {
|
||||||
content: string;
|
content: string;
|
||||||
tool_calls: ChatMessageTool[];
|
tool_calls: ChatMessageTool[];
|
||||||
|
reasoning_content: string | null;
|
||||||
};
|
};
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
if (!choices?.length) return { isThinking: false, content: "" };
|
||||||
|
|
||||||
const tool_calls = choices[0]?.delta?.tool_calls;
|
const tool_calls = choices[0]?.delta?.tool_calls;
|
||||||
if (tool_calls?.length > 0) {
|
if (tool_calls?.length > 0) {
|
||||||
const index = tool_calls[0]?.index;
|
|
||||||
const id = tool_calls[0]?.id;
|
const id = tool_calls[0]?.id;
|
||||||
const args = tool_calls[0]?.function?.arguments;
|
const args = tool_calls[0]?.function?.arguments;
|
||||||
if (id) {
|
if (id) {
|
||||||
|
index += 1;
|
||||||
runTools.push({
|
runTools.push({
|
||||||
id,
|
id,
|
||||||
type: tool_calls[0]?.type,
|
type: tool_calls[0]?.type,
|
||||||
@ -351,7 +366,37 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
runTools[index]["function"]["arguments"] += args;
|
runTools[index]["function"]["arguments"] += args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return choices[0]?.delta?.content;
|
|
||||||
|
const reasoning = choices[0]?.delta?.reasoning_content;
|
||||||
|
const content = choices[0]?.delta?.content;
|
||||||
|
|
||||||
|
// Skip if both content and reasoning_content are empty or null
|
||||||
|
if (
|
||||||
|
(!reasoning || reasoning.length === 0) &&
|
||||||
|
(!content || content.length === 0)
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
isThinking: false,
|
||||||
|
content: "",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reasoning && reasoning.length > 0) {
|
||||||
|
return {
|
||||||
|
isThinking: true,
|
||||||
|
content: reasoning,
|
||||||
|
};
|
||||||
|
} else if (content && content.length > 0) {
|
||||||
|
return {
|
||||||
|
isThinking: false,
|
||||||
|
content: content,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isThinking: false,
|
||||||
|
content: "",
|
||||||
|
};
|
||||||
},
|
},
|
||||||
// processToolMessage, include tool_calls message and tool call results
|
// processToolMessage, include tool_calls message and tool call results
|
||||||
(
|
(
|
||||||
@ -359,6 +404,8 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
toolCallMessage: any,
|
toolCallMessage: any,
|
||||||
toolCallResult: any[],
|
toolCallResult: any[],
|
||||||
) => {
|
) => {
|
||||||
|
// reset index value
|
||||||
|
index = -1;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
requestPayload?.messages?.splice(
|
requestPayload?.messages?.splice(
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -381,7 +428,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
// make a fetch request
|
// make a fetch request
|
||||||
const requestTimeoutId = setTimeout(
|
const requestTimeoutId = setTimeout(
|
||||||
() => controller.abort(),
|
() => controller.abort(),
|
||||||
isDalle3 || isO1 ? REQUEST_TIMEOUT_MS * 2 : REQUEST_TIMEOUT_MS, // dalle3 using b64_json is slow.
|
getTimeoutMSByModel(options.config.model),
|
||||||
);
|
);
|
||||||
|
|
||||||
const res = await fetch(chatPath, chatPayload);
|
const res = await fetch(chatPath, chatPayload);
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"@langchain/groq": "^0.0.16",
|
"@langchain/groq": "^0.0.16",
|
||||||
"@langchain/langgraph": "^0.0.33",
|
"@langchain/langgraph": "^0.0.33",
|
||||||
"@langchain/ollama": "^0.0.4",
|
"@langchain/ollama": "^0.0.4",
|
||||||
"@langchain/openai": "^0.2.6",
|
"@langchain/openai": "^0.4.4",
|
||||||
"@next/third-parties": "^14.1.0",
|
"@next/third-parties": "^14.1.0",
|
||||||
"@pinecone-database/pinecone": "^2.2.0",
|
"@pinecone-database/pinecone": "^2.2.0",
|
||||||
"@qdrant/js-client-rest": "^1.8.2",
|
"@qdrant/js-client-rest": "^1.8.2",
|
||||||
|
200
yarn.lock
200
yarn.lock
@ -2516,7 +2516,17 @@
|
|||||||
zod "^3.22.4"
|
zod "^3.22.4"
|
||||||
zod-to-json-schema "^3.22.3"
|
zod-to-json-schema "^3.22.3"
|
||||||
|
|
||||||
"@langchain/openai@^0.2.6", "@langchain/openai@~0.2.6":
|
"@langchain/openai@^0.4.4":
|
||||||
|
version "0.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.4.4.tgz#1832420495c53c28aa4e6515583bad8f0b83a637"
|
||||||
|
integrity sha512-UZybJeMd8+UX7Kn47kuFYfqKdBCeBUWNqDtmAr6ZUIMMnlsNIb6MkrEEhGgAEjGCpdT4CU8U/DyyddTz+JayOQ==
|
||||||
|
dependencies:
|
||||||
|
js-tiktoken "^1.0.12"
|
||||||
|
openai "^4.77.0"
|
||||||
|
zod "^3.22.4"
|
||||||
|
zod-to-json-schema "^3.22.3"
|
||||||
|
|
||||||
|
"@langchain/openai@~0.2.6":
|
||||||
version "0.2.6"
|
version "0.2.6"
|
||||||
resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.2.6.tgz#644391f26a3ad89778c17484efc1a4e8bfc04ead"
|
resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.2.6.tgz#644391f26a3ad89778c17484efc1a4e8bfc04ead"
|
||||||
integrity sha512-LZgSzHOZPJGsZr2ZXJICqZo1GN0kUyP9/RN+T45g7HDdMRfS5Df7fJgY9w7EIfznT83Q0Ywhz+At/UvWMR3xhw==
|
integrity sha512-LZgSzHOZPJGsZr2ZXJICqZo1GN0kUyP9/RN+T45g7HDdMRfS5Df7fJgY9w7EIfznT83Q0Ywhz+At/UvWMR3xhw==
|
||||||
@ -3708,24 +3718,31 @@
|
|||||||
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
|
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
|
||||||
|
|
||||||
"@types/node-fetch@^2.6.4":
|
"@types/node-fetch@^2.6.4":
|
||||||
version "2.6.11"
|
version "2.6.12"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24"
|
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03"
|
||||||
integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==
|
integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
form-data "^4.0.0"
|
form-data "^4.0.0"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@^20.11.30":
|
"@types/node@*":
|
||||||
version "20.14.11"
|
version "22.13.9"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.9.tgz#5d9a8f7a975a5bd3ef267352deb96fb13ec02eca"
|
||||||
integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==
|
integrity sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==
|
||||||
|
dependencies:
|
||||||
|
undici-types "~6.20.0"
|
||||||
|
|
||||||
|
"@types/node@^18.11.18":
|
||||||
|
version "18.19.79"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.79.tgz#82fde7ac17809f4738a494b22273f0f7e6754f6e"
|
||||||
|
integrity sha512-90K8Oayimbctc5zTPHPfZloc/lGVs7f3phUAAMcTgEPtg8kKquGZDERC8K4vkBYkQQh48msiYUslYtxTWvqcAg==
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types "~5.26.4"
|
undici-types "~5.26.4"
|
||||||
|
|
||||||
"@types/node@^18.11.18":
|
"@types/node@^20.11.30":
|
||||||
version "18.19.41"
|
version "20.14.11"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.41.tgz#27695cf2cac63f22c202b9217c0bcf3fb192a2f0"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b"
|
||||||
integrity sha512-LX84pRJ+evD2e2nrgYCHObGWkiQJ1mL+meAgbvnwk/US6vmMY7S2ygBTGV2Jw91s9vUsLSXeDEkUHZIJGLrhsg==
|
integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types "~5.26.4"
|
undici-types "~5.26.4"
|
||||||
|
|
||||||
@ -3796,6 +3813,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
|
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
|
||||||
integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==
|
integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==
|
||||||
|
|
||||||
|
"@types/uuid@^10.0.0":
|
||||||
|
version "10.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d"
|
||||||
|
integrity sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==
|
||||||
|
|
||||||
"@types/uuid@^9.0.1":
|
"@types/uuid@^9.0.1":
|
||||||
version "9.0.8"
|
version "9.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba"
|
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba"
|
||||||
@ -4084,9 +4106,9 @@ agent-base@^7.0.2:
|
|||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
|
|
||||||
agentkeepalive@^4.2.1:
|
agentkeepalive@^4.2.1:
|
||||||
version "4.5.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923"
|
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a"
|
||||||
integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==
|
integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
humanize-ms "^1.2.1"
|
humanize-ms "^1.2.1"
|
||||||
|
|
||||||
@ -4598,6 +4620,14 @@ busboy@1.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
streamsearch "^1.1.0"
|
streamsearch "^1.1.0"
|
||||||
|
|
||||||
|
call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6"
|
||||||
|
integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==
|
||||||
|
dependencies:
|
||||||
|
es-errors "^1.3.0"
|
||||||
|
function-bind "^1.1.2"
|
||||||
|
|
||||||
call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7:
|
call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
|
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
|
||||||
@ -5760,6 +5790,15 @@ duck@^0.1.12:
|
|||||||
dependencies:
|
dependencies:
|
||||||
underscore "^1.13.1"
|
underscore "^1.13.1"
|
||||||
|
|
||||||
|
dunder-proto@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a"
|
||||||
|
integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==
|
||||||
|
dependencies:
|
||||||
|
call-bind-apply-helpers "^1.0.1"
|
||||||
|
es-errors "^1.3.0"
|
||||||
|
gopd "^1.2.0"
|
||||||
|
|
||||||
eastasianwidth@^0.2.0:
|
eastasianwidth@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
|
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
|
||||||
@ -5917,6 +5956,11 @@ es-define-property@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
get-intrinsic "^1.2.4"
|
get-intrinsic "^1.2.4"
|
||||||
|
|
||||||
|
es-define-property@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa"
|
||||||
|
integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
|
||||||
|
|
||||||
es-errors@^1.2.1, es-errors@^1.3.0:
|
es-errors@^1.2.1, es-errors@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
|
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
|
||||||
@ -5969,6 +6013,13 @@ es-object-atoms@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
es-errors "^1.3.0"
|
es-errors "^1.3.0"
|
||||||
|
|
||||||
|
es-object-atoms@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
|
||||||
|
integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
|
||||||
|
dependencies:
|
||||||
|
es-errors "^1.3.0"
|
||||||
|
|
||||||
es-set-tostringtag@^2.0.3:
|
es-set-tostringtag@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777"
|
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777"
|
||||||
@ -5978,6 +6029,16 @@ es-set-tostringtag@^2.0.3:
|
|||||||
has-tostringtag "^1.0.2"
|
has-tostringtag "^1.0.2"
|
||||||
hasown "^2.0.1"
|
hasown "^2.0.1"
|
||||||
|
|
||||||
|
es-set-tostringtag@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d"
|
||||||
|
integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==
|
||||||
|
dependencies:
|
||||||
|
es-errors "^1.3.0"
|
||||||
|
get-intrinsic "^1.2.6"
|
||||||
|
has-tostringtag "^1.0.2"
|
||||||
|
hasown "^2.0.2"
|
||||||
|
|
||||||
es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2:
|
es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763"
|
resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763"
|
||||||
@ -6585,12 +6646,13 @@ form-data-encoder@1.7.2:
|
|||||||
integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==
|
integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==
|
||||||
|
|
||||||
form-data@^4.0.0:
|
form-data@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
|
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.2.tgz#35cabbdd30c3ce73deb2c42d3c8d3ed9ca51794c"
|
||||||
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
|
integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==
|
||||||
dependencies:
|
dependencies:
|
||||||
asynckit "^0.4.0"
|
asynckit "^0.4.0"
|
||||||
combined-stream "^1.0.8"
|
combined-stream "^1.0.8"
|
||||||
|
es-set-tostringtag "^2.1.0"
|
||||||
mime-types "^2.1.12"
|
mime-types "^2.1.12"
|
||||||
|
|
||||||
format@^0.2.0:
|
format@^0.2.0:
|
||||||
@ -6674,11 +6736,35 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@
|
|||||||
has-symbols "^1.0.3"
|
has-symbols "^1.0.3"
|
||||||
hasown "^2.0.0"
|
hasown "^2.0.0"
|
||||||
|
|
||||||
|
get-intrinsic@^1.2.6:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01"
|
||||||
|
integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==
|
||||||
|
dependencies:
|
||||||
|
call-bind-apply-helpers "^1.0.2"
|
||||||
|
es-define-property "^1.0.1"
|
||||||
|
es-errors "^1.3.0"
|
||||||
|
es-object-atoms "^1.1.1"
|
||||||
|
function-bind "^1.1.2"
|
||||||
|
get-proto "^1.0.1"
|
||||||
|
gopd "^1.2.0"
|
||||||
|
has-symbols "^1.1.0"
|
||||||
|
hasown "^2.0.2"
|
||||||
|
math-intrinsics "^1.1.0"
|
||||||
|
|
||||||
get-package-type@^0.1.0:
|
get-package-type@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
|
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
|
||||||
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
|
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
|
||||||
|
|
||||||
|
get-proto@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1"
|
||||||
|
integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==
|
||||||
|
dependencies:
|
||||||
|
dunder-proto "^1.0.1"
|
||||||
|
es-object-atoms "^1.0.0"
|
||||||
|
|
||||||
get-stream@^2.2.0:
|
get-stream@^2.2.0:
|
||||||
version "2.3.1"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de"
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de"
|
||||||
@ -6795,6 +6881,11 @@ gopd@^1.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
get-intrinsic "^1.1.3"
|
get-intrinsic "^1.1.3"
|
||||||
|
|
||||||
|
gopd@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
|
||||||
|
integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
|
||||||
|
|
||||||
graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
|
graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
|
||||||
version "4.2.11"
|
version "4.2.11"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||||
@ -6851,6 +6942,11 @@ has-symbols@^1.0.2, has-symbols@^1.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
||||||
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
||||||
|
|
||||||
|
has-symbols@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338"
|
||||||
|
integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==
|
||||||
|
|
||||||
has-tostringtag@^1.0.0, has-tostringtag@^1.0.2:
|
has-tostringtag@^1.0.0, has-tostringtag@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
|
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
|
||||||
@ -7877,14 +7973,7 @@ jest@^29.7.0:
|
|||||||
import-local "^3.0.2"
|
import-local "^3.0.2"
|
||||||
jest-cli "^29.7.0"
|
jest-cli "^29.7.0"
|
||||||
|
|
||||||
js-tiktoken@^1.0.12:
|
js-tiktoken@^1.0.12, js-tiktoken@^1.0.14:
|
||||||
version "1.0.12"
|
|
||||||
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.12.tgz#af0f5cf58e5e7318240d050c8413234019424211"
|
|
||||||
integrity sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ==
|
|
||||||
dependencies:
|
|
||||||
base64-js "^1.5.1"
|
|
||||||
|
|
||||||
js-tiktoken@^1.0.14:
|
|
||||||
version "1.0.19"
|
version "1.0.19"
|
||||||
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.19.tgz#0298b584382f1d47d4b45cb93d382f11780eab78"
|
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.19.tgz#0298b584382f1d47d4b45cb93d382f11780eab78"
|
||||||
integrity sha512-XC63YQeEcS47Y53gg950xiZ4IWmkfMe4p2V9OSaBt26q+p47WHn18izuXzSclCI73B7yGqtfRsT6jcZQI0y08g==
|
integrity sha512-XC63YQeEcS47Y53gg950xiZ4IWmkfMe4p2V9OSaBt26q+p47WHn18izuXzSclCI73B7yGqtfRsT6jcZQI0y08g==
|
||||||
@ -8096,7 +8185,7 @@ langchainhub@~0.0.8:
|
|||||||
resolved "https://registry.yarnpkg.com/langchainhub/-/langchainhub-0.0.11.tgz#2ce22def9c84699dcbd4fd4b78270d34bd2a9ae9"
|
resolved "https://registry.yarnpkg.com/langchainhub/-/langchainhub-0.0.11.tgz#2ce22def9c84699dcbd4fd4b78270d34bd2a9ae9"
|
||||||
integrity sha512-WnKI4g9kU2bHQP136orXr2bcRdgz9iiTBpTN0jWt9IlScUKnJBoD0aa2HOzHURQKeQDnt2JwqVmQ6Depf5uDLQ==
|
integrity sha512-WnKI4g9kU2bHQP136orXr2bcRdgz9iiTBpTN0jWt9IlScUKnJBoD0aa2HOzHURQKeQDnt2JwqVmQ6Depf5uDLQ==
|
||||||
|
|
||||||
langsmith@~0.1.30, langsmith@~0.1.39:
|
langsmith@~0.1.30:
|
||||||
version "0.1.40"
|
version "0.1.40"
|
||||||
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.40.tgz#9708889386a5b9d0eb43dd3a9eba93513b57101d"
|
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.40.tgz#9708889386a5b9d0eb43dd3a9eba93513b57101d"
|
||||||
integrity sha512-11E2WLbh/+41+Qc0w8fJJTC/iz91BA+zXRMX/Wz0KSstnfzIPBoiWa++Kp2X8yCIDNywWWLJhy/B8gYzm7VKig==
|
integrity sha512-11E2WLbh/+41+Qc0w8fJJTC/iz91BA+zXRMX/Wz0KSstnfzIPBoiWa++Kp2X8yCIDNywWWLJhy/B8gYzm7VKig==
|
||||||
@ -8108,6 +8197,18 @@ langsmith@~0.1.30, langsmith@~0.1.39:
|
|||||||
semver "^7.6.3"
|
semver "^7.6.3"
|
||||||
uuid "^9.0.0"
|
uuid "^9.0.0"
|
||||||
|
|
||||||
|
langsmith@~0.1.39:
|
||||||
|
version "0.1.68"
|
||||||
|
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.68.tgz#848332e822fe5e6734a07f1c36b6530cc1798afb"
|
||||||
|
integrity sha512-otmiysWtVAqzMx3CJ4PrtUBhWRG5Co8Z4o7hSZENPjlit9/j3/vm3TSvbaxpDYakZxtMjhkcJTqrdYFipISEiQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/uuid" "^10.0.0"
|
||||||
|
commander "^10.0.1"
|
||||||
|
p-queue "^6.6.2"
|
||||||
|
p-retry "4"
|
||||||
|
semver "^7.6.3"
|
||||||
|
uuid "^10.0.0"
|
||||||
|
|
||||||
langsmith@~0.1.40:
|
langsmith@~0.1.40:
|
||||||
version "0.1.41"
|
version "0.1.41"
|
||||||
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.41.tgz#8a496ee53e93bb1f7e11841201237286ceee8527"
|
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.41.tgz#8a496ee53e93bb1f7e11841201237286ceee8527"
|
||||||
@ -8372,6 +8473,11 @@ marked@^4.0.14:
|
|||||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
|
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
|
||||||
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
|
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
|
||||||
|
|
||||||
|
math-intrinsics@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
|
||||||
|
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
|
||||||
|
|
||||||
md5@^2.3.0:
|
md5@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f"
|
resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f"
|
||||||
@ -9283,10 +9389,10 @@ openai@^4.49.1:
|
|||||||
formdata-node "^4.3.2"
|
formdata-node "^4.3.2"
|
||||||
node-fetch "^2.6.7"
|
node-fetch "^2.6.7"
|
||||||
|
|
||||||
openai@^4.55.0:
|
openai@^4.55.0, openai@^4.77.0:
|
||||||
version "4.55.4"
|
version "4.86.2"
|
||||||
resolved "https://registry.yarnpkg.com/openai/-/openai-4.55.4.tgz#2f188e718e668f478f40c03012d92394e0c3d1b1"
|
resolved "https://registry.yarnpkg.com/openai/-/openai-4.86.2.tgz#d3ba44c6b81471b9e2d38515e0ab86ad73a02c85"
|
||||||
integrity sha512-TEC75Y6U/OKIJp9fHao3zkTYfKLYGqXdD2TI+xN2Zd5W8KNKvv6E4/OBTOW7jg7fySfrBrhy5fYzBbyBcdHEtQ==
|
integrity sha512-nvYeFjmjdSu6/msld+22JoUlCICNk/lUFpSMmc6KNhpeNLpqL70TqbD/8Vura/tFmYqHKW0trcjgPwUpKSPwaA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "^18.11.18"
|
"@types/node" "^18.11.18"
|
||||||
"@types/node-fetch" "^2.6.4"
|
"@types/node-fetch" "^2.6.4"
|
||||||
@ -10199,11 +10305,16 @@ semver@^6.3.0, semver@^6.3.1:
|
|||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
|
||||||
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
||||||
|
|
||||||
semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3:
|
semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0:
|
||||||
version "7.6.3"
|
version "7.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
|
||||||
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
|
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
|
||||||
|
|
||||||
|
semver@^7.6.3:
|
||||||
|
version "7.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
|
||||||
|
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==
|
||||||
|
|
||||||
serialize-javascript@^6.0.1:
|
serialize-javascript@^6.0.1:
|
||||||
version "6.0.2"
|
version "6.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"
|
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"
|
||||||
@ -11016,6 +11127,11 @@ undici-types@~5.26.4:
|
|||||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||||
|
|
||||||
|
undici-types@~6.20.0:
|
||||||
|
version "6.20.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
|
||||||
|
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
|
||||||
|
|
||||||
undici@~5.28.4:
|
undici@~5.28.4:
|
||||||
version "5.28.4"
|
version "5.28.4"
|
||||||
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068"
|
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068"
|
||||||
@ -11554,21 +11670,31 @@ yocto-queue@^0.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
||||||
|
|
||||||
zod-to-json-schema@^3.22.3, zod-to-json-schema@^3.22.5:
|
zod-to-json-schema@^3.22.3:
|
||||||
version "3.23.1"
|
version "3.24.3"
|
||||||
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.1.tgz#5225925b8ed5fa20096bd99be076c4b29b53d309"
|
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.24.3.tgz#5958ba111d681f8d01c5b6b647425c9b8a6059e7"
|
||||||
integrity sha512-oT9INvydob1XV0v1d2IadrR74rLtDInLvDFfAa1CG0Pmg/vxATk7I2gSelfj271mbzeM4Da0uuDQE/Nkj3DWNw==
|
integrity sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==
|
||||||
|
|
||||||
zod-to-json-schema@^3.22.4:
|
zod-to-json-schema@^3.22.4:
|
||||||
version "3.23.2"
|
version "3.23.2"
|
||||||
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.2.tgz#bc7e379c8050462538383e382964c03d8fe008f9"
|
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.2.tgz#bc7e379c8050462538383e382964c03d8fe008f9"
|
||||||
integrity sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==
|
integrity sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==
|
||||||
|
|
||||||
zod@^3.22.3, zod@^3.22.4, zod@^3.23.8:
|
zod-to-json-schema@^3.22.5:
|
||||||
|
version "3.23.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.1.tgz#5225925b8ed5fa20096bd99be076c4b29b53d309"
|
||||||
|
integrity sha512-oT9INvydob1XV0v1d2IadrR74rLtDInLvDFfAa1CG0Pmg/vxATk7I2gSelfj271mbzeM4Da0uuDQE/Nkj3DWNw==
|
||||||
|
|
||||||
|
zod@^3.22.3, zod@^3.23.8:
|
||||||
version "3.23.8"
|
version "3.23.8"
|
||||||
resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d"
|
resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d"
|
||||||
integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==
|
integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==
|
||||||
|
|
||||||
|
zod@^3.22.4:
|
||||||
|
version "3.24.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.2.tgz#8efa74126287c675e92f46871cfc8d15c34372b3"
|
||||||
|
integrity sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==
|
||||||
|
|
||||||
zustand@^4.3.8:
|
zustand@^4.3.8:
|
||||||
version "4.5.4"
|
version "4.5.4"
|
||||||
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.4.tgz#63abdd81edfb190bc61e0bbae045cc4d52158a05"
|
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.4.tgz#63abdd81edfb190bc61e0bbae045cc4d52158a05"
|
||||||
|
Loading…
Reference in New Issue
Block a user