remove override from localOAIEngine and OAIEngine
This commit is contained in:
parent
0e9a8a27e5
commit
ee2cb9e625
@ -29,7 +29,7 @@ export abstract class LocalOAIEngine extends OAIEngine {
|
|||||||
/**
|
/**
|
||||||
* Load the model.
|
* Load the model.
|
||||||
*/
|
*/
|
||||||
override async loadModel(model: Model & { file_path?: string }, abortController?: AbortController): Promise<void> {
|
async loadModel(model: Model & { file_path?: string }): Promise<void> {
|
||||||
if (model.engine.toString() !== this.provider) return
|
if (model.engine.toString() !== this.provider) return
|
||||||
const modelFolder = 'file_path' in model && model.file_path ? await dirName(model.file_path) : await this.getModelFilePath(model.id)
|
const modelFolder = 'file_path' in model && model.file_path ? await dirName(model.file_path) : await this.getModelFilePath(model.id)
|
||||||
const systemInfo = await systemInformation()
|
const systemInfo = await systemInformation()
|
||||||
@ -55,7 +55,7 @@ export abstract class LocalOAIEngine extends OAIEngine {
|
|||||||
/**
|
/**
|
||||||
* Stops the model.
|
* Stops the model.
|
||||||
*/
|
*/
|
||||||
override async unloadModel(model?: Model) {
|
async unloadModel(model?: Model) {
|
||||||
if (model?.engine && model.engine?.toString() !== this.provider) return Promise.resolve()
|
if (model?.engine && model.engine?.toString() !== this.provider) return Promise.resolve()
|
||||||
|
|
||||||
this.loadedModel = undefined
|
this.loadedModel = undefined
|
||||||
|
|||||||
@ -44,10 +44,12 @@ export abstract class OAIEngine extends AIEngine {
|
|||||||
*/
|
*/
|
||||||
override onUnload(): void {}
|
override onUnload(): void {}
|
||||||
|
|
||||||
|
inference(data: MessageRequest) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the inference.
|
* Stops the inference.
|
||||||
*/
|
*/
|
||||||
override stopInference() {
|
stopInference() {
|
||||||
this.isCancelled = true
|
this.isCancelled = true
|
||||||
this.controller?.abort()
|
this.controller?.abort()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user