summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-07-14 15:59:50 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-08-09 10:05:05 +0200
commitcf2c42ae36a3c7280887bd3f15329739f9a6d221 (patch)
tree3e682483cc8177afd7b9e682fcaa103791f78d2a /lib/private/AppFramework
parent696a45ddf1d460de7ffa6f252912375efd7e190e (diff)
downloadnextcloud-server-cf2c42ae36a3c7280887bd3f15329739f9a6d221.tar.gz
nextcloud-server-cf2c42ae36a3c7280887bd3f15329739f9a6d221.zip
Massive refactoring: Turn LanguageModel OCP API into TextProcessing API
Signed-off-by: Marcel Klehr <mklehr@gmx.net> (cherry picked from commit ffe27ce14ca74b509c8721c9fba7c759498fa471)
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 67e8b390c15..5aea2a7a744 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -33,7 +33,7 @@ use Closure;
use OCP\Calendar\Resource\IBackend as IResourceBackend;
use OCP\Calendar\Room\IBackend as IRoomBackend;
use OCP\Collaboration\Reference\IReferenceProvider;
-use OCP\LanguageModel\ILanguageModelProvider;
+use OCP\TextProcessing\IProvider as ITextProcessingProvider;
use OCP\SpeechToText\ISpeechToTextProvider;
use OCP\Talk\ITalkBackend;
use OCP\Translation\ITranslationProvider;
@@ -116,8 +116,8 @@ class RegistrationContext {
/** @var ServiceRegistration<ISpeechToTextProvider>[] */
private $speechToTextProviders = [];
- /** @var ServiceRegistration<ILanguageModelProvider>[] */
- private $languageModelProviders = [];
+ /** @var ServiceRegistration<ITextProcessingProvider>[] */
+ private $textProcessingProviders = [];
/** @var ServiceRegistration<ICustomTemplateProvider>[] */
private $templateProviders = [];
@@ -266,8 +266,8 @@ class RegistrationContext {
$providerClass
);
}
- public function registerLanguageModelProvider(string $providerClass): void {
- $this->context->registerLanguageModelProvider(
+ public function registerTextProcessingProvider(string $providerClass): void {
+ $this->context->registerTextProcessingProvider(
$this->appId,
$providerClass
);
@@ -439,8 +439,8 @@ class RegistrationContext {
$this->speechToTextProviders[] = new ServiceRegistration($appId, $class);
}
- public function registerLanguageModelProvider(string $appId, string $class): void {
- $this->languageModelProviders[] = new ServiceRegistration($appId, $class);
+ public function registerTextProcessingProvider(string $appId, string $class): void {
+ $this->textProcessingProviders[] = new ServiceRegistration($appId, $class);
}
public function registerTemplateProvider(string $appId, string $class): void {
@@ -722,10 +722,10 @@ class RegistrationContext {
}
/**
- * @return ServiceRegistration<ILanguageModelProvider>[]
+ * @return ServiceRegistration<ITextProcessingProvider>[]
*/
- public function getLanguageModelProviders(): array {
- return $this->languageModelProviders;
+ public function getTextProcessingProviders(): array {
+ return $this->textProcessingProviders;
}
/**