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.
60 lines
1.3 KiB
PHP
60 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 approval questionnaire fields and testing enable flag to educai_bots.
|
|
*/
|
|
class Version022300Date20251210100000 extends SimpleMigrationStep {
|
|
/**
|
|
* @param IOutput $output
|
|
* @param Closure(): ISchemaWrapper $schemaClosure
|
|
* @param array $options
|
|
* @return null|ISchemaWrapper
|
|
*/
|
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
|
/** @var ISchemaWrapper $schema */
|
|
$schema = $schemaClosure();
|
|
|
|
$tableName = 'educai_bots';
|
|
if ($schema->hasTable($tableName)) {
|
|
$table = $schema->getTable($tableName);
|
|
|
|
$fields = [
|
|
'approval_reason' => Types::TEXT,
|
|
'bot_capabilities' => Types::TEXT,
|
|
'rag_source_description' => Types::TEXT,
|
|
'testing_description' => Types::TEXT,
|
|
'rejection_reason' => Types::TEXT,
|
|
];
|
|
|
|
foreach ($fields as $column => $type) {
|
|
if (!$table->hasColumn($column)) {
|
|
$table->addColumn($column, $type, [
|
|
'notnull' => false,
|
|
]);
|
|
}
|
|
}
|
|
|
|
if (!$table->hasColumn('testing_enabled_by')) {
|
|
$table->addColumn('testing_enabled_by', Types::STRING, [
|
|
'notnull' => false,
|
|
'length' => 64,
|
|
]);
|
|
}
|
|
}
|
|
|
|
return $schema;
|
|
}
|
|
}
|
|
|
|
|