-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathjobs.ts
35 lines (31 loc) · 1.05 KB
/
jobs.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as EvalAPI from './eval';
export class Jobs extends APIResource {
/**
* Get the result of a job.
*/
retrieve(
benchmarkId: string,
jobId: string,
options?: Core.RequestOptions,
): Core.APIPromise<EvalAPI.EvaluateResponse> {
return this._client.get(`/v1/eval/benchmarks/${benchmarkId}/jobs/${jobId}/result`, options);
}
/**
* Cancel a job.
*/
cancel(benchmarkId: string, jobId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/v1/eval/benchmarks/${benchmarkId}/jobs/${jobId}`, {
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}
/**
* Get the status of a job.
*/
status(benchmarkId: string, jobId: string, options?: Core.RequestOptions): Core.APIPromise<EvalAPI.Job> {
return this._client.get(`/v1/eval/benchmarks/${benchmarkId}/jobs/${jobId}`, options);
}
}