Compare commits
7 Commits
feat/docke
...
v0.7.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d04904af3 | ||
|
|
8cb7f34f86 | ||
|
|
780fdf743a | ||
|
|
c8f7588164 | ||
|
|
00b2d026c1 | ||
|
|
287699331c | ||
|
|
ceb0da874b |
16
CHANGELOG.md
Normal file
16
CHANGELOG.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### ✨ New Features
|
||||
|
||||
- 🪄 feat: Agent Artifacts by **@danny-avila** in [#5804](https://github.com/danny-avila/LibreChat/pull/5804)
|
||||
|
||||
### ⚙️ Other Changes
|
||||
|
||||
- 🔄 chore: Enforce 18next Language Keys by **@rubentalstra** in [#5803](https://github.com/danny-avila/LibreChat/pull/5803)
|
||||
- 🔃 refactor: Parent Message ID Handling on Error, Update Translations, Bump Agents by **@danny-avila** in [#5833](https://github.com/danny-avila/LibreChat/pull/5833)
|
||||
|
||||
---
|
||||
@@ -1,4 +1,4 @@
|
||||
# v0.7.7-rc1
|
||||
# v0.7.7
|
||||
|
||||
# Base node image
|
||||
FROM node:20-alpine AS node
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Dockerfile.multi
|
||||
# v0.7.7-rc1
|
||||
# v0.7.7
|
||||
|
||||
# Base for all builds
|
||||
FROM node:20-alpine AS base-min
|
||||
|
||||
@@ -827,7 +827,8 @@ class GoogleClient extends BaseClient {
|
||||
let reply = '';
|
||||
const { abortController } = options;
|
||||
|
||||
const model = this.modelOptions.modelName ?? this.modelOptions.model ?? '';
|
||||
const model =
|
||||
this.options.titleModel ?? this.modelOptions.modelName ?? this.modelOptions.model ?? '';
|
||||
const safetySettings = getSafetySettings(model);
|
||||
if (!EXCLUDED_GENAI_MODELS.test(model) && !this.project_id) {
|
||||
logger.debug('Identified titling model as GenAI version');
|
||||
|
||||
@@ -112,7 +112,12 @@ class OpenAIClient extends BaseClient {
|
||||
const { OPENAI_FORCE_PROMPT } = process.env ?? {};
|
||||
const { reverseProxyUrl: reverseProxy } = this.options;
|
||||
|
||||
if (!this.useOpenRouter && reverseProxy && reverseProxy.includes(KnownEndpoints.openrouter)) {
|
||||
if (
|
||||
!this.useOpenRouter &&
|
||||
((reverseProxy && reverseProxy.includes(KnownEndpoints.openrouter)) ||
|
||||
(this.options.endpoint &&
|
||||
this.options.endpoint.toLowerCase().includes(KnownEndpoints.openrouter)))
|
||||
) {
|
||||
this.useOpenRouter = true;
|
||||
}
|
||||
|
||||
@@ -1302,8 +1307,12 @@ ${convo}
|
||||
) {
|
||||
delete modelOptions.stream;
|
||||
delete modelOptions.stop;
|
||||
} else if (!this.isOmni && modelOptions.reasoning_effort != null) {
|
||||
} else if (
|
||||
(!this.isOmni || /^o1-(mini|preview)/i.test(modelOptions.model)) &&
|
||||
modelOptions.reasoning_effort != null
|
||||
) {
|
||||
delete modelOptions.reasoning_effort;
|
||||
delete modelOptions.temperature;
|
||||
}
|
||||
|
||||
let reasoningKey = 'reasoning_content';
|
||||
|
||||
@@ -56,6 +56,10 @@ const conversationPreset = {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
maxTokens: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
presence_penalty: {
|
||||
type: Number,
|
||||
required: false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@librechat/backend",
|
||||
"version": "v0.7.7-rc1",
|
||||
"version": "v0.7.7",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"start": "echo 'please run this from the root directory'",
|
||||
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.37.0",
|
||||
"@azure/search-documents": "^12.0.0",
|
||||
"@google/generative-ai": "^0.21.0",
|
||||
"@google/generative-ai": "^0.23.0",
|
||||
"@googleapis/youtube": "^20.0.0",
|
||||
"@keyv/mongo": "^2.1.8",
|
||||
"@keyv/redis": "^2.8.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"@langchain/google-genai": "^0.1.9",
|
||||
"@langchain/google-vertexai": "^0.2.0",
|
||||
"@langchain/textsplitters": "^0.1.0",
|
||||
"@librechat/agents": "^2.1.7",
|
||||
"@librechat/agents": "^2.2.0",
|
||||
"@waylaidwanderer/fetch-event-source": "^3.0.1",
|
||||
"axios": "1.7.8",
|
||||
"bcryptjs": "^2.4.3",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const { CacheKeys } = require('librechat-data-provider');
|
||||
const { loadDefaultModels, loadConfigModels } = require('~/server/services/Config');
|
||||
const { getLogStores } = require('~/cache');
|
||||
const { logger } = require('~/config');
|
||||
|
||||
/**
|
||||
* @param {ServerRequest} req
|
||||
@@ -36,8 +37,13 @@ async function loadModels(req) {
|
||||
}
|
||||
|
||||
async function modelController(req, res) {
|
||||
const modelConfig = await loadModels(req);
|
||||
res.send(modelConfig);
|
||||
try {
|
||||
const modelConfig = await loadModels(req);
|
||||
res.send(modelConfig);
|
||||
} catch (error) {
|
||||
logger.error('Error fetching models:', error);
|
||||
res.status(500).send({ error: error.message });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { modelController, loadModels, getModelsConfig };
|
||||
|
||||
@@ -17,7 +17,7 @@ const {
|
||||
KnownEndpoints,
|
||||
anthropicSchema,
|
||||
isAgentsEndpoint,
|
||||
bedrockOutputParser,
|
||||
bedrockInputSchema,
|
||||
removeNullishValues,
|
||||
} = require('librechat-data-provider');
|
||||
const {
|
||||
@@ -30,6 +30,7 @@ const {
|
||||
const { spendTokens, spendStructuredTokens } = require('~/models/spendTokens');
|
||||
const { getBufferString, HumanMessage } = require('@langchain/core/messages');
|
||||
const { encodeAndFormat } = require('~/server/services/Files/images/encode');
|
||||
const { getCustomEndpointConfig } = require('~/server/services/Config');
|
||||
const Tokenizer = require('~/server/services/Tokenizer');
|
||||
const BaseClient = require('~/app/clients/BaseClient');
|
||||
const { createRun } = require('./run');
|
||||
@@ -39,10 +40,10 @@ const { logger } = require('~/config');
|
||||
/** @typedef {import('@langchain/core/runnables').RunnableConfig} RunnableConfig */
|
||||
|
||||
const providerParsers = {
|
||||
[EModelEndpoint.openAI]: openAISchema,
|
||||
[EModelEndpoint.azureOpenAI]: openAISchema,
|
||||
[EModelEndpoint.anthropic]: anthropicSchema,
|
||||
[EModelEndpoint.bedrock]: bedrockOutputParser,
|
||||
[EModelEndpoint.openAI]: openAISchema.parse,
|
||||
[EModelEndpoint.azureOpenAI]: openAISchema.parse,
|
||||
[EModelEndpoint.anthropic]: anthropicSchema.parse,
|
||||
[EModelEndpoint.bedrock]: bedrockInputSchema.parse,
|
||||
};
|
||||
|
||||
const legacyContentEndpoints = new Set([KnownEndpoints.groq, KnownEndpoints.deepseek]);
|
||||
@@ -187,7 +188,14 @@ class AgentClient extends BaseClient {
|
||||
: {};
|
||||
|
||||
if (parseOptions) {
|
||||
runOptions = parseOptions(this.options.agent.model_parameters);
|
||||
try {
|
||||
runOptions = parseOptions(this.options.agent.model_parameters);
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
'[api/server/controllers/agents/client.js #getSaveOptions] Error parsing options',
|
||||
error,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return removeNullishValues(
|
||||
@@ -824,13 +832,16 @@ class AgentClient extends BaseClient {
|
||||
const clientOptions = {
|
||||
maxTokens: 75,
|
||||
};
|
||||
const providerConfig = this.options.req.app.locals[this.options.agent.provider];
|
||||
let endpointConfig = this.options.req.app.locals[this.options.agent.endpoint];
|
||||
if (!endpointConfig) {
|
||||
endpointConfig = await getCustomEndpointConfig(this.options.agent.endpoint);
|
||||
}
|
||||
if (
|
||||
providerConfig &&
|
||||
providerConfig.titleModel &&
|
||||
providerConfig.titleModel !== Constants.CURRENT_MODEL
|
||||
endpointConfig &&
|
||||
endpointConfig.titleModel &&
|
||||
endpointConfig.titleModel !== Constants.CURRENT_MODEL
|
||||
) {
|
||||
clientOptions.model = providerConfig.titleModel;
|
||||
clientOptions.model = endpointConfig.titleModel;
|
||||
}
|
||||
try {
|
||||
const titleResult = await this.run.generateTitle({
|
||||
|
||||
@@ -45,7 +45,10 @@ async function createRun({
|
||||
|
||||
/** @type {'reasoning_content' | 'reasoning'} */
|
||||
let reasoningKey;
|
||||
if (llmConfig.configuration?.baseURL?.includes(KnownEndpoints.openrouter)) {
|
||||
if (
|
||||
llmConfig.configuration?.baseURL?.includes(KnownEndpoints.openrouter) ||
|
||||
(agent.endpoint && agent.endpoint.toLowerCase().includes(KnownEndpoints.openrouter))
|
||||
) {
|
||||
reasoningKey = 'reasoning';
|
||||
}
|
||||
if (/o1(?!-(?:mini|preview)).*$/.test(llmConfig.model)) {
|
||||
|
||||
@@ -1,32 +1,18 @@
|
||||
const passport = require('passport');
|
||||
const DebugControl = require('../../utils/debug.js');
|
||||
|
||||
function log({ title, parameters }) {
|
||||
DebugControl.log.functionName(title);
|
||||
if (parameters) {
|
||||
DebugControl.log.parameters(parameters);
|
||||
}
|
||||
}
|
||||
const { logger } = require('~/config');
|
||||
|
||||
const requireLocalAuth = (req, res, next) => {
|
||||
passport.authenticate('local', (err, user, info) => {
|
||||
if (err) {
|
||||
log({
|
||||
title: '(requireLocalAuth) Error at passport.authenticate',
|
||||
parameters: [{ name: 'error', value: err }],
|
||||
});
|
||||
logger.error('[requireLocalAuth] Error at passport.authenticate:', err);
|
||||
return next(err);
|
||||
}
|
||||
if (!user) {
|
||||
log({
|
||||
title: '(requireLocalAuth) Error: No user',
|
||||
});
|
||||
logger.debug('[requireLocalAuth] Error: No user');
|
||||
return res.status(404).send(info);
|
||||
}
|
||||
if (info && info.message) {
|
||||
log({
|
||||
title: '(requireLocalAuth) Error: ' + info.message,
|
||||
});
|
||||
logger.debug('[requireLocalAuth] Error: ' + info.message);
|
||||
return res.status(422).send({ message: info.message });
|
||||
}
|
||||
req.user = user;
|
||||
|
||||
@@ -47,10 +47,10 @@ router.get('/', async function (req, res) {
|
||||
githubLoginEnabled: !!process.env.GITHUB_CLIENT_ID && !!process.env.GITHUB_CLIENT_SECRET,
|
||||
googleLoginEnabled: !!process.env.GOOGLE_CLIENT_ID && !!process.env.GOOGLE_CLIENT_SECRET,
|
||||
appleLoginEnabled:
|
||||
!!process.env.APPLE_CLIENT_ID &&
|
||||
!!process.env.APPLE_TEAM_ID &&
|
||||
!!process.env.APPLE_KEY_ID &&
|
||||
!!process.env.APPLE_PRIVATE_KEY_PATH,
|
||||
!!process.env.APPLE_CLIENT_ID &&
|
||||
!!process.env.APPLE_TEAM_ID &&
|
||||
!!process.env.APPLE_KEY_ID &&
|
||||
!!process.env.APPLE_PRIVATE_KEY_PATH,
|
||||
openidLoginEnabled:
|
||||
!!process.env.OPENID_CLIENT_ID &&
|
||||
!!process.env.OPENID_CLIENT_SECRET &&
|
||||
@@ -80,6 +80,7 @@ router.get('/', async function (req, res) {
|
||||
publicSharedLinksEnabled,
|
||||
analyticsGtmId: process.env.ANALYTICS_GTM_ID,
|
||||
instanceProjectId: instanceProject._id.toString(),
|
||||
bundlerURL: process.env.SANDPACK_BUNDLER_URL,
|
||||
};
|
||||
|
||||
if (ldap) {
|
||||
|
||||
@@ -47,7 +47,7 @@ async function loadConfigModels(req) {
|
||||
);
|
||||
|
||||
/**
|
||||
* @type {Record<string, string[]>}
|
||||
* @type {Record<string, Promise<string[]>>}
|
||||
* Map for promises keyed by unique combination of baseURL and apiKey */
|
||||
const fetchPromisesMap = {};
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ async function loadConfigModels(req) {
|
||||
|
||||
for (const name of associatedNames) {
|
||||
const endpoint = endpointsMap[name];
|
||||
modelsConfig[name] = !modelData?.length ? endpoint.models.default ?? [] : modelData;
|
||||
modelsConfig[name] = !modelData?.length ? (endpoint.models.default ?? []) : modelData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ const {
|
||||
getGoogleModels,
|
||||
getBedrockModels,
|
||||
getAnthropicModels,
|
||||
getChatGPTBrowserModels,
|
||||
} = require('~/server/services/ModelService');
|
||||
const { logger } = require('~/config');
|
||||
|
||||
/**
|
||||
* Loads the default models for the application.
|
||||
@@ -15,31 +15,68 @@ const {
|
||||
* @param {Express.Request} req - The Express request object.
|
||||
*/
|
||||
async function loadDefaultModels(req) {
|
||||
const google = getGoogleModels();
|
||||
const openAI = await getOpenAIModels({ user: req.user.id });
|
||||
const anthropic = getAnthropicModels();
|
||||
const chatGPTBrowser = getChatGPTBrowserModels();
|
||||
const azureOpenAI = await getOpenAIModels({ user: req.user.id, azure: true });
|
||||
const gptPlugins = await getOpenAIModels({
|
||||
user: req.user.id,
|
||||
azure: useAzurePlugins,
|
||||
plugins: true,
|
||||
});
|
||||
const assistants = await getOpenAIModels({ assistants: true });
|
||||
const azureAssistants = await getOpenAIModels({ azureAssistants: true });
|
||||
try {
|
||||
const [
|
||||
openAI,
|
||||
anthropic,
|
||||
azureOpenAI,
|
||||
gptPlugins,
|
||||
assistants,
|
||||
azureAssistants,
|
||||
google,
|
||||
bedrock,
|
||||
] = await Promise.all([
|
||||
getOpenAIModels({ user: req.user.id }).catch((error) => {
|
||||
logger.error('Error fetching OpenAI models:', error);
|
||||
return [];
|
||||
}),
|
||||
getAnthropicModels({ user: req.user.id }).catch((error) => {
|
||||
logger.error('Error fetching Anthropic models:', error);
|
||||
return [];
|
||||
}),
|
||||
getOpenAIModels({ user: req.user.id, azure: true }).catch((error) => {
|
||||
logger.error('Error fetching Azure OpenAI models:', error);
|
||||
return [];
|
||||
}),
|
||||
getOpenAIModels({ user: req.user.id, azure: useAzurePlugins, plugins: true }).catch(
|
||||
(error) => {
|
||||
logger.error('Error fetching Plugin models:', error);
|
||||
return [];
|
||||
},
|
||||
),
|
||||
getOpenAIModels({ assistants: true }).catch((error) => {
|
||||
logger.error('Error fetching OpenAI Assistants API models:', error);
|
||||
return [];
|
||||
}),
|
||||
getOpenAIModels({ azureAssistants: true }).catch((error) => {
|
||||
logger.error('Error fetching Azure OpenAI Assistants API models:', error);
|
||||
return [];
|
||||
}),
|
||||
Promise.resolve(getGoogleModels()).catch((error) => {
|
||||
logger.error('Error getting Google models:', error);
|
||||
return [];
|
||||
}),
|
||||
Promise.resolve(getBedrockModels()).catch((error) => {
|
||||
logger.error('Error getting Bedrock models:', error);
|
||||
return [];
|
||||
}),
|
||||
]);
|
||||
|
||||
return {
|
||||
[EModelEndpoint.openAI]: openAI,
|
||||
[EModelEndpoint.agents]: openAI,
|
||||
[EModelEndpoint.google]: google,
|
||||
[EModelEndpoint.anthropic]: anthropic,
|
||||
[EModelEndpoint.gptPlugins]: gptPlugins,
|
||||
[EModelEndpoint.azureOpenAI]: azureOpenAI,
|
||||
[EModelEndpoint.chatGPTBrowser]: chatGPTBrowser,
|
||||
[EModelEndpoint.assistants]: assistants,
|
||||
[EModelEndpoint.azureAssistants]: azureAssistants,
|
||||
[EModelEndpoint.bedrock]: getBedrockModels(),
|
||||
};
|
||||
return {
|
||||
[EModelEndpoint.openAI]: openAI,
|
||||
[EModelEndpoint.agents]: openAI,
|
||||
[EModelEndpoint.google]: google,
|
||||
[EModelEndpoint.anthropic]: anthropic,
|
||||
[EModelEndpoint.gptPlugins]: gptPlugins,
|
||||
[EModelEndpoint.azureOpenAI]: azureOpenAI,
|
||||
[EModelEndpoint.assistants]: assistants,
|
||||
[EModelEndpoint.azureAssistants]: azureAssistants,
|
||||
[EModelEndpoint.bedrock]: bedrock,
|
||||
};
|
||||
} catch (error) {
|
||||
logger.error('Error fetching default models:', error);
|
||||
throw new Error(`Failed to load default models: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = loadDefaultModels;
|
||||
|
||||
@@ -22,6 +22,7 @@ const { getAgent } = require('~/models/Agent');
|
||||
const { logger } = require('~/config');
|
||||
|
||||
const providerConfigMap = {
|
||||
[Providers.XAI]: initCustom,
|
||||
[Providers.OLLAMA]: initCustom,
|
||||
[Providers.DEEPSEEK]: initCustom,
|
||||
[Providers.OPENROUTER]: initCustom,
|
||||
@@ -101,6 +102,7 @@ const initializeAgentOptions = async ({
|
||||
});
|
||||
|
||||
const provider = agent.provider;
|
||||
agent.endpoint = provider;
|
||||
let getOptions = providerConfigMap[provider];
|
||||
if (!getOptions && providerConfigMap[provider.toLowerCase()] != null) {
|
||||
agent.provider = provider.toLowerCase();
|
||||
@@ -112,9 +114,7 @@ const initializeAgentOptions = async ({
|
||||
}
|
||||
getOptions = initCustom;
|
||||
agent.provider = Providers.OPENAI;
|
||||
agent.endpoint = provider.toLowerCase();
|
||||
}
|
||||
|
||||
const model_parameters = Object.assign(
|
||||
{},
|
||||
agent.model_parameters ?? { model: agent.model },
|
||||
|
||||
@@ -27,6 +27,7 @@ const initializeClient = async ({ req, res, endpointOption, overrideModel, optio
|
||||
|
||||
if (anthropicConfig) {
|
||||
clientOptions.streamRate = anthropicConfig.streamRate;
|
||||
clientOptions.titleModel = anthropicConfig.titleModel;
|
||||
}
|
||||
|
||||
/** @type {undefined | TBaseEndpoint} */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const { removeNullishValues, bedrockInputParser } = require('librechat-data-provider');
|
||||
const { removeNullishValues } = require('librechat-data-provider');
|
||||
const generateArtifactsPrompt = require('~/app/clients/prompts/artifacts');
|
||||
const { logger } = require('~/config');
|
||||
|
||||
const buildOptions = (endpoint, parsedBody) => {
|
||||
const {
|
||||
@@ -15,12 +14,6 @@ const buildOptions = (endpoint, parsedBody) => {
|
||||
artifacts,
|
||||
...model_parameters
|
||||
} = parsedBody;
|
||||
let parsedParams = model_parameters;
|
||||
try {
|
||||
parsedParams = bedrockInputParser.parse(model_parameters);
|
||||
} catch (error) {
|
||||
logger.warn('Failed to parse bedrock input', error);
|
||||
}
|
||||
const endpointOption = removeNullishValues({
|
||||
endpoint,
|
||||
name,
|
||||
@@ -31,7 +24,7 @@ const buildOptions = (endpoint, parsedBody) => {
|
||||
spec,
|
||||
promptPrefix,
|
||||
maxContextTokens,
|
||||
model_parameters: parsedParams,
|
||||
model_parameters,
|
||||
});
|
||||
|
||||
if (typeof artifacts === 'string') {
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
const { HttpsProxyAgent } = require('https-proxy-agent');
|
||||
const {
|
||||
EModelEndpoint,
|
||||
Constants,
|
||||
AuthType,
|
||||
Constants,
|
||||
EModelEndpoint,
|
||||
bedrockInputParser,
|
||||
bedrockOutputParser,
|
||||
removeNullishValues,
|
||||
} = require('librechat-data-provider');
|
||||
const { getUserKey, checkUserKeyExpiry } = require('~/server/services/UserService');
|
||||
const { sleep } = require('~/server/utils');
|
||||
|
||||
const getOptions = async ({ req, endpointOption }) => {
|
||||
const getOptions = async ({ req, overrideModel, endpointOption }) => {
|
||||
const {
|
||||
BEDROCK_AWS_SECRET_ACCESS_KEY,
|
||||
BEDROCK_AWS_ACCESS_KEY_ID,
|
||||
@@ -62,39 +64,44 @@ const getOptions = async ({ req, endpointOption }) => {
|
||||
|
||||
/** @type {BedrockClientOptions} */
|
||||
const requestOptions = {
|
||||
model: endpointOption.model,
|
||||
model: overrideModel ?? endpointOption.model,
|
||||
region: BEDROCK_AWS_DEFAULT_REGION,
|
||||
streaming: true,
|
||||
streamUsage: true,
|
||||
callbacks: [
|
||||
{
|
||||
handleLLMNewToken: async () => {
|
||||
if (!streamRate) {
|
||||
return;
|
||||
}
|
||||
await sleep(streamRate);
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
if (credentials) {
|
||||
requestOptions.credentials = credentials;
|
||||
}
|
||||
|
||||
if (BEDROCK_REVERSE_PROXY) {
|
||||
requestOptions.endpointHost = BEDROCK_REVERSE_PROXY;
|
||||
}
|
||||
|
||||
const configOptions = {};
|
||||
if (PROXY) {
|
||||
/** NOTE: NOT SUPPORTED BY BEDROCK */
|
||||
configOptions.httpAgent = new HttpsProxyAgent(PROXY);
|
||||
}
|
||||
|
||||
const llmConfig = bedrockOutputParser(
|
||||
bedrockInputParser.parse(
|
||||
removeNullishValues(Object.assign(requestOptions, endpointOption.model_parameters)),
|
||||
),
|
||||
);
|
||||
|
||||
if (credentials) {
|
||||
llmConfig.credentials = credentials;
|
||||
}
|
||||
|
||||
if (BEDROCK_REVERSE_PROXY) {
|
||||
llmConfig.endpointHost = BEDROCK_REVERSE_PROXY;
|
||||
}
|
||||
|
||||
llmConfig.callbacks = [
|
||||
{
|
||||
handleLLMNewToken: async () => {
|
||||
if (!streamRate) {
|
||||
return;
|
||||
}
|
||||
await sleep(streamRate);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
/** @type {BedrockClientOptions} */
|
||||
llmConfig: removeNullishValues(Object.assign(requestOptions, endpointOption.model_parameters)),
|
||||
llmConfig,
|
||||
configOptions,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -141,7 +141,8 @@ const initializeClient = async ({ req, res, endpointOption, optionsOnly, overrid
|
||||
},
|
||||
clientOptions,
|
||||
);
|
||||
const options = getLLMConfig(apiKey, clientOptions);
|
||||
clientOptions.modelOptions.user = req.user.id;
|
||||
const options = getLLMConfig(apiKey, clientOptions, endpoint);
|
||||
if (!customOptions.streamRate) {
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,7 @@ const { isEnabled } = require('~/server/utils');
|
||||
const { GoogleClient } = require('~/app');
|
||||
|
||||
const initializeClient = async ({ req, res, endpointOption, overrideModel, optionsOnly }) => {
|
||||
const {
|
||||
GOOGLE_KEY,
|
||||
GOOGLE_REVERSE_PROXY,
|
||||
GOOGLE_AUTH_HEADER,
|
||||
PROXY,
|
||||
} = process.env;
|
||||
const { GOOGLE_KEY, GOOGLE_REVERSE_PROXY, GOOGLE_AUTH_HEADER, PROXY } = process.env;
|
||||
const isUserProvided = GOOGLE_KEY === 'user_provided';
|
||||
const { key: expiresAt } = req.body;
|
||||
|
||||
@@ -43,6 +38,7 @@ const initializeClient = async ({ req, res, endpointOption, overrideModel, optio
|
||||
|
||||
if (googleConfig) {
|
||||
clientOptions.streamRate = googleConfig.streamRate;
|
||||
clientOptions.titleModel = googleConfig.titleModel;
|
||||
}
|
||||
|
||||
if (allConfig) {
|
||||
|
||||
@@ -113,6 +113,7 @@ const initializeClient = async ({
|
||||
|
||||
if (!isAzureOpenAI && openAIConfig) {
|
||||
clientOptions.streamRate = openAIConfig.streamRate;
|
||||
clientOptions.titleModel = openAIConfig.titleModel;
|
||||
}
|
||||
|
||||
/** @type {undefined | TBaseEndpoint} */
|
||||
@@ -140,6 +141,7 @@ const initializeClient = async ({
|
||||
},
|
||||
clientOptions,
|
||||
);
|
||||
clientOptions.modelOptions.user = req.user.id;
|
||||
const options = getLLMConfig(apiKey, clientOptions);
|
||||
if (!clientOptions.streamRate) {
|
||||
return options;
|
||||
|
||||
@@ -9,6 +9,7 @@ const { isEnabled } = require('~/server/utils');
|
||||
* @param {Object} options - Additional options for configuring the LLM.
|
||||
* @param {Object} [options.modelOptions] - Model-specific options.
|
||||
* @param {string} [options.modelOptions.model] - The name of the model to use.
|
||||
* @param {string} [options.modelOptions.user] - The user ID
|
||||
* @param {number} [options.modelOptions.temperature] - Controls randomness in output generation (0-2).
|
||||
* @param {number} [options.modelOptions.top_p] - Controls diversity via nucleus sampling (0-1).
|
||||
* @param {number} [options.modelOptions.frequency_penalty] - Reduces repetition of token sequences (-2 to 2).
|
||||
@@ -23,9 +24,10 @@ const { isEnabled } = require('~/server/utils');
|
||||
* @param {boolean} [options.streaming] - Whether to use streaming mode.
|
||||
* @param {Object} [options.addParams] - Additional parameters to add to the model options.
|
||||
* @param {string[]} [options.dropParams] - Parameters to remove from the model options.
|
||||
* @param {string|null} [endpoint=null] - The endpoint name
|
||||
* @returns {Object} Configuration options for creating an LLM instance.
|
||||
*/
|
||||
function getLLMConfig(apiKey, options = {}) {
|
||||
function getLLMConfig(apiKey, options = {}, endpoint = null) {
|
||||
const {
|
||||
modelOptions = {},
|
||||
reverseProxyUrl,
|
||||
@@ -58,7 +60,10 @@ function getLLMConfig(apiKey, options = {}) {
|
||||
let useOpenRouter;
|
||||
/** @type {OpenAIClientOptions['configuration']} */
|
||||
const configOptions = {};
|
||||
if (reverseProxyUrl && reverseProxyUrl.includes(KnownEndpoints.openrouter)) {
|
||||
if (
|
||||
(reverseProxyUrl && reverseProxyUrl.includes(KnownEndpoints.openrouter)) ||
|
||||
(endpoint && endpoint.toLowerCase().includes(KnownEndpoints.openrouter))
|
||||
) {
|
||||
useOpenRouter = true;
|
||||
llmConfig.include_reasoning = true;
|
||||
configOptions.baseURL = reverseProxyUrl;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Code Files
|
||||
const axios = require('axios');
|
||||
const FormData = require('form-data');
|
||||
const { getCodeBaseURL } = require('@librechat/agents');
|
||||
@@ -16,7 +15,8 @@ const MAX_FILE_SIZE = 150 * 1024 * 1024;
|
||||
async function getCodeOutputDownloadStream(fileIdentifier, apiKey) {
|
||||
try {
|
||||
const baseURL = getCodeBaseURL();
|
||||
const response = await axios({
|
||||
/** @type {import('axios').AxiosRequestConfig} */
|
||||
const options = {
|
||||
method: 'get',
|
||||
url: `${baseURL}/download/${fileIdentifier}`,
|
||||
responseType: 'stream',
|
||||
@@ -25,10 +25,22 @@ async function getCodeOutputDownloadStream(fileIdentifier, apiKey) {
|
||||
'X-API-Key': apiKey,
|
||||
},
|
||||
timeout: 15000,
|
||||
});
|
||||
};
|
||||
|
||||
if (process.env.PROXY) {
|
||||
options.proxy = {
|
||||
host: process.env.PROXY,
|
||||
protocol: process.env.PROXY.startsWith('https') ? 'https' : 'http',
|
||||
};
|
||||
}
|
||||
|
||||
const response = await axios(options);
|
||||
return response;
|
||||
} catch (error) {
|
||||
logAxiosError({
|
||||
message: `Error downloading code environment file stream: ${error.message}`,
|
||||
error,
|
||||
});
|
||||
throw new Error(`Error downloading file: ${error.message}`);
|
||||
}
|
||||
}
|
||||
@@ -54,7 +66,8 @@ async function uploadCodeEnvFile({ req, stream, filename, apiKey, entity_id = ''
|
||||
form.append('file', stream, filename);
|
||||
|
||||
const baseURL = getCodeBaseURL();
|
||||
const response = await axios.post(`${baseURL}/upload`, form, {
|
||||
/** @type {import('axios').AxiosRequestConfig} */
|
||||
const options = {
|
||||
headers: {
|
||||
...form.getHeaders(),
|
||||
'Content-Type': 'multipart/form-data',
|
||||
@@ -64,7 +77,16 @@ async function uploadCodeEnvFile({ req, stream, filename, apiKey, entity_id = ''
|
||||
},
|
||||
maxContentLength: MAX_FILE_SIZE,
|
||||
maxBodyLength: MAX_FILE_SIZE,
|
||||
});
|
||||
};
|
||||
|
||||
if (process.env.PROXY) {
|
||||
options.proxy = {
|
||||
host: process.env.PROXY,
|
||||
protocol: process.env.PROXY.startsWith('https') ? 'https' : 'http',
|
||||
};
|
||||
}
|
||||
|
||||
const response = await axios.post(`${baseURL}/upload`, form, options);
|
||||
|
||||
/** @type {{ message: string; session_id: string; files: Array<{ fileId: string; filename: string }> }} */
|
||||
const result = response.data;
|
||||
|
||||
@@ -4,7 +4,9 @@ const { HttpsProxyAgent } = require('https-proxy-agent');
|
||||
const { EModelEndpoint, defaultModels, CacheKeys } = require('librechat-data-provider');
|
||||
const { inputSchema, logAxiosError, extractBaseURL, processModelData } = require('~/utils');
|
||||
const { OllamaClient } = require('~/app/clients/OllamaClient');
|
||||
const { isUserProvided } = require('~/server/utils');
|
||||
const getLogStores = require('~/cache/getLogStores');
|
||||
const { logger } = require('~/config');
|
||||
|
||||
/**
|
||||
* Splits a string by commas and trims each resulting value.
|
||||
@@ -42,7 +44,7 @@ const fetchModels = async ({
|
||||
user,
|
||||
apiKey,
|
||||
baseURL,
|
||||
name = 'OpenAI',
|
||||
name = EModelEndpoint.openAI,
|
||||
azure = false,
|
||||
userIdQuery = false,
|
||||
createTokenConfig = true,
|
||||
@@ -64,12 +66,19 @@ const fetchModels = async ({
|
||||
|
||||
try {
|
||||
const options = {
|
||||
headers: {
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
},
|
||||
headers: {},
|
||||
timeout: 5000,
|
||||
};
|
||||
|
||||
if (name === EModelEndpoint.anthropic) {
|
||||
options.headers = {
|
||||
'x-api-key': apiKey,
|
||||
'anthropic-version': process.env.ANTHROPIC_VERSION || '2023-06-01',
|
||||
};
|
||||
} else {
|
||||
options.headers.Authorization = `Bearer ${apiKey}`;
|
||||
}
|
||||
|
||||
if (process.env.PROXY) {
|
||||
options.httpsAgent = new HttpsProxyAgent(process.env.PROXY);
|
||||
}
|
||||
@@ -148,7 +157,7 @@ const fetchOpenAIModels = async (opts, _models = []) => {
|
||||
baseURL,
|
||||
azure: opts.azure,
|
||||
user: opts.user,
|
||||
name: baseURL,
|
||||
name: EModelEndpoint.openAI,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -231,13 +240,71 @@ const getChatGPTBrowserModels = () => {
|
||||
return models;
|
||||
};
|
||||
|
||||
const getAnthropicModels = () => {
|
||||
/**
|
||||
* Fetches models from the Anthropic API.
|
||||
* @async
|
||||
* @function
|
||||
* @param {object} opts - The options for fetching the models.
|
||||
* @param {string} opts.user - The user ID to send to the API.
|
||||
* @param {string[]} [_models=[]] - The models to use as a fallback.
|
||||
*/
|
||||
const fetchAnthropicModels = async (opts, _models = []) => {
|
||||
let models = _models.slice() ?? [];
|
||||
let apiKey = process.env.ANTHROPIC_API_KEY;
|
||||
const anthropicBaseURL = 'https://api.anthropic.com/v1';
|
||||
let baseURL = anthropicBaseURL;
|
||||
let reverseProxyUrl = process.env.ANTHROPIC_REVERSE_PROXY;
|
||||
|
||||
if (reverseProxyUrl) {
|
||||
baseURL = extractBaseURL(reverseProxyUrl);
|
||||
}
|
||||
|
||||
if (!apiKey) {
|
||||
return models;
|
||||
}
|
||||
|
||||
const modelsCache = getLogStores(CacheKeys.MODEL_QUERIES);
|
||||
|
||||
const cachedModels = await modelsCache.get(baseURL);
|
||||
if (cachedModels) {
|
||||
return cachedModels;
|
||||
}
|
||||
|
||||
if (baseURL) {
|
||||
models = await fetchModels({
|
||||
apiKey,
|
||||
baseURL,
|
||||
user: opts.user,
|
||||
name: EModelEndpoint.anthropic,
|
||||
tokenKey: EModelEndpoint.anthropic,
|
||||
});
|
||||
}
|
||||
|
||||
if (models.length === 0) {
|
||||
return _models;
|
||||
}
|
||||
|
||||
await modelsCache.set(baseURL, models);
|
||||
return models;
|
||||
};
|
||||
|
||||
const getAnthropicModels = async (opts = {}) => {
|
||||
let models = defaultModels[EModelEndpoint.anthropic];
|
||||
if (process.env.ANTHROPIC_MODELS) {
|
||||
models = splitAndTrim(process.env.ANTHROPIC_MODELS);
|
||||
return models;
|
||||
}
|
||||
|
||||
return models;
|
||||
if (isUserProvided(process.env.ANTHROPIC_API_KEY)) {
|
||||
return models;
|
||||
}
|
||||
|
||||
try {
|
||||
return await fetchAnthropicModels(opts, models);
|
||||
} catch (error) {
|
||||
logger.error('Error fetching Anthropic models:', error);
|
||||
return models;
|
||||
}
|
||||
};
|
||||
|
||||
const getGoogleModels = () => {
|
||||
|
||||
@@ -352,15 +352,15 @@ describe('splitAndTrim', () => {
|
||||
});
|
||||
|
||||
describe('getAnthropicModels', () => {
|
||||
it('returns default models when ANTHROPIC_MODELS is not set', () => {
|
||||
it('returns default models when ANTHROPIC_MODELS is not set', async () => {
|
||||
delete process.env.ANTHROPIC_MODELS;
|
||||
const models = getAnthropicModels();
|
||||
const models = await getAnthropicModels();
|
||||
expect(models).toEqual(defaultModels[EModelEndpoint.anthropic]);
|
||||
});
|
||||
|
||||
it('returns models from ANTHROPIC_MODELS when set', () => {
|
||||
it('returns models from ANTHROPIC_MODELS when set', async () => {
|
||||
process.env.ANTHROPIC_MODELS = 'claude-1, claude-2 ';
|
||||
const models = getAnthropicModels();
|
||||
const models = await getAnthropicModels();
|
||||
expect(models).toEqual(['claude-1', 'claude-2']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
const levels = {
|
||||
NONE: 0,
|
||||
LOW: 1,
|
||||
MEDIUM: 2,
|
||||
HIGH: 3,
|
||||
};
|
||||
|
||||
let level = levels.HIGH;
|
||||
|
||||
module.exports = {
|
||||
levels,
|
||||
setLevel: (l) => (level = l),
|
||||
log: {
|
||||
parameters: (parameters) => {
|
||||
if (levels.HIGH > level) {
|
||||
return;
|
||||
}
|
||||
console.group();
|
||||
parameters.forEach((p) => console.log(`${p.name}:`, p.value));
|
||||
console.groupEnd();
|
||||
},
|
||||
functionName: (name) => {
|
||||
if (levels.MEDIUM > level) {
|
||||
return;
|
||||
}
|
||||
console.log(`\nEXECUTING: ${name}\n`);
|
||||
},
|
||||
flow: (flow) => {
|
||||
if (levels.LOW > level) {
|
||||
return;
|
||||
}
|
||||
console.log(`\n\n\nBEGIN FLOW: ${flow}\n\n\n`);
|
||||
},
|
||||
variable: ({ name, value }) => {
|
||||
if (levels.HIGH > level) {
|
||||
return;
|
||||
}
|
||||
console.group();
|
||||
console.group();
|
||||
console.log(`VARIABLE ${name}:`, value);
|
||||
console.groupEnd();
|
||||
console.groupEnd();
|
||||
},
|
||||
request: () => (req, res, next) => {
|
||||
if (levels.HIGH > level) {
|
||||
return next();
|
||||
}
|
||||
console.log('Hit URL', req.url, 'with following:');
|
||||
console.group();
|
||||
console.log('Query:', req.query);
|
||||
console.log('Body:', req.body);
|
||||
console.groupEnd();
|
||||
return next();
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@librechat/frontend",
|
||||
"version": "v0.7.7-rc1",
|
||||
"version": "v0.7.7",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
import { SandpackProviderProps } from '@codesandbox/sandpack-react/unstyled';
|
||||
import type { CodeEditorRef } from '@codesandbox/sandpack-react';
|
||||
import type { ArtifactFiles, Artifact } from '~/common';
|
||||
import { useEditArtifact, useGetStartupConfig } from '~/data-provider';
|
||||
import { sharedFiles, sharedOptions } from '~/utils/artifacts';
|
||||
import { useEditArtifact } from '~/data-provider';
|
||||
import { useEditorContext } from '~/Providers';
|
||||
|
||||
const createDebouncedMutation = (
|
||||
@@ -124,6 +124,17 @@ export const ArtifactCodeEditor = memo(function ({
|
||||
sharedProps: Partial<SandpackProviderProps>;
|
||||
editorRef: React.MutableRefObject<CodeEditorRef>;
|
||||
}) {
|
||||
const { data: config } = useGetStartupConfig();
|
||||
const options: typeof sharedOptions = useMemo(() => {
|
||||
if (!config) {
|
||||
return sharedOptions;
|
||||
}
|
||||
return {
|
||||
...sharedOptions,
|
||||
bundlerURL: config.bundlerURL,
|
||||
};
|
||||
}, [config]);
|
||||
|
||||
if (Object.keys(files).length === 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -135,7 +146,7 @@ export const ArtifactCodeEditor = memo(function ({
|
||||
...files,
|
||||
...sharedFiles,
|
||||
}}
|
||||
options={{ ...sharedOptions }}
|
||||
options={options}
|
||||
{...sharedProps}
|
||||
template={template}
|
||||
>
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
import type { SandpackPreviewRef } from '@codesandbox/sandpack-react/unstyled';
|
||||
import type { ArtifactFiles } from '~/common';
|
||||
import { sharedFiles, sharedOptions } from '~/utils/artifacts';
|
||||
import { useGetStartupConfig } from '~/data-provider';
|
||||
import { useEditorContext } from '~/Providers';
|
||||
|
||||
export const ArtifactPreview = memo(function ({
|
||||
@@ -23,6 +24,8 @@ export const ArtifactPreview = memo(function ({
|
||||
previewRef: React.MutableRefObject<SandpackPreviewRef>;
|
||||
}) {
|
||||
const { currentCode } = useEditorContext();
|
||||
const { data: config } = useGetStartupConfig();
|
||||
|
||||
const artifactFiles = useMemo(() => {
|
||||
if (Object.keys(files).length === 0) {
|
||||
return files;
|
||||
@@ -38,6 +41,17 @@ export const ArtifactPreview = memo(function ({
|
||||
},
|
||||
};
|
||||
}, [currentCode, files, fileKey]);
|
||||
|
||||
const options: typeof sharedOptions = useMemo(() => {
|
||||
if (!config) {
|
||||
return sharedOptions;
|
||||
}
|
||||
return {
|
||||
...sharedOptions,
|
||||
bundlerURL: config.bundlerURL,
|
||||
};
|
||||
}, [config]);
|
||||
|
||||
if (Object.keys(artifactFiles).length === 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -48,7 +62,7 @@ export const ArtifactPreview = memo(function ({
|
||||
...artifactFiles,
|
||||
...sharedFiles,
|
||||
}}
|
||||
options={{ ...sharedOptions }}
|
||||
options={options}
|
||||
{...sharedProps}
|
||||
template={template}
|
||||
>
|
||||
|
||||
@@ -553,8 +553,10 @@ const bedrockAnthropic: SettingsConfiguration = [
|
||||
bedrock.topP,
|
||||
bedrock.topK,
|
||||
baseDefinitions.stop,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
anthropic.thinking,
|
||||
anthropic.thinkingBudget,
|
||||
];
|
||||
|
||||
const bedrockMistral: SettingsConfiguration = [
|
||||
@@ -564,8 +566,8 @@ const bedrockMistral: SettingsConfiguration = [
|
||||
bedrock.maxTokens,
|
||||
mistral.temperature,
|
||||
mistral.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
const bedrockCohere: SettingsConfiguration = [
|
||||
@@ -575,8 +577,8 @@ const bedrockCohere: SettingsConfiguration = [
|
||||
bedrock.maxTokens,
|
||||
cohere.temperature,
|
||||
cohere.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
const bedrockGeneral: SettingsConfiguration = [
|
||||
@@ -585,8 +587,8 @@ const bedrockGeneral: SettingsConfiguration = [
|
||||
librechat.maxContextTokens,
|
||||
meta.temperature,
|
||||
meta.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
const bedrockAnthropicCol1: SettingsConfiguration = [
|
||||
@@ -602,8 +604,10 @@ const bedrockAnthropicCol2: SettingsConfiguration = [
|
||||
bedrock.temperature,
|
||||
bedrock.topP,
|
||||
bedrock.topK,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
anthropic.thinking,
|
||||
anthropic.thinkingBudget,
|
||||
];
|
||||
|
||||
const bedrockMistralCol1: SettingsConfiguration = [
|
||||
@@ -617,8 +621,8 @@ const bedrockMistralCol2: SettingsConfiguration = [
|
||||
bedrock.maxTokens,
|
||||
mistral.temperature,
|
||||
mistral.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
const bedrockCohereCol1: SettingsConfiguration = [
|
||||
@@ -632,8 +636,8 @@ const bedrockCohereCol2: SettingsConfiguration = [
|
||||
bedrock.maxTokens,
|
||||
cohere.temperature,
|
||||
cohere.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
const bedrockGeneralCol1: SettingsConfiguration = [
|
||||
@@ -646,8 +650,8 @@ const bedrockGeneralCol2: SettingsConfiguration = [
|
||||
librechat.maxContextTokens,
|
||||
meta.temperature,
|
||||
meta.topP,
|
||||
bedrock.region,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
];
|
||||
|
||||
export const settings: Record<string, SettingsConfiguration | undefined> = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dataService, QueryKeys } from 'librechat-data-provider';
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import type * as t from 'librechat-data-provider';
|
||||
import { dataService, QueryKeys, Constants } from 'librechat-data-provider';
|
||||
import type { UseMutationResult } from '@tanstack/react-query';
|
||||
import type * as t from 'librechat-data-provider';
|
||||
|
||||
export const useEditArtifact = (
|
||||
_options?: t.EditArtifactOptions,
|
||||
@@ -11,33 +11,47 @@ export const useEditArtifact = (
|
||||
return useMutation({
|
||||
mutationFn: (variables: t.TEditArtifactRequest) => dataService.editArtifact(variables),
|
||||
onSuccess: (data, vars, context) => {
|
||||
queryClient.setQueryData<t.TMessage[]>([QueryKeys.messages, data.conversationId], (prev) => {
|
||||
if (!prev) {
|
||||
return prev;
|
||||
let targetNotFound = true;
|
||||
const setMessageData = (conversationId?: string | null) => {
|
||||
if (!conversationId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const newArray = [...prev];
|
||||
let targetIndex: number | undefined;
|
||||
|
||||
for (let i = newArray.length - 1; i >= 0; i--) {
|
||||
if (newArray[i].messageId === vars.messageId) {
|
||||
targetIndex = i;
|
||||
break;
|
||||
queryClient.setQueryData<t.TMessage[]>([QueryKeys.messages, conversationId], (prev) => {
|
||||
if (!prev) {
|
||||
return prev;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetIndex == null) {
|
||||
return prev;
|
||||
}
|
||||
const newArray = [...prev];
|
||||
let targetIndex: number | undefined;
|
||||
|
||||
newArray[targetIndex] = {
|
||||
...newArray[targetIndex],
|
||||
content: data.content,
|
||||
text: data.text,
|
||||
};
|
||||
for (let i = newArray.length - 1; i >= 0; i--) {
|
||||
if (newArray[i].messageId === vars.messageId) {
|
||||
targetIndex = i;
|
||||
targetNotFound = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return newArray;
|
||||
});
|
||||
if (targetIndex == null) {
|
||||
return prev;
|
||||
}
|
||||
|
||||
newArray[targetIndex] = {
|
||||
...newArray[targetIndex],
|
||||
content: data.content,
|
||||
text: data.text,
|
||||
};
|
||||
|
||||
return newArray;
|
||||
});
|
||||
};
|
||||
setMessageData(data.conversationId);
|
||||
if (targetNotFound) {
|
||||
console.warn(
|
||||
'Edited Artifact Message not found in cache, trying `new` as `conversationId`',
|
||||
);
|
||||
setMessageData(Constants.NEW_CONVO);
|
||||
}
|
||||
|
||||
onSuccess?.(data, vars, context);
|
||||
},
|
||||
|
||||
@@ -139,6 +139,8 @@
|
||||
"com_endpoint_anthropic_maxoutputtokens": "Maximale Anzahl von Token, die in der Antwort erzeugt werden können. Gib einen niedrigeren Wert für kürzere Antworten und einen höheren Wert für längere Antworten an. Hinweis: Die Modelle können auch vor Erreichen dieses Maximums stoppen.",
|
||||
"com_endpoint_anthropic_prompt_cache": "Prompt-Caching ermöglicht die Wiederverwendung von umfangreichen Kontexten oder Anweisungen über mehrere API-Aufrufe hinweg, wodurch Kosten und Latenzzeiten reduziert werden",
|
||||
"com_endpoint_anthropic_temp": "Reicht von 0 bis 1. Verwende Temperaturen näher an 0 für analytische / Multiple-Choice-Aufgaben und näher an 1 für kreative und generative Aufgaben. Wir empfehlen, entweder dies oder Top P zu ändern, aber nicht beides.",
|
||||
"com_endpoint_anthropic_thinking": "Aktiviert internes logisches Denken für unterstützte Claude-Modelle (3.7 Sonnet). Hinweis: Erfordert, dass \"Denkbudget\" festgelegt und niedriger als \"Max. Ausgabe-Token\" ist",
|
||||
"com_endpoint_anthropic_thinking_budget": "Bestimmt die maximale Anzahl an Token, die Claude für seinen internen Denkprozess verwenden darf. Ein höheres Budget kann die Antwortqualität verbessern, indem es eine gründlichere Analyse bei komplexen Problemen ermöglicht. Claude nutzt jedoch möglicherweise nicht das gesamte zugewiesene Budget, insbesondere bei Werten über 32.000. Diese Einstellung muss niedriger sein als \"Max. Ausgabe-Token\".",
|
||||
"com_endpoint_anthropic_topk": "Top-k ändert, wie das Modell Token für die Ausgabe auswählt. Ein Top-k von 1 bedeutet, dass das ausgewählte Token das wahrscheinlichste unter allen Token im Vokabular des Modells ist (auch \"Greedy Decoding\" genannt), während ein Top-k von 3 bedeutet, dass das nächste Token aus den 3 wahrscheinlichsten Token ausgewählt wird (unter Verwendung der Temperatur).",
|
||||
"com_endpoint_anthropic_topp": "Top-p ändert, wie das Modell Token für die Ausgabe auswählt. Token werden von den wahrscheinlichsten K (siehe topK-Parameter) bis zu den am wenigsten wahrscheinlichen ausgewählt, bis die Summe ihrer Wahrscheinlichkeiten dem Top-p-Wert entspricht.",
|
||||
"com_endpoint_assistant": "Assistent",
|
||||
@@ -243,6 +245,8 @@
|
||||
"com_endpoint_stop": "Stop-Sequenzen",
|
||||
"com_endpoint_stop_placeholder": "Trenne Stoppwörter durch Drücken der `Enter`-Taste",
|
||||
"com_endpoint_temperature": "Temperatur",
|
||||
"com_endpoint_thinking": "Denken",
|
||||
"com_endpoint_thinking_budget": "Denkbudget",
|
||||
"com_endpoint_top_k": "Top K",
|
||||
"com_endpoint_top_p": "Top P",
|
||||
"com_endpoint_use_active_assistant": "Aktiven Assistenten verwenden",
|
||||
@@ -434,7 +438,7 @@
|
||||
"com_sidepanel_parameters": "KI-Einstellungen",
|
||||
"com_sidepanel_select_agent": "Wähle einen Agenten",
|
||||
"com_sidepanel_select_assistant": "Assistenten auswählen",
|
||||
"com_ui_2fa_account_security": "Die Zwei-Faktor-Authentifizierung bietet deinem Konto eine zusätzliche Sicherheitsebene.",
|
||||
"com_ui_2fa_account_security": "Die Zwei-Faktor-Authentifizierung bietet Ihrem Konto eine zusätzliche Sicherheitsebene.",
|
||||
"com_ui_2fa_disable": "2FA deaktivieren",
|
||||
"com_ui_2fa_disable_error": "Beim Deaktivieren der Zwei-Faktor-Authentifizierung ist ein Fehler aufgetreten.",
|
||||
"com_ui_2fa_disabled": "2FA wurde deaktiviert.",
|
||||
@@ -525,6 +529,7 @@
|
||||
"com_ui_chat_history": "Chatverlauf",
|
||||
"com_ui_clear": "Löschen",
|
||||
"com_ui_clear_all": "Auswahl löschen",
|
||||
"com_ui_client_id": "Client-ID",
|
||||
"com_ui_client_secret": "Client Secret",
|
||||
"com_ui_close": "Schließen",
|
||||
"com_ui_close_menu": "Menü schließen",
|
||||
@@ -590,7 +595,7 @@
|
||||
"com_ui_download": "Herunterladen",
|
||||
"com_ui_download_artifact": "Artefakt herunterladen",
|
||||
"com_ui_download_backup": "Backup-Codes herunterladen",
|
||||
"com_ui_download_backup_tooltip": "Bevor du fortfährst, lade bitte deine Backup-Codes herunter. Du benötigst sie, um den Zugang wiederherzustellen, falls du dein Authentifizierungsgerät verlierst.",
|
||||
"com_ui_download_backup_tooltip": "Bevor Sie fortfahren, laden Sie bitte Ihre Backup-Codes herunter. Sie benötigen sie, um den Zugang wiederherzustellen, falls Sie Ihr Authentifizierungsgerät verlieren.",
|
||||
"com_ui_download_error": "Fehler beim Herunterladen der Datei. Die Datei wurde möglicherweise gelöscht.",
|
||||
"com_ui_dropdown_variables": "Dropdown-Variablen:",
|
||||
"com_ui_dropdown_variables_info": "Erstellen Sie benutzerdefinierte Dropdown-Menüs für Ihre Eingabeaufforderungen: `{{variable_name:option1|option2|option3}}`",
|
||||
@@ -677,6 +682,7 @@
|
||||
"com_ui_more_info": "Mehr Infos",
|
||||
"com_ui_my_prompts": "Meine Prompts",
|
||||
"com_ui_name": "Name",
|
||||
"com_ui_new": "Neu",
|
||||
"com_ui_new_chat": "Neuer Chat",
|
||||
"com_ui_next": "Weiter",
|
||||
"com_ui_no": "Nein",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"chat_direction_left_to_right": "algo debería ir aquí pero está vacío",
|
||||
"chat_direction_right_to_left": "algo debería ir aquí pero está vacío",
|
||||
"com_a11y_ai_composing": "La IA está componiendo la respuesta",
|
||||
"com_a11y_end": "La IA ha finalizado su respuesta",
|
||||
"com_a11y_start": "La IA ha comenzado su respuesta",
|
||||
@@ -18,13 +20,16 @@
|
||||
"com_agents_not_available": "Agente no disponible",
|
||||
"com_agents_search_name": "Buscar agentes por nombre",
|
||||
"com_agents_update_error": "Hubo un error al actualizar su agente.",
|
||||
"com_assistants_action_attempt": "El asistente quiere hablar con {{0}}",
|
||||
"com_assistants_actions": "Acciones",
|
||||
"com_assistants_actions_disabled": "Necesita crear un asistente antes de añadir acciones.",
|
||||
"com_assistants_actions_info": "Permita que su Asistente recupere información o realice acciones a través de API's",
|
||||
"com_assistants_add_actions": "Añadir Acciones",
|
||||
"com_assistants_add_tools": "Añadir Herramientas",
|
||||
"com_assistants_allow_sites_you_trust": "Solo permite sitios en los que confíes.",
|
||||
"com_assistants_append_date": "Añadir Fecha y Hora Actual",
|
||||
"com_assistants_append_date_tooltip": "Cuando está habilitado, la fecha y hora actual del cliente se adjuntarán a las instrucciones del sistema del asistente.",
|
||||
"com_assistants_attempt_info": "El asistente quiere enviar lo siguiente:",
|
||||
"com_assistants_available_actions": "Acciones Disponibles",
|
||||
"com_assistants_capabilities": "Capacidades",
|
||||
"com_assistants_code_interpreter": "Intérprete de Código",
|
||||
@@ -59,6 +64,7 @@
|
||||
"com_assistants_update_error": "Hubo un error al actualizar su asistente.",
|
||||
"com_assistants_update_success": "Actualizado con éxito",
|
||||
"com_auth_already_have_account": "¿Ya tiene una cuenta?",
|
||||
"com_auth_apple_login": "Inicia con Apple",
|
||||
"com_auth_back_to_login": "Volver al inicio de sesión",
|
||||
"com_auth_click": "Haga clic",
|
||||
"com_auth_click_here": "Haz clic aquí",
|
||||
@@ -117,9 +123,11 @@
|
||||
"com_auth_submit_registration": "Enviar registro",
|
||||
"com_auth_to_reset_your_password": "para restablecer su contraseña.",
|
||||
"com_auth_to_try_again": "para intentar de nuevo.",
|
||||
"com_auth_two_factor": "Revisa tu aplicación preferida de OTP para obtener el código",
|
||||
"com_auth_username": "Nombre de usuario (opcional)",
|
||||
"com_auth_username_max_length": "El nombre de usuario debe tener menos de 20 caracteres",
|
||||
"com_auth_username_min_length": "El nombre de usuario debe tener al menos 2 caracteres",
|
||||
"com_auth_verify_your_identity": "Verifica Tu Identidad",
|
||||
"com_auth_welcome_back": "Bienvenido de nuevo",
|
||||
"com_click_to_download": "(haga clic aquí para descargar)",
|
||||
"com_download_expired": "Descarga expirada",
|
||||
@@ -420,6 +428,8 @@
|
||||
"com_sidepanel_parameters": "Parámetros",
|
||||
"com_sidepanel_select_agent": "Seleccione un Agente",
|
||||
"com_sidepanel_select_assistant": "Seleccionar un Asistente",
|
||||
"com_ui_2fa_enable": "Activa 2FA",
|
||||
"com_ui_2fa_enabled": "2FA ha sido activada",
|
||||
"com_ui_accept": "Acepto",
|
||||
"com_ui_add": "Agregar",
|
||||
"com_ui_add_model_preset": "Agregar un modelo o configuración preestablecida para una respuesta adicional",
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
"com_auth_email_verification_redirecting": "Suunatakse ümber {{0}} sekundi pärast...",
|
||||
"com_auth_email_verification_resend_prompt": "Kas sa ei saanud e-kirja?",
|
||||
"com_auth_email_verification_success": "E-post kinnitatud",
|
||||
"com_auth_email_verifying_ellipsis": "Kontrollimine...",
|
||||
"com_auth_error_create": "Konto registreerimisel tekkis viga. Proovige uuesti.",
|
||||
"com_auth_error_invalid_reset_token": "See parooli lähtestamise tunnus pole enam kehtiv.",
|
||||
"com_auth_error_login": "Sisselogimine esitatud teabega ei õnnestu. Palun kontrolli oma andmeid ja proovi uuesti.",
|
||||
@@ -123,9 +124,11 @@
|
||||
"com_auth_submit_registration": "Saada registreerimine",
|
||||
"com_auth_to_reset_your_password": "parooli lähtestamiseks.",
|
||||
"com_auth_to_try_again": "uuesti proovimiseks.",
|
||||
"com_auth_two_factor": "Kontrolli oma eelistatud ühekordse parooli rakendust koodi saamiseks",
|
||||
"com_auth_username": "Kasutajanimi (valikuline)",
|
||||
"com_auth_username_max_length": "Kasutajanimi peab olema vähem kui 20 tähemärki",
|
||||
"com_auth_username_min_length": "Kasutajanimi peab olema vähemalt 2 tähemärki",
|
||||
"com_auth_verify_your_identity": "Kontrolli",
|
||||
"com_auth_welcome_back": "Teretulemast tagasi",
|
||||
"com_click_to_download": "(vajuta siia, et alla laadida)",
|
||||
"com_download_expired": "(allalaadimine aegunud)",
|
||||
@@ -265,6 +268,7 @@
|
||||
"com_files_table": "Failide tabel",
|
||||
"com_generated_files": "Genereeritud failid:",
|
||||
"com_hide_examples": "Peida näited",
|
||||
"com_nav_2fa": "Kaheastmeline autentimine (2FA)",
|
||||
"com_nav_account_settings": "Konto seaded",
|
||||
"com_nav_always_make_prod": "Tee uued versioonid alati toodangusse",
|
||||
"com_nav_archive_created_at": "Arhiveerimise kuupäev",
|
||||
@@ -434,6 +438,16 @@
|
||||
"com_sidepanel_parameters": "Parameetrid",
|
||||
"com_sidepanel_select_agent": "Vali agent",
|
||||
"com_sidepanel_select_assistant": "Vali assistent",
|
||||
"com_ui_2fa_account_security": "Kaheastmeline autentimine lisab teie kontole täiendava turvalisuse kihi",
|
||||
"com_ui_2fa_disable": "Lülita 2FA välja",
|
||||
"com_ui_2fa_disable_error": "Tekkis viga kaheastmelise autentimise väljalülitamisel",
|
||||
"com_ui_2fa_disabled": "2FA on välja lülitatud",
|
||||
"com_ui_2fa_enable": "Aktiveeri 2FA",
|
||||
"com_ui_2fa_enabled": "2FA on aktiveeritud",
|
||||
"com_ui_2fa_generate_error": "Kaheastmelise autentimise seadete genereerimisel tekkis viga",
|
||||
"com_ui_2fa_invalid": "Vale kaheastmeline autentimise kood",
|
||||
"com_ui_2fa_setup": "Seadista 2FA",
|
||||
"com_ui_2fa_verified": "Kaheastmeline autentimine õnnestus",
|
||||
"com_ui_accept": "Nõustun",
|
||||
"com_ui_add": "Lisa",
|
||||
"com_ui_add_model_preset": "Lisa mudel või eelseadistus täiendava vastuse jaoks",
|
||||
@@ -484,6 +498,9 @@
|
||||
"com_ui_azure": "Azure",
|
||||
"com_ui_back_to_chat": "Tagasi vestlusesse",
|
||||
"com_ui_back_to_prompts": "Tagasi sisendite juurde",
|
||||
"com_ui_backup_codes": "Varukoodid",
|
||||
"com_ui_backup_codes_regenerate_error": "Varukoodide loomisel tekkis viga",
|
||||
"com_ui_backup_codes_regenerated": "Varukoodide loomine oli edukas",
|
||||
"com_ui_basic": "Põhiline",
|
||||
"com_ui_basic_auth_header": "Põhiline autentimise päis",
|
||||
"com_ui_bearer": "Bearer",
|
||||
@@ -520,6 +537,7 @@
|
||||
"com_ui_collapse_chat": "Ahenda vestlus",
|
||||
"com_ui_command_placeholder": "Valikuline: sisesta sisendi jaoks käsk või kasutatakse nime",
|
||||
"com_ui_command_usage_placeholder": "Vali sisend käsu või nime järgi",
|
||||
"com_ui_complete_setup": "Valmis",
|
||||
"com_ui_confirm_action": "Kinnita tegevus",
|
||||
"com_ui_confirm_admin_use_change": "Selle seadistuse muutmine blokeerib juurdepääsu administraatoritele, sealhulgas sinule endale. Oled sa kindel, et sa soovid jätkata?",
|
||||
"com_ui_confirm_change": "Kinnita muudatus",
|
||||
@@ -573,8 +591,11 @@
|
||||
"com_ui_descending": "Desc",
|
||||
"com_ui_description": "Kirjeldus",
|
||||
"com_ui_description_placeholder": "Valikuline: sisesta sisendi jaoks kuvatav kirjeldus",
|
||||
"com_ui_disabling": "Välja lülitamine...",
|
||||
"com_ui_download": "Laadi alla",
|
||||
"com_ui_download_artifact": "Laadi artefakt alla",
|
||||
"com_ui_download_backup": "Laadi alla varukoodid",
|
||||
"com_ui_download_backup_tooltip": "Enne jätkamist laadi alla oma varukoodid. Vajad neid ligipääsu taastamiseks, kui peaksid oma autentimisseadme kaotama.",
|
||||
"com_ui_download_error": "Viga faili allalaadimisel. Fail võib olla kustutatud.",
|
||||
"com_ui_drag_drop": "Lohistage",
|
||||
"com_ui_dropdown_variables": "Rippmenüü muutujad:",
|
||||
@@ -623,6 +644,9 @@
|
||||
"com_ui_fork_split_target_setting": "Alusta vaikimisi sihtsõnumist hargnemist",
|
||||
"com_ui_fork_success": "Vestluse hargnemine õnnestus",
|
||||
"com_ui_fork_visible": "Ainult nähtavad sõnumid",
|
||||
"com_ui_generate_backup": "Loo varukoodid",
|
||||
"com_ui_generate_qrcode": "Loo QR-kood",
|
||||
"com_ui_generating": "Loomine...",
|
||||
"com_ui_global_group": "Ülene grupp",
|
||||
"com_ui_go_back": "Mine tagasi",
|
||||
"com_ui_go_to_conversation": "Mine vestlusesse",
|
||||
@@ -631,6 +655,7 @@
|
||||
"com_ui_host": "Host",
|
||||
"com_ui_idea": "Ideed",
|
||||
"com_ui_image_gen": "Pildi genereerimine",
|
||||
"com_ui_import": "Impordi",
|
||||
"com_ui_import_conversation_error": "Vestluste importimisel tekkis viga",
|
||||
"com_ui_import_conversation_file_type_error": "Toetamatu imporditüüp",
|
||||
"com_ui_import_conversation_info": "Impordi vestlused JSON-failist",
|
||||
@@ -663,6 +688,7 @@
|
||||
"com_ui_new_chat": "Uus vestlus",
|
||||
"com_ui_next": "Järgmine",
|
||||
"com_ui_no": "Ei",
|
||||
"com_ui_no_backup_codes": "Varukoodid puuduvad. Palun loo uued",
|
||||
"com_ui_no_bookmarks": "Tundub, et sul pole veel järjehoidjaid. Klõpsa vestlusele ja lisa uus",
|
||||
"com_ui_no_category": "Kategooriat pole",
|
||||
"com_ui_no_changes": "Uuendamiseks pole muudatusi",
|
||||
@@ -671,6 +697,7 @@
|
||||
"com_ui_no_valid_items": "Sobivad üksused puuduvad!",
|
||||
"com_ui_none": "Puudub",
|
||||
"com_ui_none_selected": "Ühtegi pole valitud",
|
||||
"com_ui_not_used": "Kasutamata",
|
||||
"com_ui_nothing_found": "Midagi ei leitud",
|
||||
"com_ui_oauth": "OAuth",
|
||||
"com_ui_of": "kohta",
|
||||
@@ -698,6 +725,8 @@
|
||||
"com_ui_read_aloud": "Loe valjusti",
|
||||
"com_ui_refresh_link": "Värskenda linki",
|
||||
"com_ui_regenerate": "Genereeri uuesti",
|
||||
"com_ui_regenerate_backup": "Loo varukoodid uuesti",
|
||||
"com_ui_regenerating": "Uuesti loomine...",
|
||||
"com_ui_region": "Piirkond",
|
||||
"com_ui_rename": "Nimeta ümber",
|
||||
"com_ui_rename_prompt": "Nimeta sisend ümber",
|
||||
@@ -720,6 +749,7 @@
|
||||
"com_ui_schema": "Skeem",
|
||||
"com_ui_scope": "Ulatus",
|
||||
"com_ui_search": "Otsi",
|
||||
"com_ui_secret_key": "Salavõti",
|
||||
"com_ui_select": "Vali",
|
||||
"com_ui_select_file": "Vali fail",
|
||||
"com_ui_select_model": "Vali mudel",
|
||||
@@ -744,6 +774,7 @@
|
||||
"com_ui_shared_link_not_found": "Jagatud linki ei leitud",
|
||||
"com_ui_shared_prompts": "Jagatud sisendid",
|
||||
"com_ui_shop": "Ostlemine",
|
||||
"com_ui_show": "Kuva",
|
||||
"com_ui_show_all": "Näita kõiki",
|
||||
"com_ui_show_qr": "Näita QR-koodi",
|
||||
"com_ui_sign_in_to_domain": "Logi sisse {{0}}",
|
||||
@@ -781,10 +812,14 @@
|
||||
"com_ui_upload_invalid_var": "Fail on üleslaadimiseks vigane. Peab olema pilt, mis ei ületa {{0}} MB",
|
||||
"com_ui_upload_success": "Faili üleslaadimine õnnestus",
|
||||
"com_ui_upload_type": "Vali üleslaadimise tüüp",
|
||||
"com_ui_use_2fa_code": "Kasuta hoopis 2FA koodi",
|
||||
"com_ui_use_backup_code": "Kasuta hoopis varukoodi",
|
||||
"com_ui_use_micrphone": "Kasuta mikrofoni",
|
||||
"com_ui_use_prompt": "Kasuta sisendit",
|
||||
"com_ui_used": "Kasutatud",
|
||||
"com_ui_variables": "Muutujad",
|
||||
"com_ui_variables_info": "Kasuta oma tekstis topelt sulgusid, et luua muutujaid, nt `{{näidismuutuja}}`, et hiljem sisendi kasutamisel täita.",
|
||||
"com_ui_verify": "Kontrolli",
|
||||
"com_ui_version_var": "Versioon {{0}}",
|
||||
"com_ui_versions": "Versioonid",
|
||||
"com_ui_view_source": "Vaata algset vestlust",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"com_agents_not_available": "הסוכן לא זמין",
|
||||
"com_agents_search_name": "חפש סוכן לפי שם",
|
||||
"com_agents_update_error": "אירעה שגיאה בעדכון הסוכן שלך.",
|
||||
"com_assistants_action_attempt": "הסייען מעוניין לתקשר עם {{0}}",
|
||||
"com_assistants_action_attempt": "הסוכן מעוניין לתקשר עם {{0}}",
|
||||
"com_assistants_actions": "פעולות",
|
||||
"com_assistants_actions_disabled": "עליך ליצור סייען לפני הוספת פעולות.",
|
||||
"com_assistants_actions_info": "אפשר לסייען לאחזר מידע או לבצע פעולות באמצעות API",
|
||||
@@ -37,7 +37,7 @@
|
||||
"com_assistants_code_interpreter_info": "מתורגמן קוד מאפשר לסייען לכתוב ולהריץ קוד. כלי זה יכול לעבד קבצים עם נתונים ועיצוב מגוונים, וליצור קבצים כגון גרפים.",
|
||||
"com_assistants_completed_action": "תקשר עם {{0}}",
|
||||
"com_assistants_completed_function": "מריץ {{0}}",
|
||||
"com_assistants_conversation_starters": "התחלת שיחות",
|
||||
"com_assistants_conversation_starters": "התחלות שיחה",
|
||||
"com_assistants_conversation_starters_placeholder": "הכנס פתיח לשיחה",
|
||||
"com_assistants_create_error": "אירעה שגיאה ביצירת הסייען שלך.",
|
||||
"com_assistants_create_success": "נוצר בהצלחה",
|
||||
@@ -87,6 +87,7 @@
|
||||
"com_auth_email_verification_redirecting": "מפנה מחדש בעוד {{0}} שניות...",
|
||||
"com_auth_email_verification_resend_prompt": "לא קיבלת את הדוא\"ל?",
|
||||
"com_auth_email_verification_success": "הדוא\"ל אומת בהצלחה",
|
||||
"com_auth_email_verifying_ellipsis": "מאמת...",
|
||||
"com_auth_error_create": "אירעה שגיאה בניסיון לרשום את החשבון שלך. בבקשה נסה שוב.",
|
||||
"com_auth_error_invalid_reset_token": "אסימון איפוס הסיסמה הזה אינו תקף עוד.",
|
||||
"com_auth_error_login": "לא ניתן להתחבר עם המידע שסופק. אנא בדוק את האישורים שלך ונסה שוב.",
|
||||
@@ -123,9 +124,11 @@
|
||||
"com_auth_submit_registration": "שלח רישום",
|
||||
"com_auth_to_reset_your_password": "כדי לאפס את הסיסמה שלך.",
|
||||
"com_auth_to_try_again": "כדי לנסות שוב.",
|
||||
"com_auth_two_factor": "בדוק את יישום הסיסמה החד-פעמית שלך לקבלת קוד",
|
||||
"com_auth_username": "שם משתמש (אופציונלי)",
|
||||
"com_auth_username_max_length": "שם המשתמש חייב להיות פחות מ-20 תווים",
|
||||
"com_auth_username_min_length": "שם משתמש חייב להיות לפחות 2 תווים",
|
||||
"com_auth_verify_your_identity": "אמת את הזהות שלך",
|
||||
"com_auth_welcome_back": "ברוכים הבאים",
|
||||
"com_click_to_download": "(לחץ כאן להורדה)",
|
||||
"com_download_expired": "(פג תוקף ההורדה)",
|
||||
@@ -137,6 +140,8 @@
|
||||
"com_endpoint_anthropic_maxoutputtokens": "מספר האסימונים המרבי שניתן להפיק בתגובה. ציין ערך נמוך יותר עבור תגובות קצרות יותר וערך גבוה יותר עבור תגובות ארוכות יותר.",
|
||||
"com_endpoint_anthropic_prompt_cache": "שמירת מטמון מהירה מאפשרת שימוש חוזר בהקשר גדול או בהוראות בקריאות API, תוך הפחתת העלויות וההשהייה",
|
||||
"com_endpoint_anthropic_temp": "נע בין 0 ל-1. השתמש בטמפ' הקרובה יותר ל-0 עבור בחירה אנליטית / מרובה, וקרוב יותר ל-1 עבור משימות יצירתיות ויצירתיות. אנו ממליצים לשנות את זה או את Top P אבל לא את שניהם.",
|
||||
"com_endpoint_anthropic_thinking": "מאפשר חשיבה פנימית עבור דגמי Claude נתמכים (3.7 Sonnet). הערה: דורש שההגדרה של 'תקציב חשיבה' תהיה נמוכה מ'מקסימום טוקנים לפלט'",
|
||||
"com_endpoint_anthropic_thinking_budget": "קובע את מספר הטוקנים המקסימלי שקלוד רשאי להשתמש בו עבור תהליך החשיבה הפנימי. תקציב גבוה יותר עשוי לשפר את איכות התשובה על ידי מתן אפשרות לניתוח מעמיק יותר של בעיות מורכבות, אם כי קלוד לא בהכרח ישתמש בכל התקציב שהוקצה, במיוחד בטווחים שמעל 32K. הגדרה זו חייבת להיות נמוכה מ'מקסימום טוקנים לפלט'.",
|
||||
"com_endpoint_anthropic_topk": "Top-k משנה את האופן שבו המודל בוחר אסימונים לפלט. Top-k של 1 פירושו שהאסימון שנבחר הוא הסביר ביותר מבין כל האסימונים באוצר המילים של הדגם (נקרא גם פענוח חמדן), בעוד ש-top-k של 3 פירושו שהאסימון הבא נבחר מבין 3 הכי הרבה. אסימונים סבירים (באמצעות טמפרטורה).",
|
||||
"com_endpoint_anthropic_topp": "Top-p משנה את האופן שבו המודל בוחר אסימונים לפלט. אסימונים נבחרים מבין רוב K (ראה פרמטר topK) הסביר לפחות עד שסכום ההסתברויות שלהם שווה לערך העליון-p.",
|
||||
"com_endpoint_assistant": "סייען",
|
||||
@@ -242,6 +247,8 @@
|
||||
"com_endpoint_stop": "רצף לעצירה",
|
||||
"com_endpoint_stop_placeholder": "הפרד ערכים על ידי לחיצה על 'Enter'",
|
||||
"com_endpoint_temperature": "טמפרטורה",
|
||||
"com_endpoint_thinking": "חשיבה",
|
||||
"com_endpoint_thinking_budget": "תקציב חשיבה",
|
||||
"com_endpoint_top_k": "Top K",
|
||||
"com_endpoint_top_p": "Top P",
|
||||
"com_endpoint_use_active_assistant": "השתמש ב-סייען פעיל",
|
||||
@@ -264,6 +271,7 @@
|
||||
"com_files_table": "השדה חייב להכיל תוכן, הוא אינו יכול להישאר ריק",
|
||||
"com_generated_files": "קבצים שנוצרו:",
|
||||
"com_hide_examples": "הסתר דוגמאות",
|
||||
"com_nav_2fa": "אימות דו-שלבי (2FA)",
|
||||
"com_nav_account_settings": "הגדרות חשבון",
|
||||
"com_nav_always_make_prod": "ייצר תמיד גרסאות חדשות",
|
||||
"com_nav_archive_created_at": "תאריך ייצור",
|
||||
@@ -272,10 +280,10 @@
|
||||
"com_nav_archived_chats_empty": "אין שיחות מארכיון.",
|
||||
"com_nav_at_command": "@-פקודה",
|
||||
"com_nav_at_command_description": "הפקודה \"@\" משמשת כמנגנון הפעלה/החלפה של נקודות קצה, מודלים, הגדרות קבועות מראש וכו'.",
|
||||
"com_nav_audio_play_error": "שגיאה בהפעלת האודיו: {{0}}",
|
||||
"com_nav_audio_play_error": "שגיאה בהפעלת אודיו: {{0}}",
|
||||
"com_nav_audio_process_error": "שגיאה בעיבוד האודיו: {{0}}",
|
||||
"com_nav_auto_scroll": "Auto-s גלול אל הכי חדש בפתיחה",
|
||||
"com_nav_auto_send_prompts": "הנחיות (פרומפטים) לשליחה אוטומטית",
|
||||
"com_nav_auto_send_prompts": "שליחת הנחיות (פרומפטים) אוטומטית",
|
||||
"com_nav_auto_send_text": "טקסט לשליחה אוטומטית",
|
||||
"com_nav_auto_send_text_disabled": "הגדר -1 כדי להשבית",
|
||||
"com_nav_auto_transcribe_audio": "תמלול אוטומטי של אודיו",
|
||||
@@ -294,10 +302,10 @@
|
||||
"com_nav_close_sidebar": "סגור סרגל צד",
|
||||
"com_nav_commands": "פקודות",
|
||||
"com_nav_confirm_clear": "אשר ניקוי",
|
||||
"com_nav_conversation_mode": "ביקורות בהמתנה",
|
||||
"com_nav_conversation_mode": "מצב שיחה",
|
||||
"com_nav_convo_menu_options": "אפשרויות מצב שיחה",
|
||||
"com_nav_db_sensitivity": "רגישות דציבלים",
|
||||
"com_nav_delete_account": "מחק חשבון",
|
||||
"com_nav_delete_account": "מחיקת החשבון",
|
||||
"com_nav_delete_account_button": "מחק את החשבון שלי לצמיתות",
|
||||
"com_nav_delete_account_confirm": "מחק חשבון - אתה בטוח?",
|
||||
"com_nav_delete_account_email_placeholder": "אנא הזן את כתובת הדוא\"ל של החשבון שלך",
|
||||
@@ -321,13 +329,15 @@
|
||||
"com_nav_export_type": "סוג",
|
||||
"com_nav_external": "חיצוני",
|
||||
"com_nav_font_size": "גודל גופן",
|
||||
"com_nav_font_size_base": "בינוני",
|
||||
"com_nav_font_size_base": "מדיום",
|
||||
"com_nav_font_size_lg": "גדול",
|
||||
"com_nav_font_size_sm": "קטן",
|
||||
"com_nav_font_size_xl": "גדול מאוד",
|
||||
"com_nav_font_size_xs": "קטן מאוד",
|
||||
"com_nav_font_size_xs": "קט מאוד",
|
||||
"com_nav_help_faq": "עזרה ושאלות נפוצות",
|
||||
"com_nav_hide_panel": "הסתר לוח הצד הימני ביותר",
|
||||
"com_nav_info_code_artifacts": "אפשר הצגה של רכיבי תצוגת קוד ניסיוניים לצד הצ'אט",
|
||||
"com_nav_info_code_artifacts_agent": "אפשר שימוש ברכיבי תצוגת קוד עבור סוכן זה כברירת מחדל, מתווספות הוראות נוספות ספציפיות לשימוש ברכיבי התצוגה אלא אם \"מצב הנחיה מותאם אישית\" מופעל.",
|
||||
"com_nav_info_custom_prompt_mode": "כאשר אפשרות זו מופעלת, הנחיית ברירת המחדל של מערכת רכיבי תצוגה לא תיכלל. כל ההוראות ליצירת רכיבי תצוגה יהיו חייבות להינתן באופן ידני במצב זה.",
|
||||
"com_nav_info_enter_to_send": "כאשר מופעל, לחיצה על \"ENTER\" תשלח את ההודעה שלך, כאשר מושבת לחיצה על \"Enter\" תוסיף שורה חדשה, ותצטרך ללחוץ על \"CTRL + ENTER\" כדי לשלוח את ההודעה.",
|
||||
"com_nav_info_fork_change_default": "'הודעות ישירות בלבד' כולל רק את הנתיב הישיר להודעה שנבחרה. 'כלול הסתעפויות קשורות' מוסיף את כל ההסתעפויות הקשורות לאורך הנתיב. 'כלול הכל עד כאן/מכאן' כולל את כל ההודעות וההסתעפויות המחוברות.",
|
||||
@@ -338,7 +348,7 @@
|
||||
"com_nav_info_show_thinking": "כאשר אפשרות זו מופעלת, תיבות תצוגה שמציגות את תהליך החשיבה של הבינה המלאכותית יופיעו פתוחות כברירת מחדל, כך שתוכל לראות את תהליך הניתוח בזמן אמת. כאשר האפשרות מושבתת, תיבות הבחירה יישארו סגורות כברירת מחדל, מה שיוצר ממשק נקי וזורם יותר.",
|
||||
"com_nav_info_user_name_display": "כאשר אפשרות זו מופעלת, שם המשתמש של השולח יוצג מעל כל הודעה שאתה שולח. כאשר האפשרות מושבתת, יוצג רק הכיתוב \"אתה\" מעל ההודעות שלך.",
|
||||
"com_nav_lang_arabic": "ערבית (العربية)",
|
||||
"com_nav_lang_auto": "זיהוי אוטומטי",
|
||||
"com_nav_lang_auto": "זיהוי באופן אוטומטי",
|
||||
"com_nav_lang_brazilian_portuguese": "פורטוגזית ברזילאית (Português Brasileiro)",
|
||||
"com_nav_lang_chinese": "סינית (中文)",
|
||||
"com_nav_lang_dutch": "הולנדית (Nederlands)",
|
||||
@@ -370,13 +380,13 @@
|
||||
"com_nav_no_search_results": "לא נמצאו תוצאות בחיפוש",
|
||||
"com_nav_not_supported": "לא נתמך",
|
||||
"com_nav_open_sidebar": "פתח סרגל צד",
|
||||
"com_nav_playback_rate": "קצב השמעת אודיו",
|
||||
"com_nav_playback_rate": "קצב השמעת האודיו",
|
||||
"com_nav_plugin_auth_error": "אירעה שגיאה בניסיון לאמת את הפלאגין הזה. בבקשה נסה שוב.",
|
||||
"com_nav_plugin_install": "התקן",
|
||||
"com_nav_plugin_search": "תוספי חיפוש",
|
||||
"com_nav_plugin_store": "חנות פלאגין",
|
||||
"com_nav_plugin_uninstall": "הסר התקנה",
|
||||
"com_nav_plus_command": "פקודת+-",
|
||||
"com_nav_plus_command": "פקודות+-",
|
||||
"com_nav_plus_command_description": "הפעל או בטל את הפקודה '+' כדי להוסיף הגדרת תגובות מרובות",
|
||||
"com_nav_profile_picture": "תמונת פרופיל",
|
||||
"com_nav_save_drafts": "שמיר את האפצה באותו מחשב",
|
||||
@@ -431,6 +441,16 @@
|
||||
"com_sidepanel_parameters": "פרמטרים",
|
||||
"com_sidepanel_select_agent": "בחר סוכן",
|
||||
"com_sidepanel_select_assistant": "בחר סייען",
|
||||
"com_ui_2fa_account_security": "אימות דו-שלבי מוסיף שכבת אבטחה נוספת לחשבון שלך",
|
||||
"com_ui_2fa_disable": "השבת אימות דו-שלבי (2FA)",
|
||||
"com_ui_2fa_disable_error": "התרחשה שגיאה בעת ביטול האימות הדו-שלבי",
|
||||
"com_ui_2fa_disabled": "האימות הדו-שלבי הושבת (2FA)",
|
||||
"com_ui_2fa_enable": "אפשר אימות דו-שלבי (2FA)",
|
||||
"com_ui_2fa_enabled": "האימות הדו-שלבי (2FA) הופעל",
|
||||
"com_ui_2fa_generate_error": "תרחשה שגיאה בעת יצירת הגדרות האימות הדו-שלבי (2FA)",
|
||||
"com_ui_2fa_invalid": "קוד האימות הדו-שלבי שגוי",
|
||||
"com_ui_2fa_setup": "הגדר אימות דו-שלבי (2FA)",
|
||||
"com_ui_2fa_verified": "האימות הדו-שלבי אומת בהצלחה",
|
||||
"com_ui_accept": "אני מקבל",
|
||||
"com_ui_add": "הוסף",
|
||||
"com_ui_add_model_preset": "הוספת מודל או הגדרה קבועה לתגובה נוספת",
|
||||
@@ -461,10 +481,11 @@
|
||||
"com_ui_artifacts": "רכיבי תצוגה",
|
||||
"com_ui_artifacts_toggle": "הפעל/כבה רכיבי תצוגה",
|
||||
"com_ui_artifacts_toggle_agent": "אפשר רכיבי תצוגה",
|
||||
"com_ui_ascending": "סדר עולה",
|
||||
"com_ui_assistant": "סייען",
|
||||
"com_ui_assistant_delete_error": "אירעה שגיאה בעת מחיקת הסייען",
|
||||
"com_ui_assistant_deleted": "הסייען נמחק בהצלחה",
|
||||
"com_ui_assistants": "סייענים",
|
||||
"com_ui_assistants": "סייען",
|
||||
"com_ui_assistants_output": "פלט סייענים",
|
||||
"com_ui_attach_error": "לא ניתן לצרף קובץ. צור או בחר שיחה, או נסה לרענן את הדף.",
|
||||
"com_ui_attach_error_openai": "לא ניתן לצרף את קבצי הסייען לנקודות קצה אחרות",
|
||||
@@ -473,7 +494,7 @@
|
||||
"com_ui_attach_warn_endpoint": "עשוי להתעלם מקבצים שאינם של הסייען שאין להם כלי תואם",
|
||||
"com_ui_attachment": "קובץ מצורף",
|
||||
"com_ui_auth_type": "סוג אישור",
|
||||
"com_ui_auth_url": "כתובת URL לאימות",
|
||||
"com_ui_auth_url": "כתובת URL לאימות הרשאה",
|
||||
"com_ui_authentication": "אימות",
|
||||
"com_ui_authentication_type": "סוג אימות",
|
||||
"com_ui_avatar": "אווטאר",
|
||||
@@ -573,7 +594,7 @@
|
||||
"com_ui_description": "תיאור",
|
||||
"com_ui_description_placeholder": "אופציונלי: הזן תיאור שיוצג עבור ההנחיה (פרומפט)",
|
||||
"com_ui_disabling": "מבטל הפעלה...",
|
||||
"com_ui_download": "הורדה",
|
||||
"com_ui_download": "הורדות",
|
||||
"com_ui_download_artifact": "רכיב תצוגת הורדות",
|
||||
"com_ui_download_backup": "הורד קודי גיבוי",
|
||||
"com_ui_download_backup_tooltip": "לפני שתמשיך, הורד את קודי הגיבוי שלך. תזדקק להם כדי לשחזר גישה במקרה שתאבד את מכשיר האימות שלך",
|
||||
@@ -610,50 +631,126 @@
|
||||
"com_ui_fork_default": "השתמש בהגדרות הסתעפויות ברירת מחדל",
|
||||
"com_ui_fork_error": "אירעה שגיאה בעת פיצול השיחה",
|
||||
"com_ui_fork_from_message": "בחר הגדרת הסתעפויות",
|
||||
"com_ui_fork_info_1": "השתמש בהגדרה זו כדי ליצור הסתעפות של הודעות עם ההתנהגות הרצויה.",
|
||||
"com_ui_fork_info_2": "\"הסתעפות\" מתייחסת ליצירת שיחה חדשה המתחילה/מסתיימת מהודעות ספציפיות בשיחה הנוכחית, תוך יצירת העתק בהתאם לאפשרויות שנבחרו.",
|
||||
"com_ui_fork_info_3": "\"הודעת היעד\" מתייחסת להודעה שממנה נפתחה חלונית זו, או, אם סימנת \"{{0}}\", להודעה האחרונה בשיחה.",
|
||||
"com_ui_fork_info_branches": "אפשרות זו מפצלת את ההודעות הגלויות, יחד עם ההסתעפויות הקשורות; במילים אחרות, המסלול הישיר להודעת היעד, כולל את ההסתעפויות לאורך המסלול.",
|
||||
"com_ui_fork_info_remember": "סמן כדי לזכור את האפשרויות שבחרת לשימושים הבאים, כך שתוכל ליצור הסתעפויות בשיחות מהר יותר לפי העדפתך.",
|
||||
"com_ui_fork_info_start": "כאשר מסומן, ההסתעפות תחל מההודעה זו ותימשך עד להודעה האחרונה בשיחה, על פי ההתנהגות שנבחרה לעיל.",
|
||||
"com_ui_fork_info_target": "אפשרות זו תיצור הסתעפות שתכלול את כל ההודעות המובילות להודעת היעד, כולל ההודעות הסמוכות; במילים אחרות, כל ההסתעפויות של ההודעות יכללו, בין אם הם גלויות או לא, ובין אם הם נמצאות באותו מסלול או לא.",
|
||||
"com_ui_fork_info_visible": "אפשרות זו תיצור הסתעפות רק של ההודעות הגלויות; במילים אחרות, רק את המסלול הישיר להודעת היעד, ללא הסתעפויות נוספות.",
|
||||
"com_ui_fork_processing": "יוצר הסתעפות בשיחה...",
|
||||
"com_ui_fork_remember": "זכור",
|
||||
"com_ui_fork_remember_checked": "הבחירה שלך תישמר אחרי השימוש. תוכל לשנות זאת בכל זמן בהגדרות.",
|
||||
"com_ui_fork_split_target": "התחל הסתעפות כאן",
|
||||
"com_ui_fork_split_target_setting": "התחל הסתעפות מהודעת היעד כברירת מחדל",
|
||||
"com_ui_fork_success": "יצירת ההסתעפות בשיחה הסתיימה בהצלחה",
|
||||
"com_ui_fork_visible": "הודעות גלויות בלבד",
|
||||
"com_ui_generate_backup": "צור קודי גיבוי",
|
||||
"com_ui_generate_qrcode": "צור קוד QR",
|
||||
"com_ui_generating": "יוצר...",
|
||||
"com_ui_global_group": "שדה זה לא יכול להישאר ריק",
|
||||
"com_ui_go_back": "חזור",
|
||||
"com_ui_go_to_conversation": "חזור לצ'אט",
|
||||
"com_ui_happy_birthday": "זה יום ההולדת הראשון שלי!",
|
||||
"com_ui_hide_qr": "הסתר קוד QR",
|
||||
"com_ui_host": "מארח",
|
||||
"com_ui_idea": "רעיונות",
|
||||
"com_ui_image_gen": "מחולל תמונות",
|
||||
"com_ui_import": "ייבוא",
|
||||
"com_ui_import_conversation_error": "אירעה שגיאה בעת ייבוא השיחות שלך",
|
||||
"com_ui_import_conversation_file_type_error": "סוג ייבוא לא נתמך",
|
||||
"com_ui_import_conversation_info": "ייבא שיחות מקובץ JSON",
|
||||
"com_ui_import_conversation_success": "השיחות יובאו בהצלחה",
|
||||
"com_ui_include_shadcnui": "יש לכלול הוראות לשימוש ברכיבי ממשק המשתמש של shadcn/ui",
|
||||
"com_ui_include_shadcnui_agent": "יש לכלול הוראות שימוש ב-shadcn/ui",
|
||||
"com_ui_input": "קלט",
|
||||
"com_ui_instructions": "הוראות",
|
||||
"com_ui_latest_footer": "גישה לכל הבינות המלאכותיות (AI) לכולם",
|
||||
"com_ui_latest_production_version": "גרסת הפיתוח העדכנית ביותר",
|
||||
"com_ui_latest_version": "גרסה אחרונה",
|
||||
"com_ui_librechat_code_api_key": "קבל את מפתח ה-API של מפענח הקוד LibreChat",
|
||||
"com_ui_librechat_code_api_subtitle": "אבטחה ללא פשרות. תמיכה במגוון שפות תכנות. יכולת עבודה מלאה עם קבצים.",
|
||||
"com_ui_librechat_code_api_title": "הרץ קוד AI",
|
||||
"com_ui_llm_menu": "תפריט מודל שפה גדול (LLM)",
|
||||
"com_ui_llms_available": "מודל שפה גדול (LLM)",
|
||||
"com_ui_loading": "טוען...",
|
||||
"com_ui_locked": "נעול",
|
||||
"com_ui_logo": "\"לוגו {{0}}\"",
|
||||
"com_ui_manage": "נהל",
|
||||
"com_ui_max_tags": "המספר המקסימלי המותר על פי הערכים העדכניים הוא {{0}}.",
|
||||
"com_ui_mention": "ציין נקודת קצה, סייען, או הנחייה (פרופמט) כדי לעבור אליה במהירות",
|
||||
"com_ui_min_tags": "לא ניתן למחוק ערכים נוספים, יש צורך במינימום {{0}} ערכים.",
|
||||
"com_ui_misc": "כללי",
|
||||
"com_ui_model": "דגם",
|
||||
"com_ui_model_parameters": "הגדרות המודל",
|
||||
"com_ui_more_info": "מידע נוסף",
|
||||
"com_ui_my_prompts": "ההנחיות (פרומפטים) שלי",
|
||||
"com_ui_name": "שם",
|
||||
"com_ui_new_chat": "שיחה חדשה",
|
||||
"com_ui_next": "הבא",
|
||||
"com_ui_no": "לא",
|
||||
"com_ui_no_backup_codes": "אין קודי גיבוי זמינים. אנא צור קודים חדשים",
|
||||
"com_ui_no_bookmarks": "עדיין אין לך סימניות. בחר שיחה והוסף סימניה חדשה",
|
||||
"com_ui_no_category": "אין קטגוריה",
|
||||
"com_ui_no_changes": "אין שינויים לעדכן",
|
||||
"com_ui_no_data": "השדה חייב להכיל תוכן, הוא לא יכול להישאר ריק",
|
||||
"com_ui_no_terms_content": "אין תוכן תנאים והגבלות להצגה",
|
||||
"com_ui_no_valid_items": "השדה חייב להכיל תוכן, הוא לא יכול להישאר ריק",
|
||||
"com_ui_none": "אף אחד",
|
||||
"com_ui_none_selected": "לא ",
|
||||
"com_ui_not_used": "לא בשימוש",
|
||||
"com_ui_nothing_found": "לא נמצא",
|
||||
"com_ui_oauth": "פרוטוקול אימות פתוח (OAuth)",
|
||||
"com_ui_of": "של",
|
||||
"com_ui_off": "של",
|
||||
"com_ui_on": "פעיל",
|
||||
"com_ui_page": "עמוד",
|
||||
"com_ui_prev": "הקודם",
|
||||
"com_ui_preview": "תצוגה מקדימה",
|
||||
"com_ui_privacy_policy": "מדיניות פרטיות",
|
||||
"com_ui_privacy_policy_url": "קישור למדיניות הפרטיות",
|
||||
"com_ui_prompt": "הנחיה (פרומפט)",
|
||||
"com_ui_prompt_already_shared_to_all": "ההנחיה הזו כבר משותפת עם כל המשתמשים",
|
||||
"com_ui_prompt_name": "שם הנחיה (פרומפט)",
|
||||
"com_ui_prompt_name_required": "נדרש שם הנחיה (פרומפט)",
|
||||
"com_ui_prompt_preview_not_shared": "היוצר לא אפשר שיתוף פעולה להנחיה זו",
|
||||
"com_ui_prompt_text": "טקסט",
|
||||
"com_ui_prompt_text_required": "נדרש טקסט",
|
||||
"com_ui_prompt_update_error": "אירעה שגיאה בעדכון ההנחיה (פרומפט)",
|
||||
"com_ui_prompts": "הנחיות (פרומפטים)",
|
||||
"com_ui_prompts_allow_create": "אפשר יצירת הנחיות",
|
||||
"com_ui_prompts_allow_share_global": "אפשר שיתוף הנחיות (פרומפטים) עם כל המשתמשים",
|
||||
"com_ui_prompts_allow_use": "אפשר שימוש בהנחיות (פרומפטים)",
|
||||
"com_ui_provider": "ספק",
|
||||
"com_ui_read_aloud": "הקראה",
|
||||
"com_ui_refresh_link": "רענון קישור",
|
||||
"com_ui_regenerate": "לחדש",
|
||||
"com_ui_regenerate_backup": "צור קודי גיבוי מחדש",
|
||||
"com_ui_regenerating": "יוצר מחדש...",
|
||||
"com_ui_region": "איזור",
|
||||
"com_ui_rename": "שנה שם",
|
||||
"com_ui_rename_prompt": "שנה שם הנחיה (פרומפט)",
|
||||
"com_ui_requires_auth": "נדרש אימות",
|
||||
"com_ui_reset_var": "איפוס {{0}}",
|
||||
"com_ui_result": "תוצאה",
|
||||
"com_ui_revoke": "בטל",
|
||||
"com_ui_revoke_info": "בטל את כל האישורים שסופקו על ידי המשתמש",
|
||||
"com_ui_revoke_key_confirm": "האם אתה בטוח שברצונך לבטל את המפתח הזה?",
|
||||
"com_ui_revoke_key_endpoint": "ביטול מפתח עבור {{0}}",
|
||||
"com_ui_revoke_keys": "ביטול מפתחות",
|
||||
"com_ui_revoke_keys_confirm": "האם אתה בטוח שברצונך לבטל את כל המפתחות?",
|
||||
"com_ui_role_select": "תפקיד",
|
||||
"com_ui_roleplay": "משחק תפקידים",
|
||||
"com_ui_run_code": "הרץ קו",
|
||||
"com_ui_run_code_error": "אירעה שגיאה בהרצת הקוד",
|
||||
"com_ui_save": "שמור",
|
||||
"com_ui_save_submit": "שמור ושלח",
|
||||
"com_ui_saved": "שמור!",
|
||||
"com_ui_schema": "סכמה",
|
||||
"com_ui_scope": "תחום",
|
||||
"com_ui_search": "חיפוש",
|
||||
"com_ui_secret_key": "מפתח סודי",
|
||||
"com_ui_select": "בחר",
|
||||
"com_ui_select_file": "בחר קובץ",
|
||||
"com_ui_select_model": "בחר מודל",
|
||||
@@ -668,6 +765,7 @@
|
||||
"com_ui_share_create_message": "שמך וכל הודעה שתוסיף לאחר השיתוף יישארו פרטיים.",
|
||||
"com_ui_share_delete_error": "אירעה שגיאה בעת מחיקת הקישור המשותף.",
|
||||
"com_ui_share_error": "אירעה שגיאה בעת שיתוף קישור הצ'אט",
|
||||
"com_ui_share_form_description": "השדה חייב להכיל תוכן, הוא אינו יכול להישאר ריק",
|
||||
"com_ui_share_link_to_chat": "שתף קישור בצ'אט",
|
||||
"com_ui_share_to_all_users": "שתף עם כל המשתמשים",
|
||||
"com_ui_share_update_message": "השם שלך, ההוראות המותאמות אישית וכל ההודעות שתוסיף לאחר השיתוף יישארו פרטיים.",
|
||||
@@ -677,12 +775,14 @@
|
||||
"com_ui_shared_link_not_found": "הקישור המשותף לא נמצא",
|
||||
"com_ui_shared_prompts": "הנחיות (פרומפטים) משותפות",
|
||||
"com_ui_shop": "קניות",
|
||||
"com_ui_show": "הצג",
|
||||
"com_ui_show_all": "הראה הכל",
|
||||
"com_ui_show_qr": "הראה קוד QR",
|
||||
"com_ui_sign_in_to_domain": "היכנס אל {{0}}",
|
||||
"com_ui_simple": "פשוט",
|
||||
"com_ui_size": "סוג",
|
||||
"com_ui_special_variables": "משתנים מיוחדים:",
|
||||
"com_ui_special_variables_info": "השתמש ב-`{{current_date}}` עבור התאריך הנוכחי, וב-`{{current_user}}` עבור שם החשבון שלך.",
|
||||
"com_ui_speech_while_submitting": "לא ניתן לשלוח אודיו בזמן שנוצרת תגובה",
|
||||
"com_ui_stop": "עצור",
|
||||
"com_ui_storage": "אחסון",
|
||||
@@ -696,12 +796,16 @@
|
||||
"com_ui_token_exchange_method": "שיטת החלפת טוקנים",
|
||||
"com_ui_token_url": "קישור URL לטוקן",
|
||||
"com_ui_tools": "כלים",
|
||||
"com_ui_travel": "מסע",
|
||||
"com_ui_unarchive": "לארכיון",
|
||||
"com_ui_unarchive_error": "אירעה שגיאה בארכיון השיחה",
|
||||
"com_ui_unknown": "לא ידוע",
|
||||
"com_ui_update": "עדכון",
|
||||
"com_ui_upload": "העלה",
|
||||
"com_ui_upload_code_files": "העלאה עבור מפענח הקוד",
|
||||
"com_ui_upload_delay": "העלאת \"{{0}}\" לוקחת יותר זמן מהצפוי. אנא המתן בזמן שהקובץ מסיים את האינדוקס לאחזור.",
|
||||
"com_ui_upload_error": "אירעה שגיאה בהעלאת הקובץ שלך",
|
||||
"com_ui_upload_file_search": "העלאה לחיפוש בקבצים",
|
||||
"com_ui_upload_files": "העלה קבצים",
|
||||
"com_ui_upload_image": "העלה תמונה",
|
||||
"com_ui_upload_image_input": "העלה תמונה",
|
||||
@@ -709,9 +813,14 @@
|
||||
"com_ui_upload_invalid_var": "אין אפשרות להעלות את הקובץ. התמונה צריכה להיות בגודל של עד {{0}} MB",
|
||||
"com_ui_upload_success": "הקובץ הועלה בהצלחה",
|
||||
"com_ui_upload_type": "בחר סוג העלאה",
|
||||
"com_ui_use_2fa_code": "השתמש בקוד אימות דו-שלבי (2FA) במקום",
|
||||
"com_ui_use_backup_code": "השתמש בקוד גיבוי במקום",
|
||||
"com_ui_use_micrphone": "שימוש במיקורפון",
|
||||
"com_ui_use_prompt": "השתמש בהנחיה (פרומפט)",
|
||||
"com_ui_used": "נוצל",
|
||||
"com_ui_variables": "משתנים",
|
||||
"com_ui_variables_info": "השתמש בסוגריים מסולסלות כפולות בטקסט שלך ליצירת משתנים, לדוגמא `{{example variable}}`, כדי למלא אותם מאוחר יותר בשימוש בהנחיה.",
|
||||
"com_ui_verify": "אמת",
|
||||
"com_ui_version_var": "גרסה {{0}}",
|
||||
"com_ui_versions": "גרסה",
|
||||
"com_ui_view_source": "הצג צ'אט מקורי",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require('path');
|
||||
require('module-alias')({ base: path.resolve(__dirname, '..', 'api') });
|
||||
const connect = require('./connect');
|
||||
const User = require('../api/models/User');
|
||||
const connect = require('./connect');
|
||||
|
||||
const listUsers = async () => {
|
||||
try {
|
||||
@@ -11,6 +11,7 @@ const listUsers = async () => {
|
||||
console.log('\nUser List:');
|
||||
console.log('----------------------------------------');
|
||||
users.forEach((user) => {
|
||||
console.log(`ID: ${user._id.toString()}`);
|
||||
console.log(`Email: ${user.email}`);
|
||||
console.log(`Username: ${user.username || 'N/A'}`);
|
||||
console.log(`Name: ${user.name || 'N/A'}`);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// v0.7.7-rc1
|
||||
// v0.7.7
|
||||
// See .env.test.example for an example of the '.env.test' file.
|
||||
require('dotenv').config({ path: './e2e/.env.test' });
|
||||
|
||||
@@ -113,12 +113,14 @@ mcpServers:
|
||||
everything:
|
||||
# type: sse # type can optionally be omitted
|
||||
url: http://localhost:3001/sse
|
||||
timeout: 60000 # 1 minute timeout for this server, this is the default timeout for MCP servers.
|
||||
puppeteer:
|
||||
type: stdio
|
||||
command: npx
|
||||
args:
|
||||
- -y
|
||||
- "@modelcontextprotocol/server-puppeteer"
|
||||
timeout: 300000 # 5 minutes timeout for this server
|
||||
filesystem:
|
||||
# type: stdio
|
||||
command: npx
|
||||
|
||||
1887
package-lock.json
generated
1887
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "LibreChat",
|
||||
"version": "v0.7.7-rc1",
|
||||
"version": "v0.7.7",
|
||||
"description": "",
|
||||
"workspaces": [
|
||||
"api",
|
||||
@@ -23,8 +23,8 @@
|
||||
"update:sudo": "node config/update.js --sudo",
|
||||
"update:deployed": "node config/deployed-update.js",
|
||||
"rebase:deployed": "node config/deployed-update.js --rebase",
|
||||
"start:deployed": "docker-compose -f ./deploy-compose.yml up -d",
|
||||
"stop:deployed": "docker-compose -f ./deploy-compose.yml down",
|
||||
"start:deployed": "docker compose -f ./deploy-compose.yml up -d || docker-compose -f ./deploy-compose.yml up -d",
|
||||
"stop:deployed": "docker compose -f ./deploy-compose.yml down || docker-compose -f ./deploy-compose.yml down",
|
||||
"upgrade": "node config/upgrade.js",
|
||||
"create-user": "node config/create-user.js",
|
||||
"invite-user": "node config/invite-user.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.7.6996",
|
||||
"version": "0.7.7",
|
||||
"description": "data services for librechat apps",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
input: entryPath,
|
||||
output: {
|
||||
dir: 'test_bundle',
|
||||
format: 'cjs',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [
|
||||
alias(customAliases),
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
import { z } from 'zod';
|
||||
import * as s from './schemas';
|
||||
|
||||
type ThinkingConfig = {
|
||||
type: 'enabled';
|
||||
budget_tokens: number;
|
||||
};
|
||||
type AnthropicReasoning = {
|
||||
thinking?: ThinkingConfig | boolean;
|
||||
thinkingBudget?: number;
|
||||
};
|
||||
|
||||
type AnthropicInput = BedrockConverseInput & {
|
||||
additionalModelRequestFields: BedrockConverseInput['additionalModelRequestFields'] &
|
||||
AnthropicReasoning;
|
||||
};
|
||||
|
||||
export const bedrockInputSchema = s.tConversationSchema
|
||||
.pick({
|
||||
/* LibreChat params; optionType: 'conversation' */
|
||||
@@ -21,11 +35,24 @@ export const bedrockInputSchema = s.tConversationSchema
|
||||
temperature: true,
|
||||
topP: true,
|
||||
stop: true,
|
||||
thinking: true,
|
||||
thinkingBudget: true,
|
||||
/* Catch-all fields */
|
||||
topK: true,
|
||||
additionalModelRequestFields: true,
|
||||
})
|
||||
.transform((obj) => s.removeNullishValues(obj))
|
||||
.transform((obj) => {
|
||||
if ((obj as AnthropicInput).additionalModelRequestFields?.thinking != null) {
|
||||
const _obj = obj as AnthropicInput;
|
||||
obj.thinking = !!_obj.additionalModelRequestFields.thinking;
|
||||
obj.thinkingBudget =
|
||||
typeof _obj.additionalModelRequestFields.thinking === 'object'
|
||||
? (_obj.additionalModelRequestFields.thinking as ThinkingConfig)?.budget_tokens
|
||||
: undefined;
|
||||
delete obj.additionalModelRequestFields;
|
||||
}
|
||||
return s.removeNullishValues(obj);
|
||||
})
|
||||
.catch(() => ({}));
|
||||
|
||||
export type BedrockConverseInput = z.infer<typeof bedrockInputSchema>;
|
||||
@@ -49,6 +76,8 @@ export const bedrockInputParser = s.tConversationSchema
|
||||
temperature: true,
|
||||
topP: true,
|
||||
stop: true,
|
||||
thinking: true,
|
||||
thinkingBudget: true,
|
||||
/* Catch-all fields */
|
||||
topK: true,
|
||||
additionalModelRequestFields: true,
|
||||
@@ -87,6 +116,27 @@ export const bedrockInputParser = s.tConversationSchema
|
||||
}
|
||||
});
|
||||
|
||||
/** Default thinking and thinkingBudget for 'anthropic.claude-3-7-sonnet' models, if not defined */
|
||||
if (
|
||||
typeof typedData.model === 'string' &&
|
||||
typedData.model.includes('anthropic.claude-3-7-sonnet')
|
||||
) {
|
||||
if (additionalFields.thinking === undefined) {
|
||||
additionalFields.thinking = true;
|
||||
} else if (additionalFields.thinking === false) {
|
||||
delete additionalFields.thinking;
|
||||
delete additionalFields.thinkingBudget;
|
||||
}
|
||||
|
||||
if (additionalFields.thinking === true && additionalFields.thinkingBudget === undefined) {
|
||||
additionalFields.thinkingBudget = 2000;
|
||||
}
|
||||
additionalFields.anthropic_beta = ['output-128k-2025-02-19'];
|
||||
} else if (additionalFields.thinking != null || additionalFields.thinkingBudget != null) {
|
||||
delete additionalFields.thinking;
|
||||
delete additionalFields.thinkingBudget;
|
||||
}
|
||||
|
||||
if (Object.keys(additionalFields).length > 0) {
|
||||
typedData.additionalModelRequestFields = {
|
||||
...((typedData.additionalModelRequestFields as Record<string, unknown> | undefined) || {}),
|
||||
@@ -104,9 +154,34 @@ export const bedrockInputParser = s.tConversationSchema
|
||||
})
|
||||
.catch(() => ({}));
|
||||
|
||||
/**
|
||||
* Configures the "thinking" parameter based on given input and thinking options.
|
||||
*
|
||||
* @param data - The parsed Bedrock request options object
|
||||
* @returns The object with thinking configured appropriately
|
||||
*/
|
||||
function configureThinking(data: AnthropicInput): AnthropicInput {
|
||||
const updatedData = { ...data };
|
||||
if (updatedData.additionalModelRequestFields?.thinking === true) {
|
||||
updatedData.maxTokens = updatedData.maxTokens ?? updatedData.maxOutputTokens ?? 8192;
|
||||
delete updatedData.maxOutputTokens;
|
||||
const thinkingConfig: AnthropicReasoning['thinking'] = {
|
||||
type: 'enabled',
|
||||
budget_tokens: updatedData.additionalModelRequestFields.thinkingBudget ?? 2000,
|
||||
};
|
||||
|
||||
if (thinkingConfig.budget_tokens > updatedData.maxTokens) {
|
||||
thinkingConfig.budget_tokens = Math.floor(updatedData.maxTokens * 0.9);
|
||||
}
|
||||
updatedData.additionalModelRequestFields.thinking = thinkingConfig;
|
||||
delete updatedData.additionalModelRequestFields.thinkingBudget;
|
||||
}
|
||||
return updatedData;
|
||||
}
|
||||
|
||||
export const bedrockOutputParser = (data: Record<string, unknown>) => {
|
||||
const knownKeys = [...Object.keys(s.tConversationSchema.shape), 'topK', 'top_k'];
|
||||
const result: Record<string, unknown> = {};
|
||||
let result: Record<string, unknown> = {};
|
||||
|
||||
// Extract known fields from the root level
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
@@ -125,6 +200,8 @@ export const bedrockOutputParser = (data: Record<string, unknown>) => {
|
||||
if (knownKeys.includes(key)) {
|
||||
if (key === 'top_k') {
|
||||
result['topK'] = value;
|
||||
} else if (key === 'thinking' || key === 'thinkingBudget') {
|
||||
return;
|
||||
} else {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -140,8 +217,11 @@ export const bedrockOutputParser = (data: Record<string, unknown>) => {
|
||||
result.maxTokens = result.maxOutputTokens;
|
||||
}
|
||||
|
||||
// Remove additionalModelRequestFields from the result
|
||||
delete result.additionalModelRequestFields;
|
||||
result = configureThinking(result as AnthropicInput);
|
||||
// Remove additionalModelRequestFields from the result if it doesn't thinking config
|
||||
if ((result as AnthropicInput).additionalModelRequestFields?.thinking == null) {
|
||||
delete result.additionalModelRequestFields;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -531,6 +531,7 @@ export type TStartupConfig = {
|
||||
publicSharedLinksEnabled: boolean;
|
||||
analyticsGtmId?: string;
|
||||
instanceProjectId: string;
|
||||
bundlerURL?: string;
|
||||
};
|
||||
|
||||
export const configSchema = z.object({
|
||||
@@ -811,6 +812,9 @@ export const supportsBalanceCheck = {
|
||||
};
|
||||
|
||||
export const visionModels = [
|
||||
'grok-3',
|
||||
'grok-2-vision',
|
||||
'grok-vision',
|
||||
'gpt-4.5',
|
||||
'gpt-4o',
|
||||
'gpt-4o-mini',
|
||||
@@ -1169,7 +1173,7 @@ export enum TTSProviders {
|
||||
/** Enum for app-wide constants */
|
||||
export enum Constants {
|
||||
/** Key for the app's version. */
|
||||
VERSION = 'v0.7.7-rc1',
|
||||
VERSION = 'v0.7.7',
|
||||
/** Key for the Custom Config's version (librechat.yaml). */
|
||||
CONFIG_VERSION = '1.2.1',
|
||||
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
|
||||
|
||||
@@ -3,6 +3,7 @@ import { extractEnvVariable } from './utils';
|
||||
|
||||
const BaseOptionsSchema = z.object({
|
||||
iconPath: z.string().optional(),
|
||||
timeout: z.number().optional(),
|
||||
});
|
||||
|
||||
export const StdioOptionsSchema = BaseOptionsSchema.extend({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "librechat-mcp",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"type": "module",
|
||||
"description": "MCP services for LibreChat",
|
||||
"main": "dist/index.js",
|
||||
@@ -9,15 +9,13 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.es.js",
|
||||
"require": "./dist/index.js",
|
||||
"types": "./dist/types/index.d.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"build": "npm run clean && rollup -c --silent --bundleConfigAsCjs",
|
||||
"build:watch": "rollup -c -w",
|
||||
"rollup:api": "npx rollup -c server-rollup.config.js --bundleConfigAsCjs",
|
||||
"build": "npm run clean && rollup -c --configPlugin=@rollup/plugin-typescript",
|
||||
"build:watch": "rollup -c -w --configPlugin=@rollup/plugin-typescript",
|
||||
"test": "jest --coverage --watch",
|
||||
"test:ci": "jest --coverage --ci",
|
||||
"verify": "npm run test:ci",
|
||||
@@ -48,6 +46,7 @@
|
||||
"@rollup/plugin-node-resolve": "^15.1.0",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@types/diff": "^6.0.0",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/jest": "^29.5.2",
|
||||
@@ -69,7 +68,7 @@
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.4.1",
|
||||
"@modelcontextprotocol/sdk": "^1.6.1",
|
||||
"diff": "^7.0.0",
|
||||
"eventsource": "^3.0.2",
|
||||
"express": "^4.21.2"
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
// rollup.config.js
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import pkg from './package.json';
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
|
||||
|
||||
const plugins = [
|
||||
peerDepsExternal(),
|
||||
resolve(),
|
||||
resolve({
|
||||
preferBuiltins: true,
|
||||
}),
|
||||
replace({
|
||||
__IS_DEV__: process.env.NODE_ENV === 'development',
|
||||
preventAssignment: true,
|
||||
}),
|
||||
commonjs({
|
||||
transformMixedEsModules: true,
|
||||
requireReturnsDefault: 'auto',
|
||||
}),
|
||||
commonjs(),
|
||||
typescript({
|
||||
tsconfig: './tsconfig.json',
|
||||
useTsconfigDeclarationDir: true,
|
||||
@@ -20,27 +29,17 @@ const plugins = [
|
||||
terser(),
|
||||
];
|
||||
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.ts',
|
||||
output: [
|
||||
{
|
||||
file: pkg.main,
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: pkg.module,
|
||||
format: 'esm',
|
||||
sourcemap: true,
|
||||
exports: 'named',
|
||||
},
|
||||
],
|
||||
...{
|
||||
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.devDependencies || {})],
|
||||
preserveSymlinks: true,
|
||||
plugins,
|
||||
},
|
||||
const esmBuild = {
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
file: pkg.module,
|
||||
format: 'esm',
|
||||
sourcemap: true,
|
||||
exports: 'named',
|
||||
},
|
||||
];
|
||||
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.devDependencies || {})],
|
||||
preserveSymlinks: true,
|
||||
plugins,
|
||||
};
|
||||
|
||||
export default esmBuild;
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import path from 'path';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
import json from '@rollup/plugin-json';
|
||||
|
||||
const rootPath = path.resolve(__dirname, '../../');
|
||||
const rootServerPath = path.resolve(__dirname, '../../api');
|
||||
const entryPath = path.resolve(rootPath, 'api/server/index.js');
|
||||
|
||||
console.log('entryPath', entryPath);
|
||||
|
||||
// Define custom aliases here
|
||||
const customAliases = {
|
||||
entries: [{ find: '~', replacement: rootServerPath }],
|
||||
};
|
||||
|
||||
export default {
|
||||
input: entryPath,
|
||||
output: {
|
||||
file: 'test_bundle/bundle.js',
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [
|
||||
alias(customAliases),
|
||||
resolve({
|
||||
preferBuiltins: true,
|
||||
extensions: ['.js', '.json', '.node'],
|
||||
}),
|
||||
commonjs(),
|
||||
json(),
|
||||
],
|
||||
external: (id) => {
|
||||
// More selective external function
|
||||
if (/node_modules/.test(id)) {
|
||||
return !id.startsWith('langchain/');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
@@ -43,16 +43,22 @@ export class MCPConnection extends EventEmitter {
|
||||
private isInitializing = false;
|
||||
private reconnectAttempts = 0;
|
||||
iconPath?: string;
|
||||
timeout?: number;
|
||||
|
||||
constructor(serverName: string, private readonly options: t.MCPOptions, private logger?: Logger) {
|
||||
constructor(
|
||||
serverName: string,
|
||||
private readonly options: t.MCPOptions,
|
||||
private logger?: Logger,
|
||||
) {
|
||||
super();
|
||||
this.serverName = serverName;
|
||||
this.logger = logger;
|
||||
this.iconPath = options.iconPath;
|
||||
this.timeout = options.timeout;
|
||||
this.client = new Client(
|
||||
{
|
||||
name: 'librechat-mcp-client',
|
||||
version: '1.0.0',
|
||||
version: '1.1.0',
|
||||
},
|
||||
{
|
||||
capabilities: {},
|
||||
|
||||
@@ -159,7 +159,7 @@ export class MCPManager {
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.warn(`[MCP][${serverName}] Not connected, skipping tool fetch`);
|
||||
this.logger.warn(`[MCP][${serverName}] Error fetching tools:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ export class MCPManager {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(`[MCP][${serverName}] Error fetching tools`, error);
|
||||
this.logger.error(`[MCP][${serverName}] Error fetching tools:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +209,7 @@ export class MCPManager {
|
||||
},
|
||||
},
|
||||
CallToolResultSchema,
|
||||
{ timeout: connection.timeout },
|
||||
);
|
||||
return formatToolContent(result, provider);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user