remove override from localOAIEngine and OAIEngine

This commit is contained in:
Akarshan Biswas 2025-05-20 13:04:06 +05:30 committed by Louis
parent 0e9a8a27e5
commit ee2cb9e625
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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()
} }