mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 03:29:23 +08:00
Add synchronized YouTube learning, a plugin-driven visualizer catalog, and Hermes, OpenClaw, and DeepSeek agent harnesses. Refresh Reading, Knowledge, Partner status, guided updates, documentation, translations, and release notes for v1.6.2.
25 lines
766 B
TypeScript
25 lines
766 B
TypeScript
export type KnowledgeEngineGroup = "local" | "server" | "cloud";
|
|
|
|
const CLOUD_ENGINE_IDS = new Set(["pageindex", "ima"]);
|
|
const SERVER_ENGINE_IDS = new Set(["lightrag-server"]);
|
|
const LOCAL_ENGINE_IDS = new Set([
|
|
"llamaindex",
|
|
"pageindex-oss",
|
|
"graphrag",
|
|
"lightrag",
|
|
]);
|
|
|
|
/**
|
|
* Keep the Knowledge Center grouping stable for the built-in engines while
|
|
* still giving future providers a sensible home.
|
|
*/
|
|
export function knowledgeEngineGroup(provider: {
|
|
id: string;
|
|
requires_api_key?: boolean;
|
|
}): KnowledgeEngineGroup {
|
|
if (CLOUD_ENGINE_IDS.has(provider.id)) return "cloud";
|
|
if (SERVER_ENGINE_IDS.has(provider.id)) return "server";
|
|
if (LOCAL_ENGINE_IDS.has(provider.id)) return "local";
|
|
return provider.requires_api_key ? "cloud" : "local";
|
|
}
|