fix: Update event types

This commit is contained in:
hiro 2023-12-04 23:10:31 +07:00
parent 750f09cc81
commit 0c838cecb1
2 changed files with 9 additions and 3 deletions

View File

@ -14,8 +14,10 @@ export enum EventName {
OnModelReady = "OnModelReady",
/** The `OnModelFail` event is emitted when a model fails loading. */
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",
/** The `OnModelStopped` event is emitted when a model stopped ok. */
OnModelStopped = "OnModelStopped",
}
/**

View File

@ -43,6 +43,9 @@ export type MessageRequest = {
/** Runtime parameters for constructing a chat completion request **/
parameters?: ModelRuntimeParam;
/** Settings for constructing a chat completion request **/
model?: ModelInfo
};
/**
@ -154,6 +157,7 @@ export type ModelInfo = {
id: string;
settings: ModelSettingParams;
parameters: ModelRuntimeParam;
engine: InferenceEngine;
};
/**
@ -172,7 +176,7 @@ export type ThreadState = {
*/
enum InferenceEngine {
llama_cpp = "llama_cpp",
nitro = "nitro",
openai = "openai",
nvidia_triton = "nvidia_triton",
hf_endpoint = "hf_endpoint",
@ -246,7 +250,7 @@ export interface Model {
*/
metadata: ModelMetadata;
/**
* The model engine. Enum: "llamacpp" "openai"
* The model engine.
*/
engine: InferenceEngine;
}