fix: Update event types
This commit is contained in:
parent
750f09cc81
commit
0c838cecb1
@ -14,8 +14,10 @@ export enum EventName {
|
|||||||
OnModelReady = "OnModelReady",
|
OnModelReady = "OnModelReady",
|
||||||
/** The `OnModelFail` event is emitted when a model fails loading. */
|
/** The `OnModelFail` event is emitted when a model fails loading. */
|
||||||
OnModelFail = "OnModelFail",
|
OnModelFail = "OnModelFail",
|
||||||
/** The `OnModelStop` event is emitted when a model fails loading. */
|
/** The `OnModelStop` event is emitted when a model start to stop. */
|
||||||
OnModelStop = "OnModelStop",
|
OnModelStop = "OnModelStop",
|
||||||
|
/** The `OnModelStopped` event is emitted when a model stopped ok. */
|
||||||
|
OnModelStopped = "OnModelStopped",
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -43,6 +43,9 @@ export type MessageRequest = {
|
|||||||
|
|
||||||
/** Runtime parameters for constructing a chat completion request **/
|
/** Runtime parameters for constructing a chat completion request **/
|
||||||
parameters?: ModelRuntimeParam;
|
parameters?: ModelRuntimeParam;
|
||||||
|
|
||||||
|
/** Settings for constructing a chat completion request **/
|
||||||
|
model?: ModelInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,6 +157,7 @@ export type ModelInfo = {
|
|||||||
id: string;
|
id: string;
|
||||||
settings: ModelSettingParams;
|
settings: ModelSettingParams;
|
||||||
parameters: ModelRuntimeParam;
|
parameters: ModelRuntimeParam;
|
||||||
|
engine: InferenceEngine;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -172,7 +176,7 @@ export type ThreadState = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
enum InferenceEngine {
|
enum InferenceEngine {
|
||||||
llama_cpp = "llama_cpp",
|
nitro = "nitro",
|
||||||
openai = "openai",
|
openai = "openai",
|
||||||
nvidia_triton = "nvidia_triton",
|
nvidia_triton = "nvidia_triton",
|
||||||
hf_endpoint = "hf_endpoint",
|
hf_endpoint = "hf_endpoint",
|
||||||
@ -246,7 +250,7 @@ export interface Model {
|
|||||||
*/
|
*/
|
||||||
metadata: ModelMetadata;
|
metadata: ModelMetadata;
|
||||||
/**
|
/**
|
||||||
* The model engine. Enum: "llamacpp" "openai"
|
* The model engine.
|
||||||
*/
|
*/
|
||||||
engine: InferenceEngine;
|
engine: InferenceEngine;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user