add batchIndex and finished args
This commit is contained in:
Родитель
80b3a6ba98
Коммит
2ac9a57719
|
@ -13,10 +13,13 @@ export interface ModelRequest {
|
|||
mode: AutomodelMode;
|
||||
// Base64-encoded GZIP-compressed SARIF log
|
||||
candidates: string;
|
||||
// The index of the batch of sources/sinks to model, starting from 0
|
||||
batchIndex: number;
|
||||
}
|
||||
|
||||
export interface ModelResponse {
|
||||
models: string;
|
||||
finished: boolean;
|
||||
}
|
||||
|
||||
export async function autoModel(
|
||||
|
|
|
@ -21,6 +21,7 @@ export async function encodeSarif(log: Log): Promise<string> {
|
|||
export async function createAutoModelRequest(
|
||||
mode: Mode,
|
||||
result: AutoModelQueriesResult,
|
||||
batchIndex: number,
|
||||
): Promise<ModelRequest> {
|
||||
let requestMode: AutomodelMode;
|
||||
switch (mode) {
|
||||
|
@ -37,5 +38,6 @@ export async function createAutoModelRequest(
|
|||
return {
|
||||
mode: requestMode,
|
||||
candidates: await encodeSarif(result.candidates),
|
||||
batchIndex,
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче