-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelInfoProvider.php
More file actions
42 lines (34 loc) · 1.12 KB
/
ModelInfoProvider.php
File metadata and controls
42 lines (34 loc) · 1.12 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
41
42
<?php
declare(strict_types=1);
namespace Cortex\ModelInfo\Contracts;
use Cortex\ModelInfo\Data\ModelInfo;
use Cortex\ModelInfo\Enums\ModelProvider;
interface ModelInfoProvider
{
/**
* Get the available models for a given provider.
*
* @return array<array-key, \Cortex\ModelInfo\Data\ModelInfo>
*/
public function getModels(ModelProvider $modelProvider): array;
/**
* Get the model info for a given model.
*/
public function getModelInfo(ModelProvider $modelProvider, string $model): ModelInfo;
/**
* Get the model providers that are supported.
*
* @return array<array-key, \Cortex\ModelInfo\Enums\ModelProvider>
*/
public function supportedModelProviders(): array;
/**
* Determine if the given model provider is supported.
*/
public function supports(ModelProvider $modelProvider): bool;
/**
* Determine if the given model provider is supported and throw an exception if it is not.
*
* @throws \Cortex\ModelInfo\Exceptions\ModelInfoException
*/
public function checkSupportOrFail(ModelProvider $modelProvider): void;
}