Refactor Managed Services in "Data Handling & Privacy" Onboarding Step to Use Their Privacy Policy URL (#4790)

* Refactor non-local LLM Provider, Vector Database, and Embedding Engine privacy information to use their policy URLs instead of descriptions

* Update LLM Provider, Embedding Engine, and Vector Database sections to include privacy policy links

* fix broken links, lint

* Update AstraDB privacy policy URL in onboarding flow

* Refactor AnythingLLM Privacy & Data page to show managed provider privacy policy URLs

* Update Mistral privacy policy URLs in onboarding flow for consistency

* Abstract privacy policies of providers into a reusable component | Refactor Privacy & Data Handling Step of onboarding flow to focus on solely rendering that step | Move provider privacy policy maps into constants.js

* Remove commented-out code for third-party provider privacy policies in Privacy and Data Handling component

* Update privacy policy descriptions for consistency by adding periods at the end of sentences in ProviderPrivacy component and constants.js

* rescope constants for providers

* extract default to external function, add loading state

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
This commit is contained in:
Marcello Fitton
2025-12-18 15:09:34 -08:00
committed by GitHub
parent 6c1f8a38ce
commit 4300639087
5 changed files with 502 additions and 668 deletions

View File

@@ -0,0 +1,376 @@
import AnythingLLMIcon from "@/media/logo/anything-llm-icon.png";
import OpenAiLogo from "@/media/llmprovider/openai.png";
import GenericOpenAiLogo from "@/media/llmprovider/generic-openai.png";
import AzureOpenAiLogo from "@/media/llmprovider/azure.png";
import AnthropicLogo from "@/media/llmprovider/anthropic.png";
import GeminiLogo from "@/media/llmprovider/gemini.png";
import OllamaLogo from "@/media/llmprovider/ollama.png";
import TogetherAILogo from "@/media/llmprovider/togetherai.png";
import FireworksAILogo from "@/media/llmprovider/fireworksai.jpeg";
import NvidiaNimLogo from "@/media/llmprovider/nvidia-nim.png";
import LMStudioLogo from "@/media/llmprovider/lmstudio.png";
import LocalAiLogo from "@/media/llmprovider/localai.png";
import MistralLogo from "@/media/llmprovider/mistral.jpeg";
import HuggingFaceLogo from "@/media/llmprovider/huggingface.png";
import PerplexityLogo from "@/media/llmprovider/perplexity.png";
import OpenRouterLogo from "@/media/llmprovider/openrouter.jpeg";
import NovitaLogo from "@/media/llmprovider/novita.png";
import GroqLogo from "@/media/llmprovider/groq.png";
import KoboldCPPLogo from "@/media/llmprovider/koboldcpp.png";
import TextGenWebUILogo from "@/media/llmprovider/text-generation-webui.png";
import LiteLLMLogo from "@/media/llmprovider/litellm.png";
import AWSBedrockLogo from "@/media/llmprovider/bedrock.png";
import DeepSeekLogo from "@/media/llmprovider/deepseek.png";
import APIPieLogo from "@/media/llmprovider/apipie.png";
import XAILogo from "@/media/llmprovider/xai.png";
import ZAiLogo from "@/media/llmprovider/zai.png";
import CohereLogo from "@/media/llmprovider/cohere.png";
import ZillizLogo from "@/media/vectordbs/zilliz.png";
import AstraDBLogo from "@/media/vectordbs/astraDB.png";
import ChromaLogo from "@/media/vectordbs/chroma.png";
import PineconeLogo from "@/media/vectordbs/pinecone.png";
import LanceDbLogo from "@/media/vectordbs/lancedb.png";
import WeaviateLogo from "@/media/vectordbs/weaviate.png";
import QDrantLogo from "@/media/vectordbs/qdrant.png";
import MilvusLogo from "@/media/vectordbs/milvus.png";
import VoyageAiLogo from "@/media/embeddingprovider/voyageai.png";
import PPIOLogo from "@/media/llmprovider/ppio.png";
import PGVectorLogo from "@/media/vectordbs/pgvector.png";
import DPAISLogo from "@/media/llmprovider/dpais.png";
import MoonshotAiLogo from "@/media/llmprovider/moonshotai.png";
import CometApiLogo from "@/media/llmprovider/cometapi.png";
import FoundryLogo from "@/media/llmprovider/foundry-local.png";
import GiteeAILogo from "@/media/llmprovider/giteeai.png";
const LLM_PROVIDER_PRIVACY_MAP = {
openai: {
name: "OpenAI",
policyUrl: "https://openai.com/policies/privacy-policy/",
logo: OpenAiLogo,
},
azure: {
name: "Azure OpenAI",
policyUrl: "https://privacy.microsoft.com/privacystatement",
logo: AzureOpenAiLogo,
},
anthropic: {
name: "Anthropic",
policyUrl: "https://www.anthropic.com/privacy",
logo: AnthropicLogo,
},
gemini: {
name: "Google Gemini",
policyUrl: "https://policies.google.com/privacy",
logo: GeminiLogo,
},
"nvidia-nim": {
name: "NVIDIA NIM",
description: [
"Your model and chats are only accessible on the machine running the NVIDIA NIM.",
],
logo: NvidiaNimLogo,
},
lmstudio: {
name: "LMStudio",
description: [
"Your model and chats are only accessible on the server running LMStudio.",
],
logo: LMStudioLogo,
},
localai: {
name: "LocalAI",
description: [
"Your model and chats are only accessible on the server running LocalAI.",
],
logo: LocalAiLogo,
},
ollama: {
name: "Ollama",
description: [
"Your model and chats are only accessible on the machine running Ollama models.",
],
logo: OllamaLogo,
},
togetherai: {
name: "TogetherAI",
policyUrl: "https://www.together.ai/privacy",
logo: TogetherAILogo,
},
fireworksai: {
name: "FireworksAI",
policyUrl: "https://fireworks.ai/privacy-policy",
logo: FireworksAILogo,
},
mistral: {
name: "Mistral",
policyUrl: "https://legal.mistral.ai/terms/privacy-policy",
logo: MistralLogo,
},
huggingface: {
name: "HuggingFace",
policyUrl: "https://huggingface.co/privacy",
logo: HuggingFaceLogo,
},
perplexity: {
name: "Perplexity AI",
policyUrl: "https://www.perplexity.ai/privacy",
logo: PerplexityLogo,
},
openrouter: {
name: "OpenRouter",
policyUrl: "https://openrouter.ai/privacy",
logo: OpenRouterLogo,
},
novita: {
name: "Novita AI",
policyUrl: "https://novita.ai/legal/privacy-policy",
logo: NovitaLogo,
},
groq: {
name: "Groq",
policyUrl: "https://groq.com/privacy-policy/",
logo: GroqLogo,
},
koboldcpp: {
name: "KoboldCPP",
description: [
"Your model and chats are only accessible on the server running KoboldCPP",
],
logo: KoboldCPPLogo,
},
textgenwebui: {
name: "Oobabooga Web UI",
description: [
"Your model and chats are only accessible on the server running the Oobabooga Text Generation Web UI",
],
logo: TextGenWebUILogo,
},
"generic-openai": {
name: "Generic OpenAI compatible service",
description: [
"Data is shared according to the terms of service applicable with your generic endpoint provider.",
],
logo: GenericOpenAiLogo,
},
cohere: {
name: "Cohere",
policyUrl: "https://cohere.com/privacy",
logo: CohereLogo,
},
litellm: {
name: "LiteLLM",
description: [
"Your model and chats are only accessible on the server running LiteLLM",
],
logo: LiteLLMLogo,
},
bedrock: {
name: "AWS Bedrock",
policyUrl: "https://aws.amazon.com/bedrock/security-compliance/",
logo: AWSBedrockLogo,
},
deepseek: {
name: "DeepSeek",
policyUrl:
"https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html",
logo: DeepSeekLogo,
},
apipie: {
name: "APIpie.AI",
policyUrl: "https://apipie.ai/docs/Terms/privacy",
logo: APIPieLogo,
},
xai: {
name: "xAI",
policyUrl: "https://x.ai/legal/privacy-policy",
logo: XAILogo,
},
zai: {
name: "Z.AI",
policyUrl: "https://docs.z.ai/legal-agreement/privacy-policy",
logo: ZAiLogo,
},
ppio: {
name: "PPIO",
policyUrl: "https://www.pipio.ai/privacy-policy",
logo: PPIOLogo,
},
dpais: {
name: "Dell Pro AI Studio",
description: [
"Your model and chat contents are only accessible on the computer running Dell Pro AI Studio.",
],
logo: DPAISLogo,
},
moonshotai: {
name: "Moonshot AI",
policyUrl: "https://platform.moonshot.ai/docs/agreement/userprivacy",
logo: MoonshotAiLogo,
},
cometapi: {
name: "CometAPI",
policyUrl: "https://apidoc.cometapi.com/privacy-policy-873819m0",
logo: CometApiLogo,
},
foundry: {
name: "Microsoft Foundry Local",
description: [
"Your model and chats are only accessible on the machine running Foundry Local.",
],
logo: FoundryLogo,
},
giteeai: {
name: "GiteeAI",
policyUrl: "https://ai.gitee.com/docs/appendix/privacy",
logo: GiteeAILogo,
},
};
const VECTOR_DB_PROVIDER_PRIVACY_MAP = {
pgvector: {
name: "PGVector",
description: [
"Your vectors and document text are stored on your PostgreSQL instance.",
"Access to your instance is managed by you.",
],
logo: PGVectorLogo,
},
chroma: {
name: "Chroma",
description: [
"Your vectors and document text are stored on your Chroma instance.",
"Access to your instance is managed by you.",
],
logo: ChromaLogo,
},
chromacloud: {
name: "Chroma Cloud",
policyUrl: "https://www.trychroma.com/privacy",
logo: ChromaLogo,
},
pinecone: {
name: "Pinecone",
policyUrl: "https://www.pinecone.io/privacy/",
logo: PineconeLogo,
},
qdrant: {
name: "Qdrant",
policyUrl: "https://qdrant.tech/legal/privacy-policy/",
logo: QDrantLogo,
},
weaviate: {
name: "Weaviate",
policyUrl: "https://weaviate.io/privacy",
logo: WeaviateLogo,
},
milvus: {
name: "Milvus",
description: [
"Your vectors and document text are stored on your Milvus instance (cloud or self-hosted).",
],
logo: MilvusLogo,
},
zilliz: {
name: "Zilliz Cloud",
policyUrl: "https://zilliz.com/privacy-policy",
logo: ZillizLogo,
},
astra: {
name: "AstraDB",
policyUrl: "https://www.ibm.com/us-en/privacy",
logo: AstraDBLogo,
},
lancedb: {
name: "LanceDB",
description: [
"Your vectors and document text are stored privately on this instance of AnythingLLM.",
],
logo: LanceDbLogo,
},
};
const EMBEDDING_ENGINE_PROVIDER_PRIVACY_MAP = {
native: {
name: "AnythingLLM Embedder",
description: [
"Your document text is embedded privately on this instance of AnythingLLM.",
],
logo: AnythingLLMIcon,
},
openai: {
name: "OpenAI",
policyUrl: "https://openai.com/policies/privacy-policy/",
logo: OpenAiLogo,
},
azure: {
name: "Azure OpenAI",
policyUrl: "https://privacy.microsoft.com/privacystatement",
logo: AzureOpenAiLogo,
},
localai: {
name: "LocalAI",
description: [
"Your document text is embedded privately on the server running LocalAI.",
],
logo: LocalAiLogo,
},
ollama: {
name: "Ollama",
description: [
"Your document text is embedded privately on the server running Ollama.",
],
logo: OllamaLogo,
},
lmstudio: {
name: "LMStudio",
description: [
"Your document text is embedded privately on the server running LMStudio.",
],
logo: LMStudioLogo,
},
openrouter: {
name: "OpenRouter",
policyUrl: "https://openrouter.ai/privacy",
logo: OpenRouterLogo,
},
cohere: {
name: "Cohere",
policyUrl: "https://cohere.com/privacy",
logo: CohereLogo,
},
voyageai: {
name: "Voyage AI",
policyUrl: "https://www.voyageai.com/privacy",
logo: VoyageAiLogo,
},
mistral: {
name: "Mistral AI",
policyUrl: "https://legal.mistral.ai/terms/privacy-policy",
logo: MistralLogo,
},
litellm: {
name: "LiteLLM",
description: [
"Your document text is only accessible on the server running LiteLLM and to the providers you configured in LiteLLM.",
],
logo: LiteLLMLogo,
},
"generic-openai": {
name: "Generic OpenAI compatible service",
description: [
"Data is shared according to the terms of service applicable with your generic endpoint provider.",
],
logo: GenericOpenAiLogo,
},
gemini: {
name: "Google Gemini",
policyUrl: "https://policies.google.com/privacy",
logo: GeminiLogo,
},
};
export const PROVIDER_PRIVACY_MAP = {
llm: LLM_PROVIDER_PRIVACY_MAP,
embeddingEngine: EMBEDDING_ENGINE_PROVIDER_PRIVACY_MAP,
vectorDb: VECTOR_DB_PROVIDER_PRIVACY_MAP,
};

View File

@@ -0,0 +1,119 @@
import { useState, useEffect } from "react";
import System from "@/models/system";
import { PROVIDER_PRIVACY_MAP } from "./constants";
import { ArrowSquareOut } from "@phosphor-icons/react";
import AnythingLLMIcon from "@/media/logo/anything-llm-icon.png";
import { Link } from "react-router-dom";
import { titleCase, sentenceCase } from "text-case";
function defaultProvider(providerString) {
return {
name: providerString
? titleCase(sentenceCase(String(providerString)))
: "Unknown",
description: [
`"${providerString}" has no known data handling policy defined in AnythingLLM.`,
],
logo: AnythingLLMIcon,
};
}
export default function ProviderPrivacy() {
const [loading, setLoading] = useState(true);
const [providers, setProviders] = useState({
llmProvider: null,
embeddingEngine: null,
vectorDb: null,
});
useEffect(() => {
async function fetchProviders() {
const _settings = await System.keys();
const providerDefinition =
PROVIDER_PRIVACY_MAP.llm[_settings?.LLMProvider] ||
defaultProvider(_settings?.LLMProvider);
const embeddingEngineDefinition =
PROVIDER_PRIVACY_MAP.embeddingEngine[_settings?.EmbeddingEngine] ||
defaultProvider(_settings?.EmbeddingEngine);
const vectorDbDefinition =
PROVIDER_PRIVACY_MAP.vectorDb[_settings?.VectorDB] ||
defaultProvider(_settings?.VectorDB);
setProviders({
llmProvider: providerDefinition,
embeddingEngine: embeddingEngineDefinition,
vectorDb: vectorDbDefinition,
});
setLoading(false);
}
fetchProviders();
}, []);
if (loading) return null;
return (
<div className="flex flex-col gap-8 w-full max-w-2xl">
<ProviderPrivacyItem
title="LLM Provider"
provider={providers.llmProvider}
altText="LLM Logo"
/>
<ProviderPrivacyItem
title="Embedding Preference"
provider={providers.embeddingEngine}
altText="Embedding Logo"
/>
<ProviderPrivacyItem
title="Vector Database"
provider={providers.vectorDb}
altText="Vector DB Logo"
/>
</div>
);
}
function ProviderPrivacyItem({ title, provider, altText }) {
return (
<div className="flex flex-col items-start gap-y-3 pb-4 border-b border-theme-sidebar-border">
<div className="text-theme-text-primary text-base font-bold">{title}</div>
<div className="flex items-start gap-3">
<img
src={provider.logo}
alt={altText}
className="w-8 h-8 rounded flex-shrink-0 mt-0.5"
/>
<div className="flex flex-col gap-2 flex-1">
<div className="flex items-center gap-2 flex-wrap">
<span className="text-theme-text-primary text-sm font-semibold">
{provider.name}
</span>
</div>
{provider.policyUrl ? (
<div className="text-theme-text-secondary text-sm">
Your usage, chats, and data are subject to the service&apos;s{" "}
<Link
className="text-theme-text-secondary hover:text-theme-text-primary text-sm font-medium underline transition-colors inline-flex items-center gap-1"
to={provider.policyUrl}
target="_blank"
rel="noopener noreferrer"
>
privacy policy
<ArrowSquareOut size={12} />
</Link>
.
</div>
) : (
provider.description && (
<ul className="flex flex-col list-none gap-1">
{provider.description.map((desc, idx) => (
<li key={idx} className="text-theme-text-secondary text-sm">
{desc}
</li>
))}
</ul>
)
)}
</div>
</div>
</div>
);
}

View File

@@ -715,7 +715,7 @@ const TRANSLATIONS = {
title: "Privacy & Data-Handling",
description:
"This is your configuration for how connected third party providers and AnythingLLM handle your data.",
llm: "LLM Selection",
llm: "LLM Provider",
embedding: "Embedding Preference",
vector: "Vector Database",
anonymous: "Anonymous Telemetry Enabled",

View File

@@ -4,13 +4,8 @@ import { isMobile } from "react-device-detect";
import showToast from "@/utils/toast";
import System from "@/models/system";
import PreLoader from "@/components/Preloader";
import {
EMBEDDING_ENGINE_PRIVACY,
LLM_SELECTION_PRIVACY,
VECTOR_DB_PRIVACY,
FALLBACKS,
} from "@/pages/OnboardingFlow/Steps/DataHandling";
import { useTranslation } from "react-i18next";
import ProviderPrivacy from "@/components/ProviderPrivacy";
export default function PrivacyAndDataHandling() {
const [settings, setSettings] = useState({});
@@ -51,8 +46,8 @@ export default function PrivacyAndDataHandling() {
</div>
</div>
) : (
<div className="overflow-x-auto">
<ThirdParty settings={settings} />
<div className="overflow-x-auto flex flex-col gap-y-6 pt-6">
<ProviderPrivacy />
<TelemetryLogs settings={settings} />
</div>
)}
@@ -62,88 +57,6 @@ export default function PrivacyAndDataHandling() {
);
}
function ThirdParty({ settings }) {
const llmChoice = settings?.LLMProvider || "openai";
const embeddingEngine = settings?.EmbeddingEngine || "openai";
const vectorDb = settings?.VectorDB || "lancedb";
const { t } = useTranslation();
const LLMSelection =
LLM_SELECTION_PRIVACY?.[llmChoice] || FALLBACKS.LLM(llmChoice);
const EmbeddingEngine =
EMBEDDING_ENGINE_PRIVACY?.[embeddingEngine] ||
FALLBACKS.EMBEDDING(embeddingEngine);
const VectorDb = VECTOR_DB_PRIVACY?.[vectorDb] || FALLBACKS.VECTOR(vectorDb);
return (
<div className="py-8 w-full flex items-start justify-center flex-col gap-y-6 border-b-2 border-theme-sidebar-border">
<div className="flex flex-col gap-8">
<div className="flex flex-col gap-y-2 border-b border-zinc-500/50 pb-4">
<div className="text-theme-text-primary text-base font-bold">
{t("privacy.llm")}
</div>
<div className="flex items-center gap-2.5">
<img
src={LLMSelection.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{LLMSelection.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{LLMSelection.description.map((desc) => (
<li className="text-theme-text-secondary text-sm">{desc}</li>
))}
</ul>
</div>
<div className="flex flex-col gap-y-2 border-b border-zinc-500/50 pb-4">
<div className="text-theme-text-primary text-base font-bold">
{t("privacy.embedding")}
</div>
<div className="flex items-center gap-2.5">
<img
src={EmbeddingEngine.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{EmbeddingEngine.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{EmbeddingEngine.description.map((desc) => (
<li className="text-theme-text-secondary text-sm">{desc}</li>
))}
</ul>
</div>
<div className="flex flex-col gap-y-2 pb-4">
<div className="text-theme-text-primary text-base font-bold">
{t("privacy.vector")}
</div>
<div className="flex items-center gap-2.5">
<img
src={VectorDb.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{VectorDb.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{VectorDb.description.map((desc) => (
<li className="text-theme-text-secondary text-sm">{desc}</li>
))}
</ul>
</div>
</div>
</div>
);
}
function TelemetryLogs({ settings }) {
const [telemetry, setTelemetry] = useState(
settings?.DisableTelemetry !== "true"
@@ -164,7 +77,6 @@ function TelemetryLogs({ settings }) {
return (
<div className="relative w-full max-h-full">
<div className="relative rounded-lg">
<div className="flex items-start justify-between px-6 py-4"></div>
<div className="space-y-6 flex h-full w-full">
<div className="w-full flex flex-col gap-y-4">
<div className="">

View File

@@ -1,499 +1,11 @@
import PreLoader from "@/components/Preloader";
import System from "@/models/system";
import AnythingLLMIcon from "@/media/logo/anything-llm-icon.png";
import OpenAiLogo from "@/media/llmprovider/openai.png";
import GenericOpenAiLogo from "@/media/llmprovider/generic-openai.png";
import AzureOpenAiLogo from "@/media/llmprovider/azure.png";
import AnthropicLogo from "@/media/llmprovider/anthropic.png";
import GeminiLogo from "@/media/llmprovider/gemini.png";
import OllamaLogo from "@/media/llmprovider/ollama.png";
import TogetherAILogo from "@/media/llmprovider/togetherai.png";
import FireworksAILogo from "@/media/llmprovider/fireworksai.jpeg";
import NvidiaNimLogo from "@/media/llmprovider/nvidia-nim.png";
import LMStudioLogo from "@/media/llmprovider/lmstudio.png";
import LocalAiLogo from "@/media/llmprovider/localai.png";
import MistralLogo from "@/media/llmprovider/mistral.jpeg";
import HuggingFaceLogo from "@/media/llmprovider/huggingface.png";
import PerplexityLogo from "@/media/llmprovider/perplexity.png";
import OpenRouterLogo from "@/media/llmprovider/openrouter.jpeg";
import NovitaLogo from "@/media/llmprovider/novita.png";
import GroqLogo from "@/media/llmprovider/groq.png";
import KoboldCPPLogo from "@/media/llmprovider/koboldcpp.png";
import TextGenWebUILogo from "@/media/llmprovider/text-generation-webui.png";
import LiteLLMLogo from "@/media/llmprovider/litellm.png";
import AWSBedrockLogo from "@/media/llmprovider/bedrock.png";
import DeepSeekLogo from "@/media/llmprovider/deepseek.png";
import APIPieLogo from "@/media/llmprovider/apipie.png";
import XAILogo from "@/media/llmprovider/xai.png";
import ZAiLogo from "@/media/llmprovider/zai.png";
import CohereLogo from "@/media/llmprovider/cohere.png";
import ZillizLogo from "@/media/vectordbs/zilliz.png";
import AstraDBLogo from "@/media/vectordbs/astraDB.png";
import ChromaLogo from "@/media/vectordbs/chroma.png";
import PineconeLogo from "@/media/vectordbs/pinecone.png";
import LanceDbLogo from "@/media/vectordbs/lancedb.png";
import WeaviateLogo from "@/media/vectordbs/weaviate.png";
import QDrantLogo from "@/media/vectordbs/qdrant.png";
import MilvusLogo from "@/media/vectordbs/milvus.png";
import VoyageAiLogo from "@/media/embeddingprovider/voyageai.png";
import PPIOLogo from "@/media/llmprovider/ppio.png";
import PGVectorLogo from "@/media/vectordbs/pgvector.png";
import DPAISLogo from "@/media/llmprovider/dpais.png";
import MoonshotAiLogo from "@/media/llmprovider/moonshotai.png";
import CometApiLogo from "@/media/llmprovider/cometapi.png";
import FoundryLogo from "@/media/llmprovider/foundry-local.png";
import GiteeAILogo from "@/media/llmprovider/giteeai.png";
import React, { useState, useEffect } from "react";
import { useEffect } from "react";
import paths from "@/utils/paths";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
export const LLM_SELECTION_PRIVACY = {
openai: {
name: "OpenAI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to OpenAI",
],
logo: OpenAiLogo,
},
azure: {
name: "Azure OpenAI",
description: [
"Your chats will not be used for training",
"Your text and embedding text are not visible to OpenAI or Microsoft",
],
logo: AzureOpenAiLogo,
},
anthropic: {
name: "Anthropic",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to Anthropic",
],
logo: AnthropicLogo,
},
gemini: {
name: "Google Gemini",
description: [
"Your chats are de-identified and used in training",
"Your prompts and document text used in response creation are visible to Google",
],
logo: GeminiLogo,
},
"nvidia-nim": {
name: "NVIDIA NIM",
description: [
"Your model and chats are only accessible on the machine running the NVIDIA NIM",
],
logo: NvidiaNimLogo,
},
lmstudio: {
name: "LMStudio",
description: [
"Your model and chats are only accessible on the server running LMStudio",
],
logo: LMStudioLogo,
},
localai: {
name: "LocalAI",
description: [
"Your model and chats are only accessible on the server running LocalAI",
],
logo: LocalAiLogo,
},
ollama: {
name: "Ollama",
description: [
"Your model and chats are only accessible on the machine running Ollama models",
],
logo: OllamaLogo,
},
togetherai: {
name: "TogetherAI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to TogetherAI",
],
logo: TogetherAILogo,
},
fireworksai: {
name: "FireworksAI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to Fireworks AI",
],
logo: FireworksAILogo,
},
mistral: {
name: "Mistral",
description: [
"Your prompts and document text used in response creation are visible to Mistral",
],
logo: MistralLogo,
},
huggingface: {
name: "HuggingFace",
description: [
"Your prompts and document text used in response are sent to your HuggingFace managed endpoint",
],
logo: HuggingFaceLogo,
},
perplexity: {
name: "Perplexity AI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to Perplexity AI",
],
logo: PerplexityLogo,
},
openrouter: {
name: "OpenRouter",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to OpenRouter",
],
logo: OpenRouterLogo,
},
novita: {
name: "Novita AI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to Novita AI",
],
logo: NovitaLogo,
},
groq: {
name: "Groq",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to Groq",
],
logo: GroqLogo,
},
koboldcpp: {
name: "KoboldCPP",
description: [
"Your model and chats are only accessible on the server running KoboldCPP",
],
logo: KoboldCPPLogo,
},
textgenwebui: {
name: "Oobabooga Web UI",
description: [
"Your model and chats are only accessible on the server running the Oobabooga Text Generation Web UI",
],
logo: TextGenWebUILogo,
},
"generic-openai": {
name: "Generic OpenAI compatible service",
description: [
"Data is shared according to the terms of service applicable with your generic endpoint provider.",
],
logo: GenericOpenAiLogo,
},
cohere: {
name: "Cohere",
description: [
"Data is shared according to the terms of service of cohere.com and your localities privacy laws.",
],
logo: CohereLogo,
},
litellm: {
name: "LiteLLM",
description: [
"Your model and chats are only accessible on the server running LiteLLM",
],
logo: LiteLLMLogo,
},
bedrock: {
name: "AWS Bedrock",
description: [
"You model and chat contents are subject to the agreed EULA for AWS and the model provider on aws.amazon.com",
],
logo: AWSBedrockLogo,
},
deepseek: {
name: "DeepSeek",
description: ["Your model and chat contents are visible to DeepSeek"],
logo: DeepSeekLogo,
},
apipie: {
name: "APIpie.AI",
description: [
"Your model and chat contents are visible to APIpie in accordance with their terms of service.",
],
logo: APIPieLogo,
},
xai: {
name: "xAI",
description: [
"Your model and chat contents are visible to xAI in accordance with their terms of service.",
],
logo: XAILogo,
},
zai: {
name: "Z.AI",
description: [
"Your content is processed in real-time and not stored on Z.AI servers",
"Your prompts and document text are visible to Z.AI during processing",
"Data is processed in accordance with Z.AI's API Services terms",
],
logo: ZAiLogo,
},
ppio: {
name: "PPIO",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to PPIO",
],
logo: PPIOLogo,
},
dpais: {
name: "Dell Pro AI Studio",
description: [
"Your model and chat contents are only accessible on the computer running Dell Pro AI Studio",
],
logo: DPAISLogo,
},
moonshotai: {
name: "Moonshot AI",
description: [
"Your chats may be used by Moonshot AI for training and model refinement",
"Your prompts and document text used in response creation are visible to Moonshot AI",
],
logo: MoonshotAiLogo,
},
cometapi: {
name: "CometAPI",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to CometAPI",
],
logo: CometApiLogo,
},
foundry: {
name: "Microsoft Foundry Local",
description: [
"Your model and chats are only accessible on the machine running Foundry Local",
],
logo: FoundryLogo,
},
giteeai: {
name: "GiteeAI",
description: [
"Your model and chat contents are visible to GiteeAI in accordance with their terms of service.",
],
logo: GiteeAILogo,
},
};
export const VECTOR_DB_PRIVACY = {
pgvector: {
name: "PGVector",
description: [
"Your vectors and document text are stored on your PostgreSQL instance",
"Access to your instance is managed by you",
],
logo: PGVectorLogo,
},
chroma: {
name: "Chroma",
description: [
"Your vectors and document text are stored on your Chroma instance",
"Access to your instance is managed by you",
],
logo: ChromaLogo,
},
chromacloud: {
name: "Chroma Cloud",
description: [
"Your vectors and document text are stored on Chroma's cloud service",
"Access to your data is managed by Chroma",
],
logo: ChromaLogo,
},
pinecone: {
name: "Pinecone",
description: [
"Your vectors and document text are stored on Pinecone's servers",
"Access to your data is managed by Pinecone",
],
logo: PineconeLogo,
},
qdrant: {
name: "Qdrant",
description: [
"Your vectors and document text are stored on your Qdrant instance (cloud or self-hosted)",
],
logo: QDrantLogo,
},
weaviate: {
name: "Weaviate",
description: [
"Your vectors and document text are stored on your Weaviate instance (cloud or self-hosted)",
],
logo: WeaviateLogo,
},
milvus: {
name: "Milvus",
description: [
"Your vectors and document text are stored on your Milvus instance (cloud or self-hosted)",
],
logo: MilvusLogo,
},
zilliz: {
name: "Zilliz Cloud",
description: [
"Your vectors and document text are stored on your Zilliz cloud cluster.",
],
logo: ZillizLogo,
},
astra: {
name: "AstraDB",
description: [
"Your vectors and document text are stored on your cloud AstraDB database.",
],
logo: AstraDBLogo,
},
lancedb: {
name: "LanceDB",
description: [
"Your vectors and document text are stored privately on this instance of AnythingLLM",
],
logo: LanceDbLogo,
},
};
export const EMBEDDING_ENGINE_PRIVACY = {
native: {
name: "AnythingLLM Embedder",
description: [
"Your document text is embedded privately on this instance of AnythingLLM",
],
logo: AnythingLLMIcon,
},
openai: {
name: "OpenAI",
description: [
"Your document text is sent to OpenAI servers",
"Your documents are not used for training",
],
logo: OpenAiLogo,
},
azure: {
name: "Azure OpenAI",
description: [
"Your document text is sent to your Microsoft Azure service",
"Your documents are not used for training",
],
logo: AzureOpenAiLogo,
},
localai: {
name: "LocalAI",
description: [
"Your document text is embedded privately on the server running LocalAI",
],
logo: LocalAiLogo,
},
ollama: {
name: "Ollama",
description: [
"Your document text is embedded privately on the server running Ollama",
],
logo: OllamaLogo,
},
lmstudio: {
name: "LMStudio",
description: [
"Your document text is embedded privately on the server running LMStudio",
],
logo: LMStudioLogo,
},
openrouter: {
name: "OpenRouter",
description: [
"Your document text is sent to OpenRouter's servers for processing",
"Your document text is stored or managed according to the terms of service of OpenRouter API Terms of Service",
],
logo: OpenRouterLogo,
},
cohere: {
name: "Cohere",
description: [
"Data is shared according to the terms of service of cohere.com and your localities privacy laws.",
],
logo: CohereLogo,
},
voyageai: {
name: "Voyage AI",
description: [
"Data sent to Voyage AI's servers is shared according to the terms of service of voyageai.com.",
],
logo: VoyageAiLogo,
},
mistral: {
name: "Mistral AI",
description: [
"Data sent to Mistral AI's servers is shared according to the terms of service of https://mistral.ai.",
],
logo: MistralLogo,
},
litellm: {
name: "LiteLLM",
description: [
"Your document text is only accessible on the server running LiteLLM and to the providers you configured in LiteLLM.",
],
logo: LiteLLMLogo,
},
"generic-openai": {
name: "Generic OpenAI compatible service",
description: [
"Data is shared according to the terms of service applicable with your generic endpoint provider.",
],
logo: GenericOpenAiLogo,
},
gemini: {
name: "Google Gemini",
description: [
"Your document text is sent to Google Gemini's servers for processing",
"Your document text is stored or managed according to the terms of service of Google Gemini API Terms of Service",
],
logo: GeminiLogo,
},
};
export const FALLBACKS = {
LLM: (provider) => ({
name: "Unknown",
description: [
`"${provider}" has no known data handling policy defined in AnythingLLM`,
],
logo: AnythingLLMIcon,
}),
EMBEDDING: (provider) => ({
name: "Unknown",
description: [
`"${provider}" has no known data handling policy defined in AnythingLLM`,
],
logo: AnythingLLMIcon,
}),
VECTOR: (provider) => ({
name: "Unknown",
description: [
`"${provider}" has no known data handling policy defined in AnythingLLM`,
],
logo: AnythingLLMIcon,
}),
};
import ProviderPrivacy from "@/components/ProviderPrivacy";
export default function DataHandling({ setHeader, setForwardBtn, setBackBtn }) {
const { t } = useTranslation();
const [llmChoice, setLLMChoice] = useState("openai");
const [loading, setLoading] = useState(true);
const [vectorDb, setVectorDb] = useState("pinecone");
const [embeddingEngine, setEmbeddingEngine] = useState("openai");
const navigate = useNavigate();
const TITLE = t("onboarding.data.title");
@@ -503,15 +15,6 @@ export default function DataHandling({ setHeader, setForwardBtn, setBackBtn }) {
setHeader({ title: TITLE, description: DESCRIPTION });
setForwardBtn({ showing: true, disabled: false, onClick: handleForward });
setBackBtn({ showing: false, disabled: false, onClick: handleBack });
async function fetchKeys() {
const _settings = await System.keys();
setLLMChoice(_settings?.LLMProvider || "openai");
setVectorDb(_settings?.VectorDB || "lancedb");
setEmbeddingEngine(_settings?.EmbeddingEngine || "openai");
setLoading(false);
}
fetchKeys();
}, []);
function handleForward() {
@@ -522,85 +25,9 @@ export default function DataHandling({ setHeader, setForwardBtn, setBackBtn }) {
navigate(paths.onboarding.userSetup());
}
if (loading)
return (
<div className="w-full h-full flex justify-center items-center p-20">
<PreLoader />
</div>
);
const LLMSelection =
LLM_SELECTION_PRIVACY?.[llmChoice] || FALLBACKS.LLM(llmChoice);
const EmbeddingEngine =
EMBEDDING_ENGINE_PRIVACY?.[embeddingEngine] ||
FALLBACKS.EMBEDDING(embeddingEngine);
const VectorDb = VECTOR_DB_PRIVACY?.[vectorDb] || FALLBACKS.VECTOR(vectorDb);
return (
<div className="w-full flex items-center justify-center flex-col gap-y-6">
<div className="p-8 flex flex-col gap-8">
<div className="flex flex-col gap-y-2 border-b border-theme-sidebar-border pb-4">
<div className="text-theme-text-primary text-base font-bold">
LLM Selection
</div>
<div className="flex items-center gap-2.5">
<img
src={LLMSelection.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{LLMSelection.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{LLMSelection.description.map((desc) => (
<li className="text-theme-text-primary text-sm">{desc}</li>
))}
</ul>
</div>
<div className="flex flex-col gap-y-2 border-b border-theme-sidebar-border pb-4">
<div className="text-theme-text-primary text-base font-bold">
Embedding Preference
</div>
<div className="flex items-center gap-2.5">
<img
src={EmbeddingEngine.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{EmbeddingEngine.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{EmbeddingEngine.description.map((desc) => (
<li className="text-theme-text-primary text-sm">{desc}</li>
))}
</ul>
</div>
<div className="flex flex-col gap-y-2 pb-4">
<div className="text-theme-text-primary text-base font-bold">
Vector Database
</div>
<div className="flex items-center gap-2.5">
<img
src={VectorDb.logo}
alt="LLM Logo"
className="w-8 h-8 rounded"
/>
<p className="text-theme-text-primary text-sm font-bold">
{VectorDb.name}
</p>
</div>
<ul className="flex flex-col list-disc ml-4">
{VectorDb.description.map((desc) => (
<li className="text-theme-text-primary text-sm">{desc}</li>
))}
</ul>
</div>
</div>
<ProviderPrivacy />
<p className="text-theme-text-secondary text-sm font-medium py-1">
{t("onboarding.data.settingsHint")}
</p>