@@ -152,6 +152,28 @@ export enum MODEL_STATE {
152
152
DEPLOY_FAILED = 'Deploy failed' ,
153
153
}
154
154
155
+ // Based off of https://github.com/opensearch-project/ml-commons/blob/main/common/src/main/java/org/opensearch/ml/common/FunctionName.java
156
+ export enum MODEL_ALGORITHM {
157
+ LINEAR_REGRESSION = 'Linear regression' ,
158
+ KMEANS = 'K-means' ,
159
+ AD_LIBSVM = 'AD LIBSVM' ,
160
+ SAMPLE_ALGO = 'Sample algorithm' ,
161
+ LOCAL_SAMPLE_CALCULATOR = 'Local sample calculator' ,
162
+ FIT_RCF = 'Fit RCF' ,
163
+ BATCH_RCF = 'Batch RCF' ,
164
+ ANOMALY_LOCALIZATION = 'Anomaly localization' ,
165
+ RCF_SUMMARIZE = 'RCF summarize' ,
166
+ LOGISTIC_REGRESSION = 'Logistic regression' ,
167
+ TEXT_EMBEDDING = 'Text embedding' ,
168
+ METRICS_CORRELATION = 'Metrics correlation' ,
169
+ REMOTE = 'Remote' ,
170
+ SPARSE_ENCODING = 'Sparse encoding' ,
171
+ SPARSE_TOKENIZE = 'Sparse tokenize' ,
172
+ TEXT_SIMILARITY = 'Text similarity' ,
173
+ QUESTION_ANSWERING = 'Question answering' ,
174
+ AGENT = 'Agent' ,
175
+ }
176
+
155
177
export enum MODEL_CATEGORY {
156
178
DEPLOYED = 'Deployed' ,
157
179
PRETRAINED = 'Pretrained' ,
@@ -166,6 +188,7 @@ export type PretrainedModel = {
166
188
shortenedName : string ;
167
189
description : string ;
168
190
format : PRETRAINED_MODEL_FORMAT ;
191
+ algorithm : MODEL_ALGORITHM ;
169
192
version : string ;
170
193
} ;
171
194
@@ -181,7 +204,7 @@ export type ModelConfig = {
181
204
export type Model = {
182
205
id : string ;
183
206
name : string ;
184
- algorithm : string ;
207
+ algorithm : MODEL_ALGORITHM ;
185
208
state : MODEL_STATE ;
186
209
modelConfig ?: ModelConfig ;
187
210
} ;
@@ -193,6 +216,7 @@ export type ModelDict = {
193
216
export type ModelFormValue = {
194
217
id : string ;
195
218
category ?: MODEL_CATEGORY ;
219
+ algorithm ?: MODEL_ALGORITHM ;
196
220
} ;
197
221
198
222
/**
0 commit comments