chore: queue server start and model load
This commit is contained in:
parent
e41bcffcef
commit
ced44973b8
@ -11,7 +11,6 @@ import {
|
|||||||
executeOnMain,
|
executeOnMain,
|
||||||
systemInformation,
|
systemInformation,
|
||||||
joinPath,
|
joinPath,
|
||||||
dirName,
|
|
||||||
LocalOAIEngine,
|
LocalOAIEngine,
|
||||||
InferenceEngine,
|
InferenceEngine,
|
||||||
getJanDataFolderPath,
|
getJanDataFolderPath,
|
||||||
@ -97,7 +96,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
|
|||||||
model.settings = settings
|
model.settings = settings
|
||||||
}
|
}
|
||||||
|
|
||||||
return await ky
|
return await this.queue.add(() => ky
|
||||||
.post(`${CORTEX_API_URL}/v1/models/start`, {
|
.post(`${CORTEX_API_URL}/v1/models/start`, {
|
||||||
json: {
|
json: {
|
||||||
...extractModelLoadParams(model.settings),
|
...extractModelLoadParams(model.settings),
|
||||||
@ -112,7 +111,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
|
|||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
throw (await e.response?.json()) ?? e
|
throw (await e.response?.json()) ?? e
|
||||||
})
|
})
|
||||||
.then()
|
.then())
|
||||||
}
|
}
|
||||||
|
|
||||||
override async unloadModel(model: Model): Promise<void> {
|
override async unloadModel(model: Model): Promise<void> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user