Files
nc-talk-ai/lib/Migration/Version022800Date20260227000000.php
Pascal Kienast 0739d3da6a Initial open-source release of Talk AI
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.
2026-07-08 21:13:13 +02:00

55 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\EducAI\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Track embedding model per vector row to avoid cross-model similarity comparisons.
*/
class Version022800Date20260227000000 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array<string,mixed> $options
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if ($schema->hasTable('educai_embeddings')) {
$table = $schema->getTable('educai_embeddings');
if (!$table->hasColumn('embedding_model')) {
$table->addColumn('embedding_model', Types::STRING, [
'length' => 255,
'notnull' => false,
]);
}
if (!$table->hasIndex('educai_emb_bot_model_i')) {
$table->addIndex(['bot_id', 'embedding_model'], 'educai_emb_bot_model_i');
}
}
if ($schema->hasTable('educai_catalogue_emb')) {
$table = $schema->getTable('educai_catalogue_emb');
if (!$table->hasColumn('embedding_model')) {
$table->addColumn('embedding_model', Types::STRING, [
'length' => 255,
'notnull' => false,
]);
}
if (!$table->hasIndex('educai_cat_emb_mod_idx')) {
$table->addIndex(['is_past', 'embedding_model'], 'educai_cat_emb_mod_idx');
}
}
return $schema;
}
}