-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathquestion-answering.ts
42 lines (37 loc) · 1.24 KB
/
question-answering.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
36
37
38
39
40
41
42
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as QuestionAnsweringAPI from './question-answering';
import * as EvaluateAPI from './evaluate';
export class QuestionAnswering extends APIResource {
create(
params: QuestionAnsweringCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<EvaluateAPI.EvaluationJob> {
const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData, ...body } = params;
return this._client.post('/evaluate/question_answering/', {
body,
...options,
headers: {
...(xLlamaStackProviderData != null ?
{ 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
: undefined),
...options?.headers,
},
});
}
}
export interface QuestionAnsweringCreateParams {
/**
* Body param:
*/
metrics: Array<'em' | 'f1'>;
/**
* Header param: JSON-encoded provider data which will be made available to the
* adapter servicing the API
*/
'X-LlamaStack-ProviderData'?: string;
}
export namespace QuestionAnswering {
export import QuestionAnsweringCreateParams = QuestionAnsweringAPI.QuestionAnsweringCreateParams;
}