mkdir before write yaml

This commit is contained in:
Thien Tran 2025-05-30 15:37:41 +08:00 committed by Louis
parent 1ae7c0b59a
commit 6679debf72
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -359,6 +359,7 @@ export default class llamacpp_extension extends AIEngine {
name: modelId, name: modelId,
size_bytes, size_bytes,
} as ModelConfig } as ModelConfig
await fs.mkdir(await joinPath([janDataFolderPath, modelDir]))
await invoke<void>('write_yaml', { await invoke<void>('write_yaml', {
data: modelConfig, data: modelConfig,
savePath: `${modelDir}/model.yml`, savePath: `${modelDir}/model.yml`,