repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/web-scraping.js | server/utils/agents/aibitat/plugins/web-scraping.js | const { CollectorApi } = require("../../../collectorApi");
const Provider = require("../providers/ai-provider");
const { summarizeContent } = require("../utils/summarize");
const webScraping = {
name: "web-scraping",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/http-socket.js | server/utils/agents/aibitat/plugins/http-socket.js | const chalk = require("chalk");
const { Telemetry } = require("../../../../models/telemetry");
/**
* HTTP Interface plugin for Aibitat to emulate a websocket interface in the agent
* framework so we dont have to modify the interface for passing messages and responses
* in REST or WSS.
*/
const httpSocket = {
nam... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/memory.js | server/utils/agents/aibitat/plugins/memory.js | const { v4 } = require("uuid");
const { getVectorDbClass, getLLMProvider } = require("../../../helpers");
const { Deduplicator } = require("../utils/dedupe");
const memory = {
name: "rag-memory",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
setup(aibitat) ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/web-browsing.js | server/utils/agents/aibitat/plugins/web-browsing.js | const { SystemSettings } = require("../../../../models/systemSettings");
const { TokenManager } = require("../../../helpers/tiktoken");
const tiktoken = new TokenManager();
const webBrowsing = {
name: "web-browsing",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | true |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/summarize.js | server/utils/agents/aibitat/plugins/summarize.js | const { Document } = require("../../../../models/documents");
const { safeJsonParse } = require("../../../http");
const { summarizeContent } = require("../utils/summarize");
const Provider = require("../providers/ai-provider");
const docSummarizer = {
name: "document-summarizer",
startupConfig: {
params: {},
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/file-history.js | server/utils/agents/aibitat/plugins/file-history.js | const fs = require("fs");
const path = require("path");
/**
* Plugin to save chat history to a json file
*/
const fileHistory = {
name: "file-history-plugin",
startupConfig: {
params: {},
},
plugin: function ({
filename = `history/chat-history-${new Date().toISOString()}.json`,
} = {}) {
return... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/save-file-browser.js | server/utils/agents/aibitat/plugins/save-file-browser.js | const { Deduplicator } = require("../utils/dedupe");
const saveFileInBrowser = {
name: "save-file-to-browser",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
setup(aibitat) {
// List and summarize the contents of files that are embedded in the worksp... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/chat-history.js | server/utils/agents/aibitat/plugins/chat-history.js | const { WorkspaceChats } = require("../../../../models/workspaceChats");
/**
* Plugin to save chat history to AnythingLLM DB.
*/
const chatHistory = {
name: "chat-history",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
setup: function (aibitat) {
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/rechart.js | server/utils/agents/aibitat/plugins/rechart.js | const { safeJsonParse } = require("../../../http");
const { Deduplicator } = require("../utils/dedupe");
const rechart = {
name: "create-chart",
startupConfig: {
params: {},
},
plugin: function () {
return {
name: this.name,
setup(aibitat) {
// Scrape a website and summarize the con... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/list-table.js | server/utils/agents/aibitat/plugins/sql-agent/list-table.js | module.exports.SqlAgentListTables = {
name: "sql-list-tables",
plugin: function () {
const {
listSQLConnections,
getDBClient,
} = require("./SQLConnectors/index.js");
return {
name: "sql-list-tables",
setup(aibitat) {
aibitat.function({
super: aibitat,
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/get-table-schema.js | server/utils/agents/aibitat/plugins/sql-agent/get-table-schema.js | module.exports.SqlAgentGetTableSchema = {
name: "sql-get-table-schema",
plugin: function () {
const {
listSQLConnections,
getDBClient,
} = require("./SQLConnectors/index.js");
return {
name: "sql-get-table-schema",
setup(aibitat) {
aibitat.function({
super: aib... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/index.js | server/utils/agents/aibitat/plugins/sql-agent/index.js | const { SqlAgentGetTableSchema } = require("./get-table-schema");
const { SqlAgentListDatabase } = require("./list-database");
const { SqlAgentListTables } = require("./list-table");
const { SqlAgentQuery } = require("./query");
const sqlAgent = {
name: "sql-agent",
startupConfig: {
params: {},
},
plugin: ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/query.js | server/utils/agents/aibitat/plugins/sql-agent/query.js | module.exports.SqlAgentQuery = {
name: "sql-query",
plugin: function () {
const {
getDBClient,
listSQLConnections,
} = require("./SQLConnectors/index.js");
return {
name: "sql-query",
setup(aibitat) {
aibitat.function({
super: aibitat,
name: this.name... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/list-database.js | server/utils/agents/aibitat/plugins/sql-agent/list-database.js | module.exports.SqlAgentListDatabase = {
name: "sql-list-databases",
plugin: function () {
const { listSQLConnections } = require("./SQLConnectors");
return {
name: "sql-list-databases",
setup(aibitat) {
aibitat.function({
super: aibitat,
name: this.name,
des... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MSSQL.js | server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MSSQL.js | const mssql = require("mssql");
const { ConnectionStringParser } = require("./utils");
class MSSQLConnector {
#connected = false;
database_id = "";
connectionConfig = {
user: null,
password: null,
database: null,
server: null,
port: null,
pool: {
max: 10,
min: 0,
idleTim... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js | server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js | const { SystemSettings } = require("../../../../../../models/systemSettings");
const { safeJsonParse } = require("../../../../../http");
/**
* @typedef {('postgresql'|'mysql'|'sql-server')} SQLEngine
*/
/**
* @typedef {Object} QueryResult
* @property {[number]} rows - The query result rows
* @property {number} c... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Postgresql.js | server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Postgresql.js | const pgSql = require("pg");
class PostgresSQLConnector {
#connected = false;
constructor(
config = {
connectionString: null,
schema: null,
}
) {
this.className = "PostgresSQLConnector";
this.connectionString = config.connectionString;
this.schema = config.schema || "public";
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js | server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js | const mysql = require("mysql2/promise");
const { ConnectionStringParser } = require("./utils");
class MySQLConnector {
#connected = false;
database_id = "";
constructor(
config = {
connectionString: null,
}
) {
this.className = "MySQLConnector";
this.connectionString = config.connectionSt... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/utils.js | server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/utils.js | // Credit: https://github.com/sindilevich/connection-string-parser
/**
* @typedef {Object} ConnectionStringParserOptions
* @property {'mssql' | 'mysql' | 'postgresql' | 'db'} [scheme] - The scheme of the connection string
*/
/**
* @typedef {Object} ConnectionStringObject
* @property {string} scheme - The scheme ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/gemini.js | server/utils/agents/aibitat/providers/gemini.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const { RetryError } = require("../error.js");
const { safeJsonParse } = require("../../../http");
const { v4 } = require("uuid");
/**
* The agent provider for the Gemini provider.
* We wrap Gemini in UnTooled because its tool-calling is... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/foundry.js | server/utils/agents/aibitat/providers/foundry.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const {
parseFoundryBasePath,
FoundryLLM,
} = require("../../../AiProviders/foundry/index.js");
/**
* The agent provider for t... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/togetherai.js | server/utils/agents/aibitat/providers/togetherai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the TogetherAI provider.
*/
class TogetherAIProvider extends InheritMultiple([Provider, UnTooled]) {... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/deepseek.js | server/utils/agents/aibitat/providers/deepseek.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const { toValidNumber } = require("../../../http/index.js");
class DeepSeekProvider extends InheritMultiple([Provider, UnTooled]) {... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/genericOpenAi.js | server/utils/agents/aibitat/providers/genericOpenAi.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const { toValidNumber } = require("../../../http/index.js");
const { getAnythingLLMUserAgent } = require("../../../../endpoints/util... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/zai.js | server/utils/agents/aibitat/providers/zai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
class ZAIProvider extends InheritMultiple([Provider, UnTooled]) {
model;
constructor(config = {}) {
const { model = "glm-4... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/fireworksai.js | server/utils/agents/aibitat/providers/fireworksai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the FireworksAI provider.
* We wrap FireworksAI in UnTooled because its tool-calling may not be supp... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/ollama.js | server/utils/agents/aibitat/providers/ollama.js | const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const { OllamaAILLM } = require("../../../AiProviders/ollama");
const { Ollama } = require("ollama");
const { v4 } = require("uuid");
const { safeJsonParse } = requir... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/dellProAiStudio.js | server/utils/agents/aibitat/providers/dellProAiStudio.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const {
DellProAiStudioLLM,
} = require("../../../AiProviders/dellProAiStudio/index.js");
/**
* The agent provider for Dell Pro ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/koboldcpp.js | server/utils/agents/aibitat/providers/koboldcpp.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the KoboldCPP provider.
*/
class KoboldCPPProvider extends InheritMultiple([Provider, UnTooled]) {
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/perplexity.js | server/utils/agents/aibitat/providers/perplexity.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the Perplexity provider.
*/
class PerplexityProvider extends InheritMultiple([Provider, UnTooled]) {... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/index.js | server/utils/agents/aibitat/providers/index.js | const OpenAIProvider = require("./openai.js");
const AnthropicProvider = require("./anthropic.js");
const LMStudioProvider = require("./lmstudio.js");
const OllamaProvider = require("./ollama.js");
const GroqProvider = require("./groq.js");
const TogetherAIProvider = require("./togetherai.js");
const AzureOpenAiProvide... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/litellm.js | server/utils/agents/aibitat/providers/litellm.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for LiteLLM.
*/
class LiteLLMProvider extends InheritMultiple([Provider, UnTooled]) {
model;
constr... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/azure.js | server/utils/agents/aibitat/providers/azure.js | const { OpenAI } = require("openai");
const { AzureOpenAiLLM } = require("../../../AiProviders/azureOpenAi");
const Provider = require("./ai-provider.js");
const { RetryError } = require("../error.js");
/**
* The agent provider for the Azure OpenAI API.
*/
class AzureOpenAiProvider extends Provider {
model;
con... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/ppio.js | server/utils/agents/aibitat/providers/ppio.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the PPIO AI provider.
*/
class PPIOProvider extends InheritMultiple([Provider, UnTooled]) {
model;... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/openai.js | server/utils/agents/aibitat/providers/openai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const { RetryError } = require("../error.js");
const { v4 } = require("uuid");
const { safeJsonParse } = require("../../../http");
/**
* The agent provider for the OpenAI API.
* By default, the model is set to 'gpt-3.5-turbo'.
*/
class ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/nvidiaNim.js | server/utils/agents/aibitat/providers/nvidiaNim.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const { parseNvidiaNimBasePath } = require("../../../AiProviders/nvidiaNim");
/**
* The agent provider for the Nvidia NIM provider... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/cometapi.js | server/utils/agents/aibitat/providers/cometapi.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the CometAPI provider.
*/
class CometApiProvider extends InheritMultiple([Provider, UnTooled]) {
m... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/lmstudio.js | server/utils/agents/aibitat/providers/lmstudio.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const {
LMStudioLLM,
parseLMStudioBasePath,
} = require("../../../AiProviders/lmStudio/index.js");
/**
* The agent provider fo... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/ai-provider.js | server/utils/agents/aibitat/providers/ai-provider.js | /**
* A service that provides an AI client to create a completion.
*/
/**
* @typedef {Object} LangChainModelConfig
* @property {(string|null)} baseURL - Override the default base URL process.env for this provider
* @property {(string|null)} apiKey - Override the default process.env for this provider
* @property ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/cohere.js | server/utils/agents/aibitat/providers/cohere.js | const { CohereClient } = require("cohere-ai");
const Provider = require("./ai-provider");
const InheritMultiple = require("./helpers/classes");
const UnTooled = require("./helpers/untooled");
const { v4 } = require("uuid");
const { safeJsonParse } = require("../../../http");
class CohereProvider extends InheritMultipl... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/openrouter.js | server/utils/agents/aibitat/providers/openrouter.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the OpenRouter provider.
* @extends {Provider}
* @extends {UnTooled}
*/
class OpenRouterProvider e... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/apipie.js | server/utils/agents/aibitat/providers/apipie.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the OpenRouter provider.
*/
class ApiPieProvider extends InheritMultiple([Provider, UnTooled]) {
m... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/anthropic.js | server/utils/agents/aibitat/providers/anthropic.js | const Anthropic = require("@anthropic-ai/sdk");
const { RetryError } = require("../error.js");
const Provider = require("./ai-provider.js");
const { v4 } = require("uuid");
const { safeJsonParse } = require("../../../http");
/**
* The agent provider for the Anthropic API.
* By default, the model is set to 'claude-2'... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/giteeai.js | server/utils/agents/aibitat/providers/giteeai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
class GiteeAIProvider extends InheritMultiple([Provider, UnTooled]) {
model;
constructor(config = {}) {
super();
const... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/moonshotAi.js | server/utils/agents/aibitat/providers/moonshotAi.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
class MoonshotAiProvider extends InheritMultiple([Provider, UnTooled]) {
model;
constructor(config = {}) {
const { model =... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/bedrock.js | server/utils/agents/aibitat/providers/bedrock.js | const {
createBedrockCredentials,
getBedrockAuthMethod,
createBedrockChatClient,
} = require("../../../AiProviders/bedrock/utils.js");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
const {
HumanMessage,
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/textgenwebui.js | server/utils/agents/aibitat/providers/textgenwebui.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the Oobabooga provider.
*/
class TextWebGenUiProvider extends InheritMultiple([Provider, UnTooled]) ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/novita.js | server/utils/agents/aibitat/providers/novita.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the Novita AI provider.
*/
class NovitaProvider extends InheritMultiple([Provider, UnTooled]) {
mo... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/mistral.js | server/utils/agents/aibitat/providers/mistral.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the Mistral provider.
* Mistral limits what models can call tools and even when using those
* the m... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/localai.js | server/utils/agents/aibitat/providers/localai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the LocalAI provider.
*/
class LocalAiProvider extends InheritMultiple([Provider, UnTooled]) {
mod... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/groq.js | server/utils/agents/aibitat/providers/groq.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the GroqAI provider.
* We wrap Groq in UnTooled because its tool-calling built in is quite bad and w... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/xai.js | server/utils/agents/aibitat/providers/xai.js | const OpenAI = require("openai");
const Provider = require("./ai-provider.js");
const InheritMultiple = require("./helpers/classes.js");
const UnTooled = require("./helpers/untooled.js");
/**
* The agent provider for the xAI provider.
*/
class XAIProvider extends InheritMultiple([Provider, UnTooled]) {
model;
c... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/helpers/classes.js | server/utils/agents/aibitat/providers/helpers/classes.js | function InheritMultiple(bases = []) {
class Bases {
constructor() {
bases.forEach((base) => Object.assign(this, new base()));
}
}
bases.forEach((base) => {
Object.getOwnPropertyNames(base.prototype)
.filter((prop) => prop != "constructor")
.forEach((prop) => (Bases.prototype[prop] ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/providers/helpers/untooled.js | server/utils/agents/aibitat/providers/helpers/untooled.js | const { safeJsonParse } = require("../../../../http");
const { Deduplicator } = require("../../utils/dedupe");
const { v4 } = require("uuid");
// Useful inheritance class for a model which supports OpenAi schema for API requests
// but does not have tool-calling or JSON output support.
class UnTooled {
constructor()... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/example/blog-post-coding.js | server/utils/agents/aibitat/example/blog-post-coding.js | const AIbitat = require("../index.js");
const {
cli,
webBrowsing,
fileHistory,
webScraping,
} = require("../plugins/index.js");
require("dotenv").config({ path: `../../../../.env.development` });
const aibitat = new AIbitat({
model: "gpt-4o",
})
.use(cli.plugin())
.use(fileHistory.plugin())
.use(webBro... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/example/beginner-chat.js | server/utils/agents/aibitat/example/beginner-chat.js | // You must execute this example from within the example folder.
const AIbitat = require("../index.js");
const { cli } = require("../plugins/cli.js");
const { NodeHtmlMarkdown } = require("node-html-markdown");
require("dotenv").config({ path: `../../../../.env.development` });
const Agent = {
HUMAN: "🧑",
AI: "🤖... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js | server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js | // You can only run this example from within the websocket/ directory.
// NODE_ENV=development node websock-multi-turn-chat.js
// Scraping is enabled, but search requires AGENT_GSE_* keys.
const express = require("express");
const chalk = require("chalk");
const AIbitat = require("../../index.js");
const {
websocket... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agents/aibitat/example/websocket/websock-branding-collab.js | server/utils/agents/aibitat/example/websocket/websock-branding-collab.js | // You can only run this example from within the websocket/ directory.
// NODE_ENV=development node websock-branding-collab.js
// Scraping is enabled, but search requires AGENT_GSE_* keys.
const express = require("express");
const chalk = require("chalk");
const AIbitat = require("../../index.js");
const {
websocket... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/validWorkspace.js | server/utils/middleware/validWorkspace.js | const { Workspace } = require("../../models/workspace");
const { WorkspaceThread } = require("../../models/workspaceThread");
const { userFromSession, multiUserMode } = require("../http");
// Will pre-validate and set the workspace for a request if the slug is provided in the URL path.
async function validWorkspaceSlu... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/isSupportedRepoProviders.js | server/utils/middleware/isSupportedRepoProviders.js | // Middleware to validate that a repo provider URL is supported.
const REPO_PLATFORMS = ["github", "gitlab"];
function isSupportedRepoProvider(request, response, next) {
const { repo_platform = null } = request.params;
if (!repo_platform || !REPO_PLATFORMS.includes(repo_platform))
return response
.status... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/communityHubDownloadsEnabled.js | server/utils/middleware/communityHubDownloadsEnabled.js | const { CommunityHub } = require("../../models/communityHub");
const { reqBody } = require("../http");
/**
* ### Must be called after `communityHubItem`
* Checks if community hub bundle downloads are enabled. The reason this functionality is disabled
* by default is that since AgentSkills, Workspaces, and DataConne... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/featureFlagEnabled.js | server/utils/middleware/featureFlagEnabled.js | const { SystemSettings } = require("../../models/systemSettings");
// Explicitly check that a specific feature flag is enabled.
// This should match the key in the SystemSetting label.
function featureFlagEnabled(featureFlagKey = null) {
return async (_, response, next) => {
if (!featureFlagKey) return response.... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/validApiKey.js | server/utils/middleware/validApiKey.js | const { ApiKey } = require("../../models/apiKeys");
const { SystemSettings } = require("../../models/systemSettings");
async function validApiKey(request, response, next) {
const multiUserMode = await SystemSettings.isMultiUserMode();
response.locals.multiUserMode = multiUserMode;
const auth = request.header("A... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/chatHistoryViewable.js | server/utils/middleware/chatHistoryViewable.js | /**
* A simple middleware that validates that the chat history is viewable.
* via the `DISABLE_VIEW_CHAT_HISTORY` environment variable being set AT ALL.
* @param {Request} request - The request object.
* @param {Response} response - The response object.
* @param {NextFunction} next - The next function.
*/
functio... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/embedMiddleware.js | server/utils/middleware/embedMiddleware.js | const { v4: uuidv4, validate } = require("uuid");
const { VALID_CHAT_MODE } = require("../chats/stream");
const { EmbedChats } = require("../../models/embedChats");
const { EmbedConfig } = require("../../models/embedConfig");
const { reqBody } = require("../http");
// Finds or Aborts request for a /:embedId/ url. This... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/simpleSSOEnabled.js | server/utils/middleware/simpleSSOEnabled.js | const { SystemSettings } = require("../../models/systemSettings");
/**
* Checks if simple SSO is enabled for issuance of temporary auth tokens.
* Note: This middleware must be called after `validApiKey`.
* @param {import("express").Request} request
* @param {import("express").Response} response
* @param {import("... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/validatedRequest.js | server/utils/middleware/validatedRequest.js | const { SystemSettings } = require("../../models/systemSettings");
const { User } = require("../../models/user");
const { EncryptionManager } = require("../EncryptionManager");
const { decodeJWT } = require("../http");
const EncryptionMgr = new EncryptionManager();
async function validatedRequest(request, response, ne... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/multiUserProtected.js | server/utils/middleware/multiUserProtected.js | const { SystemSettings } = require("../../models/systemSettings");
const { userFromSession } = require("../http");
const ROLES = {
all: "<all>",
admin: "admin",
manager: "manager",
default: "default",
};
const DEFAULT_ROLES = [ROLES.admin, ROLES.admin];
/**
* Explicitly check that multi user mode is enabled a... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/middleware/validBrowserExtensionApiKey.js | server/utils/middleware/validBrowserExtensionApiKey.js | const {
BrowserExtensionApiKey,
} = require("../../models/browserExtensionApiKey");
const { SystemSettings } = require("../../models/systemSettings");
const { User } = require("../../models/user");
async function validBrowserExtensionApiKey(request, response, next) {
const multiUserMode = await SystemSettings.isMu... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/index.js | server/utils/agentFlows/index.js | const fs = require("fs");
const path = require("path");
const { v4: uuidv4 } = require("uuid");
const { FlowExecutor, FLOW_TYPES } = require("./executor");
const { normalizePath } = require("../files");
const { safeJsonParse } = require("../http");
/**
* @typedef {Object} LoadedFlow
* @property {string} name - The n... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/executor.js | server/utils/agentFlows/executor.js | const { FLOW_TYPES } = require("./flowTypes");
const executeApiCall = require("./executors/api-call");
const executeLLMInstruction = require("./executors/llm-instruction");
const executeWebScraping = require("./executors/web-scraping");
const { Telemetry } = require("../../models/telemetry");
const { safeJsonParse } = ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/flowTypes.js | server/utils/agentFlows/flowTypes.js | const FLOW_TYPES = {
START: {
type: "start",
description: "Initialize flow variables",
parameters: {
variables: {
type: "array",
description: "List of variables to initialize",
},
},
},
API_CALL: {
type: "apiCall",
description: "Make an HTTP request to an API en... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/executors/llm-instruction.js | server/utils/agentFlows/executors/llm-instruction.js | /**
* Execute an LLM instruction flow step
* @param {Object} config Flow step configuration
* @param {{introspect: Function, logger: Function}} context Execution context with introspect function
* @returns {Promise<string>} Processed result
*/
async function executeLLMInstruction(config, context) {
const { instr... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/executors/web-scraping.js | server/utils/agentFlows/executors/web-scraping.js | /**
* Execute a web scraping flow step
* @param {Object} config Flow step configuration
* @param {Object} context Execution context with introspect function
* @returns {Promise<string>} Scraped content
*/
async function executeWebScraping(config, context) {
const { CollectorApi } = require("../../collectorApi");... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/agentFlows/executors/api-call.js | server/utils/agentFlows/executors/api-call.js | const { safeJsonParse } = require("../../http");
/**
* Execute an API call flow step
* @param {Object} config Flow step configuration
* @param {Object} context Execution context with introspect function
* @returns {Promise<string>} Response data
*/
async function executeApiCall(config, context) {
const { url, m... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorStore/resetAllVectorStores.js | server/utils/vectorStore/resetAllVectorStores.js | const { Workspace } = require("../../models/workspace");
const { Document } = require("../../models/documents");
const { DocumentVectors } = require("../../models/vectors");
const { EventLogs } = require("../../models/eventLogs");
const { purgeEntireVectorCache } = require("../files");
const { getVectorDbClass } = requ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/DocumentManager/index.js | server/utils/DocumentManager/index.js | const fs = require("fs");
const path = require("path");
const documentsPath =
process.env.NODE_ENV === "development"
? path.resolve(__dirname, `../../storage/documents`)
: path.resolve(process.env.STORAGE_DIR, `documents`);
class DocumentManager {
constructor({ workspace = null, maxTokens = null }) {
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/EncryptionManager/index.js | server/utils/EncryptionManager/index.js | const crypto = require("crypto");
const { dumpENV } = require("../helpers/updateENV");
// Class that is used to arbitrarily encrypt/decrypt string data via a persistent passphrase/salt that
// is either user defined or is created and saved to the ENV on creation.
class EncryptionManager {
#keyENV = "SIG_KEY";
#sal... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/weaviate/index.js | server/utils/vectorDbProviders/weaviate/index.js | const { default: weaviate } = require("weaviate-ts-client");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { toChun... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/pgvector/index.js | server/utils/vectorDbProviders/pgvector/index.js | const pgsql = require("pg");
const { toChunks, getEmbeddingEngineSelection } = require("../../helpers");
const { TextSplitter } = require("../../TextSplitter");
const { v4: uuidv4 } = require("uuid");
const { sourceIdentifier } = require("../../chats");
/*
Embedding Table Schema (table name defined by user)
- id: UU... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/astra/index.js | server/utils/vectorDbProviders/astra/index.js | const { AstraDB: AstraClient } = require("@datastax/astra-db-ts");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { ... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/pinecone/index.js | server/utils/vectorDbProviders/pinecone/index.js | const { Pinecone } = require("@pinecone-database/pinecone");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { toChun... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/lance/index.js | server/utils/vectorDbProviders/lance/index.js | const lancedb = require("@lancedb/lancedb");
const { toChunks, getEmbeddingEngineSelection } = require("../../helpers");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../fil... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/zilliz/index.js | server/utils/vectorDbProviders/zilliz/index.js | const {
DataType,
MetricType,
IndexType,
MilvusClient,
} = require("@zilliz/milvus2-sdk-node");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { v4: uuidv4 } = require("uuid");
const { storeVectorResult, cachedVectorInformation... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/chromacloud/index.js | server/utils/vectorDbProviders/chromacloud/index.js | const { CloudClient } = require("chromadb");
const { Chroma } = require("../chroma");
const { toChunks } = require("../../helpers");
/**
* ChromaCloud works nearly the same as Chroma so we can just extend the
* Chroma class and override the connect method to use the CloudClient for major differences in API functiona... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/chroma/index.js | server/utils/vectorDbProviders/chroma/index.js | const { ChromaClient } = require("chromadb");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { toChunks, getEmbeddin... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/qdrant/index.js | server/utils/vectorDbProviders/qdrant/index.js | const { QdrantClient } = require("@qdrant/js-client-rest");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { storeVectorResult, cachedVectorInformation } = require("../../files");
const { v4: uuidv4 } = require("uuid");
const { toChunk... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/vectorDbProviders/milvus/index.js | server/utils/vectorDbProviders/milvus/index.js | const {
DataType,
MetricType,
IndexType,
MilvusClient,
} = require("@zilliz/milvus2-sdk-node");
const { TextSplitter } = require("../../TextSplitter");
const { SystemSettings } = require("../../../models/systemSettings");
const { v4: uuidv4 } = require("uuid");
const { storeVectorResult, cachedVectorInformation... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/comKey/index.js | server/utils/comKey/index.js | const crypto = require("crypto");
const fs = require("fs");
const path = require("path");
const keyPath =
process.env.NODE_ENV === "development"
? path.resolve(__dirname, `../../storage/comkey`)
: path.resolve(
process.env.STORAGE_DIR ?? path.resolve(__dirname, `../../storage`),
`comkey`
... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/agents.js | server/utils/chats/agents.js | const pluralize = require("pluralize");
const {
WorkspaceAgentInvocation,
} = require("../../models/workspaceAgentInvocation");
const { writeResponseChunk } = require("../helpers/chat/responses");
async function grepAgents({
uuid,
response,
message,
workspace,
user = null,
thread = null,
}) {
const age... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/openaiCompatible.js | server/utils/chats/openaiCompatible.js | const { v4: uuidv4 } = require("uuid");
const { DocumentManager } = require("../DocumentManager");
const { WorkspaceChats } = require("../../models/workspaceChats");
const { getVectorDbClass, getLLMProvider } = require("../helpers");
const { writeResponseChunk } = require("../helpers/chat/responses");
const { chatPromp... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/index.js | server/utils/chats/index.js | const { v4: uuidv4 } = require("uuid");
const { WorkspaceChats } = require("../../models/workspaceChats");
const { resetMemory } = require("./commands/reset");
const { convertToPromptHistory } = require("../helpers/chat/responses");
const { SlashCommandPresets } = require("../../models/slashCommandsPresets");
const { S... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/apiChatHandler.js | server/utils/chats/apiChatHandler.js | const { v4: uuidv4 } = require("uuid");
const { DocumentManager } = require("../DocumentManager");
const { WorkspaceChats } = require("../../models/workspaceChats");
const { getVectorDbClass, getLLMProvider } = require("../helpers");
const { writeResponseChunk } = require("../helpers/chat/responses");
const {
chatPro... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/stream.js | server/utils/chats/stream.js | const { v4: uuidv4 } = require("uuid");
const { DocumentManager } = require("../DocumentManager");
const { WorkspaceChats } = require("../../models/workspaceChats");
const { WorkspaceParsedFiles } = require("../../models/workspaceParsedFiles");
const { getVectorDbClass, getLLMProvider } = require("../helpers");
const {... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/embed.js | server/utils/chats/embed.js | const { v4: uuidv4 } = require("uuid");
const { getVectorDbClass, getLLMProvider } = require("../helpers");
const { chatPrompt, sourceIdentifier } = require("./index");
const { EmbedChats } = require("../../models/embedChats");
const {
convertToPromptHistory,
writeResponseChunk,
} = require("../helpers/chat/respons... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/chats/commands/reset.js | server/utils/chats/commands/reset.js | const { WorkspaceChats } = require("../../../models/workspaceChats");
async function resetMemory(
workspace,
_message,
msgUUID,
user = null,
thread = null
) {
// If thread is present we are wanting to reset this specific thread. Not the whole workspace.
thread
? await WorkspaceChats.markThreadHistory... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/files/index.js | server/utils/files/index.js | const fs = require("fs");
const path = require("path");
const { v5: uuidv5 } = require("uuid");
const { Document } = require("../../models/documents");
const { DocumentSyncQueue } = require("../../models/documentSyncQueue");
const documentsPath =
process.env.NODE_ENV === "development"
? path.resolve(__dirname, `.... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/files/logo.js | server/utils/files/logo.js | const path = require("path");
const fs = require("fs");
const { getType } = require("mime");
const { v4 } = require("uuid");
const { SystemSettings } = require("../../models/systemSettings");
const { normalizePath, isWithin } = require(".");
const LOGO_FILENAME = "anything-llm.png";
const LOGO_FILENAME_DARK = "anything... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/files/purgeDocument.js | server/utils/files/purgeDocument.js | const fs = require("fs");
const path = require("path");
const {
purgeVectorCache,
purgeSourceDocument,
normalizePath,
isWithin,
documentsPath,
} = require(".");
const { Document } = require("../../models/documents");
const { Workspace } = require("../../models/workspace");
async function purgeDocument(filena... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Mintplex-Labs/anything-llm | https://github.com/Mintplex-Labs/anything-llm/blob/e287fab56089cf8fcea9ba579a3ecdeca0daa313/server/utils/files/pfp.js | server/utils/files/pfp.js | const path = require("path");
const fs = require("fs");
const { getType } = require("mime");
const { User } = require("../../models/user");
const { normalizePath, isWithin } = require(".");
const { Workspace } = require("../../models/workspace");
function fetchPfp(pfpPath) {
if (!fs.existsSync(pfpPath)) {
return... | javascript | MIT | e287fab56089cf8fcea9ba579a3ecdeca0daa313 | 2026-01-04T14:57:11.963777Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.