-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
model.models.cadl
113 lines (92 loc) · 3.04 KB
/
model.models.cadl
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
using Cadl.Rest;
using Cadl.Http;
using Azure.Core;
namespace Azure.OpenAI;
@doc("A model is either a base model or the result of a successful fine tune job.")
@resource("models")
model Model {
@doc("Defines the type of an object.")
@visibility("read")
object?: TypeDiscriminator;
@doc("The state of a job or item.")
@visibility("read")
status?: State;
@doc("A timestamp when this job or item was created (in unix epochs).")
@visibility("read")
created_at?: int32;
@doc("A timestamp when this job or item was modified last (in unix epochs).")
@visibility("read")
updated_at?: int32;
@doc("The identity of this item.")
@visibility("read")
@key("model_id")
id: string;
@doc("The base model ID if this is a fine tune model; otherwise `null`.")
@visibility("read")
"model"?: string;
@doc("The fine tune job ID if this is a fine tune model; otherwise `null`.")
@visibility("read")
fine_tune?: string;
@doc("The capabilities of a base or fine tune model.")
capabilities?: Capabilities;
@doc("""
Defines the dates of deprecation for the different use cases of a
model.
Usually base models support 1 year of fine tuning after creation.
Inference is typically supported 2 years after creation of base or
fine tuned
models. The exact dates are specified in the properties.
""")
deprecation?: Deprecation;
}
@doc("The capabilities of a base or fine tune model.")
model Capabilities {
@doc("A value indicating whether a model can be used for fine tuning.")
@visibility("read")
fine_tune?: boolean;
@doc("A value indicating whether a model can be deployed.")
@visibility("read")
inference?: boolean;
@doc("A value indicating whether a model supports completion.")
@visibility("read")
completion?: boolean;
@doc("A value indicating whether a model supports embeddings.")
@visibility("read")
embeddings?: boolean;
@doc("The supported scale types for deployments of this model.")
@visibility("read")
scale_types?: ScaleType[];
}
@doc("""
Defines the dates of deprecation for the different use cases of a
model.
Usually base models support 1 year of fine tuning after creation.
Inference is typically supported 2 years after creation of base or
fine tuned
models. The exact dates are specified in the properties.
""")
model Deprecation {
@doc("""
The end date of fine tune support of this model. Will be `null` for fine tune
models.
""")
@visibility("read")
fine_tune_end_date?: int32;
@doc("The end date of inference support of this model.")
@visibility("read")
inference?: int32;
}
@doc("Settings for the manual scale type.")
model ManualScaleSettings extends ScaleSettings {
@doc("The constant reserved capacity of the inference endpoint for this deployment.")
capacity: int32;
@doc("Defines how scaling operations will be executed.")
scale_type: "manual";
}
@doc("Settings for the standard scale type.")
model StandardScaleSettings extends ScaleSettings {
@doc("Defines how scaling operations will be executed.")
scale_type: "standard";
}