-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelConfig.php
More file actions
40 lines (35 loc) · 1.7 KB
/
Copy pathModelConfig.php
File metadata and controls
40 lines (35 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
namespace Stagehand\Sessions;
use Stagehand\Core\Concerns\SdkUnion;
use Stagehand\Core\Conversion\Contracts\Converter;
use Stagehand\Core\Conversion\Contracts\ConverterSource;
use Stagehand\Sessions\ModelConfig\AzureAPIKeyModelConfigObject;
use Stagehand\Sessions\ModelConfig\AzureEntraModelConfigObject;
use Stagehand\Sessions\ModelConfig\GenericModelConfigObject;
use Stagehand\Sessions\ModelConfig\VertexModelConfigObject;
/**
* @phpstan-import-type VertexModelConfigObjectShape from \Stagehand\Sessions\ModelConfig\VertexModelConfigObject
* @phpstan-import-type AzureEntraModelConfigObjectShape from \Stagehand\Sessions\ModelConfig\AzureEntraModelConfigObject
* @phpstan-import-type AzureAPIKeyModelConfigObjectShape from \Stagehand\Sessions\ModelConfig\AzureAPIKeyModelConfigObject
* @phpstan-import-type GenericModelConfigObjectShape from \Stagehand\Sessions\ModelConfig\GenericModelConfigObject
*
* @phpstan-type ModelConfigVariants = VertexModelConfigObject|AzureEntraModelConfigObject|AzureAPIKeyModelConfigObject|GenericModelConfigObject
* @phpstan-type ModelConfigShape = ModelConfigVariants|VertexModelConfigObjectShape|AzureEntraModelConfigObjectShape|AzureAPIKeyModelConfigObjectShape|GenericModelConfigObjectShape
*/
final class ModelConfig implements ConverterSource
{
use SdkUnion;
/**
* @return list<string|Converter|ConverterSource>|array<string,string|Converter|ConverterSource>
*/
public static function variants(): array
{
return [
VertexModelConfigObject::class,
AzureEntraModelConfigObject::class,
AzureAPIKeyModelConfigObject::class,
GenericModelConfigObject::class,
];
}
}