File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 14
14
/**
15
15
* @author Christopher Hertel <[email protected] >
16
16
*/
17
- class Capability
17
+ enum Capability: string
18
18
{
19
19
// INPUT
20
- public const INPUT_AUDIO = 'input-audio ' ;
21
- public const INPUT_IMAGE = 'input-image ' ;
22
- public const INPUT_MESSAGES = 'input-messages ' ;
23
- public const INPUT_MULTIPLE = 'input-multiple ' ;
24
- public const INPUT_PDF = 'input-pdf ' ;
25
- public const INPUT_TEXT = 'input-text ' ;
20
+ case INPUT_AUDIO = 'input-audio ' ;
21
+ case INPUT_IMAGE = 'input-image ' ;
22
+ case INPUT_MESSAGES = 'input-messages ' ;
23
+ case INPUT_MULTIPLE = 'input-multiple ' ;
24
+ case INPUT_PDF = 'input-pdf ' ;
25
+ case INPUT_TEXT = 'input-text ' ;
26
26
27
27
// OUTPUT
28
- public const OUTPUT_AUDIO = 'output-audio ' ;
29
- public const OUTPUT_IMAGE = 'output-image ' ;
30
- public const OUTPUT_STREAMING = 'output-streaming ' ;
31
- public const OUTPUT_STRUCTURED = 'output-structured ' ;
32
- public const OUTPUT_TEXT = 'output-text ' ;
28
+ case OUTPUT_AUDIO = 'output-audio ' ;
29
+ case OUTPUT_IMAGE = 'output-image ' ;
30
+ case OUTPUT_STREAMING = 'output-streaming ' ;
31
+ case OUTPUT_STRUCTURED = 'output-structured ' ;
32
+ case OUTPUT_TEXT = 'output-text ' ;
33
33
34
34
// FUNCTIONALITY
35
- public const TOOL_CALLING = 'tool-calling ' ;
35
+ case TOOL_CALLING = 'tool-calling ' ;
36
36
}
Original file line number Diff line number Diff line change 17
17
class Model
18
18
{
19
19
/**
20
- * @param string[] $capabilities
20
+ * @param Capability[] $capabilities
21
21
* @param array<string, mixed> $options
22
22
*/
23
23
public function __construct (
@@ -33,14 +33,14 @@ public function getName(): string
33
33
}
34
34
35
35
/**
36
- * @return string []
36
+ * @return Capability []
37
37
*/
38
38
public function getCapabilities (): array
39
39
{
40
40
return $ this ->capabilities ;
41
41
}
42
42
43
- public function supports (string $ capability ): bool
43
+ public function supports (Capability $ capability ): bool
44
44
{
45
45
return \in_array ($ capability , $ this ->capabilities , true );
46
46
}
You can’t perform that action at this time.
0 commit comments