-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsynthetic-data-generation.ts
42 lines (34 loc) · 1.34 KB
/
synthetic-data-generation.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 Shared from './shared';
export class SyntheticDataGeneration extends APIResource {
generate(
body: SyntheticDataGenerationGenerateParams,
options?: Core.RequestOptions,
): Core.APIPromise<SyntheticDataGenerationResponse> {
return this._client.post('/v1/synthetic-data-generation/generate', { body, ...options });
}
}
/**
* Response from the synthetic data generation. Batch of (prompt, response, score)
* tuples that pass the threshold.
*/
export interface SyntheticDataGenerationResponse {
synthetic_data: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
statistics?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
}
export interface SyntheticDataGenerationGenerateParams {
dialogs: Array<Shared.Message>;
/**
* The type of filtering function.
*/
filtering_function: 'none' | 'random' | 'top_k' | 'top_p' | 'top_k_top_p' | 'sigmoid';
model?: string;
}
export declare namespace SyntheticDataGeneration {
export {
type SyntheticDataGenerationResponse as SyntheticDataGenerationResponse,
type SyntheticDataGenerationGenerateParams as SyntheticDataGenerationGenerateParams,
};
}