P9
This commit is contained in:
@@ -121,7 +121,7 @@ export async function cancelQvacRequest({ requestId, modelId, kind } = {}) {
|
||||
if (!requestId && !modelId) throw new Error('requestId or modelId is required');
|
||||
const sdk = await Agent.engine.ensureInit();
|
||||
if (typeof sdk.cancel !== 'function') throw new Error('QVAC runtime does not expose cancel()');
|
||||
await sdk.cancel(requestId ? { requestId } : { modelId, kind });
|
||||
await withQvacMaster(() => sdk.cancel(requestId ? { requestId } : { modelId, kind }));
|
||||
}
|
||||
|
||||
export async function suspendQvac() {
|
||||
@@ -142,12 +142,12 @@ export async function qvacRuntimeState() {
|
||||
return sdk.state();
|
||||
}
|
||||
|
||||
const MASTER_CALLS = new Set(['assessModelFit', 'getSystemResources', 'state', 'heartbeat', 'downloadAsset']);
|
||||
const MASTER_CALLS = new Set(['assessModelFit', 'getSystemResources', 'state', 'heartbeat', 'downloadAsset', 'cancel', 'embed', 'batchCompletion', 'ragIngest', 'ragChunk', 'ragSaveEmbeddings', 'ragSearch', 'ragReindex', 'ragDeleteEmbeddings', 'ragListWorkspaces', 'ragCloseWorkspace', 'ragDeleteWorkspace', 'translate', 'ocr', 'classify', 'diffusion', 'video', 'audioGen', 'transcribe', 'textToSpeech', 'finetune', 'bciTranscribe', 'vla', 'worldCreateScene', 'worldStep', 'modelRegistryList', 'modelRegistrySearch', 'modelRegistryGetModel']);
|
||||
export async function callQvac(method, input) {
|
||||
if (!MASTER_CALLS.has(method)) throw new Error(`QVAC method is not exposed through the master: ${method}`);
|
||||
const sdk = await Agent.engine.ensureInit();
|
||||
if (typeof sdk[method] !== 'function') throw new Error(`QVAC SDK does not expose ${method}()`);
|
||||
return input === undefined ? sdk[method]() : sdk[method](input);
|
||||
return withQvacMaster(() => input === undefined ? sdk[method]() : Array.isArray(input) ? sdk[method](...input) : sdk[method](input));
|
||||
}
|
||||
|
||||
export function qvacStatus() {
|
||||
|
||||
Reference in New Issue
Block a user