mirror of
https://github.com/crowetic/nc-talk-ai.git
synced 2026-09-07 15:42:31 +00:00
Talk AI is a multi-bot AI assistant manager for Nextcloud Talk: per-bot prompts and models, agentic tool calling (MCP + built-in tools), RAG over Nextcloud files, room-document search, vision and speech-to-text attachments, persistent bot wikis, approval workflows, rate limiting, and multi-provider LLM support (any OpenAI-compatible endpoint). Developed within EDUC - the European Digital UniverCity (https://educalliance.eu), where it runs as the 'EDUC AI' assistant on the alliance-wide Nextcloud portal. This public repository is the upstream point of truth; deployment-specific tools plug in via the tool-provider extension point (docs/TOOL_PROVIDERS.md). License: AGPL-3.0-or-later.
39 lines
927 B
PHP
39 lines
927 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\EducAI\Db;
|
|
|
|
use OCP\IDBConnection;
|
|
|
|
final class RoomDocumentTables {
|
|
public const SOURCES = 'educai_room_doc_src';
|
|
public const LEGACY_SOURCES = 'educai_room_document_sources';
|
|
|
|
public const EMBEDDINGS = 'educai_room_doc_emb';
|
|
public const LEGACY_EMBEDDINGS = 'educai_room_document_embeddings';
|
|
|
|
private function __construct() {
|
|
}
|
|
|
|
public static function resolveSourcesTable(IDBConnection $db): string {
|
|
return self::resolve($db, self::SOURCES, self::LEGACY_SOURCES);
|
|
}
|
|
|
|
public static function resolveEmbeddingsTable(IDBConnection $db): string {
|
|
return self::resolve($db, self::EMBEDDINGS, self::LEGACY_EMBEDDINGS);
|
|
}
|
|
|
|
private static function resolve(IDBConnection $db, string $preferred, string $legacy): string {
|
|
if ($db->tableExists($preferred)) {
|
|
return $preferred;
|
|
}
|
|
|
|
if ($db->tableExists($legacy)) {
|
|
return $legacy;
|
|
}
|
|
|
|
return $preferred;
|
|
}
|
|
}
|