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.
47 lines
1.3 KiB
PHP
47 lines
1.3 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;
|
|
|
|
/**
|
|
* Add URL source support to RAG system.
|
|
*
|
|
* This migration adds:
|
|
* - source_url column to educai_bot_sources for storing URL sources
|
|
* - Sets default value for node_id column (needed for URL sources)
|
|
*/
|
|
class Version021100Date20251128000000 extends SimpleMigrationStep {
|
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
|
/** @var ISchemaWrapper $schema */
|
|
$schema = $schemaClosure();
|
|
|
|
// Add source_url column to bot_sources table
|
|
if ($schema->hasTable('educai_bot_sources')) {
|
|
$table = $schema->getTable('educai_bot_sources');
|
|
|
|
if (!$table->hasColumn('source_url')) {
|
|
$table->addColumn('source_url', Types::TEXT, [
|
|
'notnull' => false,
|
|
]);
|
|
}
|
|
|
|
// Modify node_id to have a default value of 0 (needed for URL sources)
|
|
if ($table->hasColumn('node_id')) {
|
|
$table->changeColumn('node_id', [
|
|
'default' => 0,
|
|
]);
|
|
}
|
|
}
|
|
|
|
return $schema;
|
|
}
|
|
}
|
|
|