Skip to content

Commit 6bcf1b7

Browse files
committed
feature #1216 [Platform][Albert] Update models (gundesli)
This PR was merged into the main branch. Discussion ---------- [Platform][Albert] Update models | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Docs? | no | Issues | Fix #1212 | License | MIT The change involves updating the Albert API models with the new range. Commits ------- b071b97 [Platform] albert update models (#1212)
2 parents e9bdd4a + b071b97 commit 6bcf1b7

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

examples/albert/chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
Message::ofUser('Summarize the main objectives of France\'s AI strategy in one sentence.'),
4040
);
4141

42-
$result = $platform->invoke('albert-small', $messages);
42+
$result = $platform->invoke('openweight-small', $messages);
4343

4444
echo $result->asText().\PHP_EOL;

examples/albert/embeddings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
$platform = PlatformFactory::create(env('ALBERT_API_KEY'), env('ALBERT_API_URL'), http_client());
1717

18-
$response = $platform->invoke('embeddings-small', <<<TEXT
18+
$response = $platform->invoke('openweight-embeddings', <<<TEXT
1919
Once upon a time, there was a country called Japan. It was a beautiful country with a lot of mountains and rivers.
2020
The people of Japan were very kind and hardworking. They loved their country very much and took care of it. The
2121
country was very peaceful and prosperous. The people lived happily ever after.

src/platform/src/Bridge/Albert/ModelCatalog.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,31 @@ final class ModelCatalog extends AbstractModelCatalog
2828
public function __construct(array $additionalModels = [])
2929
{
3030
$defaultModels = [
31-
'albert-small' => [
31+
'openweight-small' => [
3232
'class' => CompletionsModel::class,
3333
'capabilities' => [
3434
Capability::INPUT_MESSAGES,
3535
Capability::OUTPUT_TEXT,
3636
Capability::OUTPUT_STREAMING,
3737
],
3838
],
39-
'albert-large' => [
39+
'openweight-medium' => [
4040
'class' => CompletionsModel::class,
4141
'capabilities' => [
4242
Capability::INPUT_MESSAGES,
4343
Capability::OUTPUT_TEXT,
4444
Capability::OUTPUT_STREAMING,
4545
],
4646
],
47-
'embeddings-small' => [
47+
'openweight-large' => [
48+
'class' => CompletionsModel::class,
49+
'capabilities' => [
50+
Capability::INPUT_MESSAGES,
51+
Capability::OUTPUT_TEXT,
52+
Capability::OUTPUT_STREAMING,
53+
],
54+
],
55+
'openweight-embeddings' => [
4856
'class' => EmbeddingsModel::class,
4957
'capabilities' => [Capability::INPUT_TEXT],
5058
],

src/platform/src/Bridge/Albert/Tests/ModelCatalogTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ final class ModelCatalogTest extends ModelCatalogTestCase
2525
{
2626
public static function modelsProvider(): iterable
2727
{
28-
yield 'albert-small' => ['albert-small', CompletionsModel::class, [Capability::INPUT_MESSAGES, Capability::OUTPUT_TEXT, Capability::OUTPUT_STREAMING]];
29-
yield 'albert-large' => ['albert-large', CompletionsModel::class, [Capability::INPUT_MESSAGES, Capability::OUTPUT_TEXT, Capability::OUTPUT_STREAMING]];
30-
yield 'embeddings-small' => ['embeddings-small', EmbeddingsModel::class, [Capability::INPUT_TEXT]];
28+
yield 'openweight-small' => ['openweight-small', CompletionsModel::class, [Capability::INPUT_MESSAGES, Capability::OUTPUT_TEXT, Capability::OUTPUT_STREAMING]];
29+
yield 'openweight-medium' => ['openweight-medium', CompletionsModel::class, [Capability::INPUT_MESSAGES, Capability::OUTPUT_TEXT, Capability::OUTPUT_STREAMING]];
30+
yield 'openweight-large' => ['openweight-large', CompletionsModel::class, [Capability::INPUT_MESSAGES, Capability::OUTPUT_TEXT, Capability::OUTPUT_STREAMING]];
31+
yield 'openweight-embeddings' => ['openweight-embeddings', EmbeddingsModel::class, [Capability::INPUT_TEXT]];
3132
}
3233

3334
protected function createModelCatalog(): ModelCatalogInterface

0 commit comments

Comments
 (0)