@@ -180,7 +180,7 @@ export interface Model {
180180 /**
181181 * The version of the model.
182182 */
183- version : string ;
183+ version : number ;
184184
185185 /**
186186 * The model download source. It can be an external url or a local filepath.
@@ -197,12 +197,6 @@ export interface Model {
197197 */
198198 name : string ;
199199
200- /**
201- * The organization that owns the model (you!)
202- * Default: "you"
203- */
204- owned_by : string ;
205-
206200 /**
207201 * The Unix timestamp (in seconds) for when the model was created
208202 */
@@ -236,11 +230,16 @@ export interface Model {
236230 metadata : ModelMetadata ;
237231}
238232
233+ export type ModelMetadata = {
234+ author : string ;
235+ tags : string [ ] ;
236+ size : number ;
237+ } ;
238+
239239/**
240240 * The Model transition states.
241241 */
242242export enum ModelState {
243- ToDownload = "to_download" ,
244243 Downloading = "downloading" ,
245244 Ready = "ready" ,
246245 Running = "running" ,
@@ -250,65 +249,27 @@ export enum ModelState {
250249 * The available model settings.
251250 */
252251export type ModelSettingParams = {
253- ctx_len : number ;
254- ngl : number ;
255- embedding : boolean ;
256- n_parallel : number ;
252+ ctx_len ?: number ;
253+ ngl ?: number ;
254+ embedding ?: boolean ;
255+ n_parallel ?: number ;
256+ system_prompt ?: string ;
257+ user_prompt ?: string ;
258+ ai_prompt ?: string ;
257259} ;
258260
259261/**
260262 * The available model runtime parameters.
261263 */
262264export type ModelRuntimeParam = {
263- temperature : number ;
264- token_limit : number ;
265- top_k : number ;
266- top_p : number ;
267- stream : boolean ;
265+ temperature ?: number ;
266+ token_limit ?: number ;
267+ top_k ?: number ;
268+ top_p ?: number ;
269+ stream ?: boolean ;
270+ max_tokens ?: number ;
268271} ;
269272
270- /**
271- * The metadata of the model.
272- */
273- export type ModelMetadata = {
274- engine : string ;
275- quantization : string ;
276- size : number ;
277- binaries : string [ ] ;
278- maxRamRequired : number ;
279- author : string ;
280- avatarUrl : string ;
281- } ;
282-
283- /**
284- * Model type of the presentation object which will be presented to the user
285- * @data_transfer_object
286- */
287- export interface ModelCatalog {
288- /** The unique id of the model.*/
289- id : string ;
290- /** The name of the model.*/
291- name : string ;
292- /** The avatar url of the model.*/
293- avatarUrl : string ;
294- /** The short description of the model.*/
295- shortDescription : string ;
296- /** The long description of the model.*/
297- longDescription : string ;
298- /** The author name of the model.*/
299- author : string ;
300- /** The version of the model.*/
301- version : string ;
302- /** The origin url of the model repo.*/
303- modelUrl : string ;
304- /** The timestamp indicating when this model was released.*/
305- releaseDate : number ;
306- /** The tags attached to the model description **/
307- tags : string [ ] ;
308- /** The available versions of this model to download. */
309- availableVersions : Model [ ] ;
310- }
311-
312273/**
313274 * Assistant type defines the shape of an assistant object.
314275 * @stored
0 commit comments