Files
nuqloud-ai/lib/Webhook/IncomingTalkAttachment.php
T
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

74 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\EducAI\Webhook;
class IncomingTalkAttachment {
public const KIND_IMAGE = 'image';
public const KIND_AUDIO = 'audio';
public const KIND_DOCUMENT = 'document';
public const KIND_UNSUPPORTED = 'unsupported';
/**
* @param array<string,mixed> $fileRef
*/
public function __construct(
private string $kind,
private string $sharedItemType,
private ?string $mimeType,
private string $displayName,
private string $parameterKey,
private array $fileRef = [],
private ?string $unsupportedReason = null
) {
}
public function getKind(): string {
return $this->kind;
}
public function getSharedItemType(): string {
return $this->sharedItemType;
}
public function getMimeType(): ?string {
return $this->mimeType;
}
public function getDisplayName(): string {
return $this->displayName;
}
public function getParameterKey(): string {
return $this->parameterKey;
}
/**
* @return array<string,mixed>
*/
public function getFileRef(): array {
return $this->fileRef;
}
public function getUnsupportedReason(): ?string {
return $this->unsupportedReason;
}
public function isImage(): bool {
return $this->kind === self::KIND_IMAGE;
}
public function isAudio(): bool {
return $this->kind === self::KIND_AUDIO;
}
public function isDocument(): bool {
return $this->kind === self::KIND_DOCUMENT;
}
public function isSupported(): bool {
return $this->kind !== self::KIND_UNSUPPORTED;
}
}