diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-07-07 11:40:19 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-08-09 10:02:00 +0200 |
commit | 70e65ff7a3cb159b8d96255ea274e93d0b20a804 (patch) | |
tree | 8f1a3272a0d58b63ba31beb67cfc656e5a2d6aa4 /tests | |
parent | 3350811ce390b83841258c0be7ebbd15e33383ff (diff) | |
download | nextcloud-server-70e65ff7a3cb159b8d96255ea274e93d0b20a804.tar.gz nextcloud-server-70e65ff7a3cb159b8d96255ea274e93d0b20a804.zip |
LLM OCP API: s/getAvailableTasks/getAvailableTaskClasses/
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
(cherry picked from commit d56286b8acb319e05eaa8b8a920c76e76da336cf)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/LanguageModel/LanguageModelManagerTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/LanguageModel/LanguageModelManagerTest.php b/tests/lib/LanguageModel/LanguageModelManagerTest.php index 423eb525ba2..1eea6bf2074 100644 --- a/tests/lib/LanguageModel/LanguageModelManagerTest.php +++ b/tests/lib/LanguageModel/LanguageModelManagerTest.php @@ -163,7 +163,7 @@ class LanguageModelManagerTest extends \Test\TestCase { public function testShouldNotHaveAnyProviders() { $this->registrationContext->expects($this->any())->method('getLanguageModelProviders')->willReturn([]); - $this->assertCount(0, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(0, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(0, $this->languageModelManager->getAvailableTaskTypes()); $this->assertFalse($this->languageModelManager->hasProviders()); $this->expectException(PreConditionNotMetException::class); @@ -174,7 +174,7 @@ class LanguageModelManagerTest extends \Test\TestCase { $this->registrationContext->expects($this->any())->method('getLanguageModelProviders')->willReturn([ new ServiceRegistration('test', TestVanillaLanguageModelProvider::class) ]); - $this->assertCount(1, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(1, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(1, $this->languageModelManager->getAvailableTaskTypes()); $this->assertTrue($this->languageModelManager->hasProviders()); $this->assertEquals('Hello Free Prompt', $this->languageModelManager->runTask(new FreePromptTask('Hello', 'test', null))); @@ -189,7 +189,7 @@ class LanguageModelManagerTest extends \Test\TestCase { $this->registrationContext->expects($this->any())->method('getLanguageModelProviders')->willReturn([ new ServiceRegistration('test', TestVanillaLanguageModelProvider::class) ]); - $this->assertCount(1, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(1, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(1, $this->languageModelManager->getAvailableTaskTypes()); $this->assertTrue($this->languageModelManager->hasProviders()); @@ -259,7 +259,7 @@ class LanguageModelManagerTest extends \Test\TestCase { new ServiceRegistration('test', TestVanillaLanguageModelProvider::class), new ServiceRegistration('test', TestFullLanguageModelProvider::class), ]); - $this->assertCount(3, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(3, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(3, $this->languageModelManager->getAvailableTaskTypes()); $this->assertTrue($this->languageModelManager->hasProviders()); @@ -287,7 +287,7 @@ class LanguageModelManagerTest extends \Test\TestCase { $this->registrationContext->expects($this->any())->method('getLanguageModelProviders')->willReturn([ new ServiceRegistration('test', TestFailingLanguageModelProvider::class), ]); - $this->assertCount(1, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(1, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(1, $this->languageModelManager->getAvailableTaskTypes()); $this->assertTrue($this->languageModelManager->hasProviders()); @@ -354,7 +354,7 @@ class LanguageModelManagerTest extends \Test\TestCase { $this->registrationContext->expects($this->any())->method('getLanguageModelProviders')->willReturn([ new ServiceRegistration('test', TestVanillaLanguageModelProvider::class) ]); - $this->assertCount(1, $this->languageModelManager->getAvailableTasks()); + $this->assertCount(1, $this->languageModelManager->getAvailableTaskClasses()); $this->assertCount(1, $this->languageModelManager->getAvailableTaskTypes()); $this->assertTrue($this->languageModelManager->hasProviders()); $task = new FreePromptTask('Hello', 'test', null); |