mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2026-07-21 09:35:22 -04:00
fix no-undef errors
This commit is contained in:
@@ -71,7 +71,7 @@ const EmbedConfig = {
|
||||
this.writable.includes(key)
|
||||
);
|
||||
if (validKeys.length === 0)
|
||||
return { embed: { id }, message: "No valid fields to update!" };
|
||||
return { embed: { id: embedId }, message: "No valid fields to update!" };
|
||||
|
||||
const updates = {};
|
||||
validKeys.map((key) => {
|
||||
|
||||
@@ -170,7 +170,7 @@ class AWSBedrockLLM {
|
||||
const numericLimit = Number(limit);
|
||||
if (isNaN(numericLimit) || numericLimit <= 0) {
|
||||
this.#slog(
|
||||
`[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limitSourceValue}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.`
|
||||
`[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limit}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.`
|
||||
);
|
||||
return DEFAULT_CONTEXT_WINDOW_TOKENS;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ const {
|
||||
writeResponseChunk,
|
||||
clientAbortedHandler,
|
||||
} = require("../../helpers/chat/responses");
|
||||
const { v4: uuidv4 } = require("uuid");
|
||||
const { toValidNumber } = require("../../http");
|
||||
const { getAnythingLLMUserAgent } = require("../../../endpoints/utils");
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@ const {
|
||||
LLMPerformanceMonitor,
|
||||
} = require("../../helpers/chat/LLMPerformanceMonitor");
|
||||
const { v4: uuidv4 } = require("uuid");
|
||||
const { writeResponseChunk } = require("../../helpers/chat/responses");
|
||||
const {
|
||||
writeResponseChunk,
|
||||
clientAbortedHandler,
|
||||
} = require("../../helpers/chat/responses");
|
||||
const { MODEL_MAP } = require("../modelMap");
|
||||
|
||||
class SambaNovaLLM {
|
||||
|
||||
@@ -355,7 +355,7 @@ class EphemeralAgentHandler extends AgentHandler {
|
||||
|
||||
async createAIbitat(
|
||||
args = {
|
||||
handler,
|
||||
handler: null,
|
||||
}
|
||||
) {
|
||||
this.aibitat = new AIbitat({
|
||||
|
||||
@@ -593,7 +593,7 @@ class AgentHandler {
|
||||
|
||||
async createAIbitat(
|
||||
args = {
|
||||
socket,
|
||||
socket: null,
|
||||
}
|
||||
) {
|
||||
this.aibitat = new AIbitat({
|
||||
|
||||
@@ -38,7 +38,10 @@ async function determineLogoFilepath(defaultFilename = LOGO_FILENAME) {
|
||||
const defaultFilepath = path.join(basePath, defaultFilename);
|
||||
|
||||
if (currentLogoFilename && validFilename(currentLogoFilename)) {
|
||||
customLogoPath = path.join(basePath, normalizePath(currentLogoFilename));
|
||||
const customLogoPath = path.join(
|
||||
basePath,
|
||||
normalizePath(currentLogoFilename)
|
||||
);
|
||||
if (!isWithin(path.resolve(basePath), path.resolve(customLogoPath)))
|
||||
return defaultFilepath;
|
||||
return fs.existsSync(customLogoPath) ? customLogoPath : defaultFilepath;
|
||||
|
||||
@@ -384,7 +384,7 @@ function fillSourceWindow({
|
||||
searchResults = [], // Sources from similarity search
|
||||
history = [], // Raw history
|
||||
filterIdentifiers = [], // pinned document sources
|
||||
} = config) {
|
||||
} = {}) {
|
||||
const sources = [...searchResults];
|
||||
|
||||
if (sources.length >= nDocs || history.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user