-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.ts
More file actions
90 lines (68 loc) · 2.73 KB
/
Client.ts
File metadata and controls
90 lines (68 loc) · 2.73 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "./environments";
import * as core from "./core";
import { Prompts } from "./api/resources/prompts/client/Client";
import { Tools } from "./api/resources/tools/client/Client";
import { Datasets } from "./api/resources/datasets/client/Client";
import { Evaluators } from "./api/resources/evaluators/client/Client";
import { Flows } from "./api/resources/flows/client/Client";
import { Directories } from "./api/resources/directories/client/Client";
import { Files } from "./api/resources/files/client/Client";
import { Evaluations } from "./api/resources/evaluations/client/Client";
import { Logs } from "./api/resources/logs/client/Client";
export declare namespace HumanloopClient {
interface Options {
environment?: core.Supplier<environments.HumanloopEnvironment | string>;
apiKey: core.Supplier<string>;
fetcher?: core.FetchFunction;
}
interface RequestOptions {
/** The maximum time to wait for a response in seconds. */
timeoutInSeconds?: number;
/** The number of times to retry the request. Defaults to 2. */
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
}
}
export class HumanloopClient {
constructor(protected readonly _options: HumanloopClient.Options) {}
protected _prompts: Prompts | undefined;
public get prompts(): Prompts {
return (this._prompts ??= new Prompts(this._options));
}
protected _tools: Tools | undefined;
public get tools(): Tools {
return (this._tools ??= new Tools(this._options));
}
protected _datasets: Datasets | undefined;
public get datasets(): Datasets {
return (this._datasets ??= new Datasets(this._options));
}
protected _evaluators: Evaluators | undefined;
public get evaluators(): Evaluators {
return (this._evaluators ??= new Evaluators(this._options));
}
protected _flows: Flows | undefined;
public get flows(): Flows {
return (this._flows ??= new Flows(this._options));
}
protected _directories: Directories | undefined;
public get directories(): Directories {
return (this._directories ??= new Directories(this._options));
}
protected _files: Files | undefined;
public get files(): Files {
return (this._files ??= new Files(this._options));
}
protected _evaluations: Evaluations | undefined;
public get evaluations(): Evaluations {
return (this._evaluations ??= new Evaluations(this._options));
}
protected _logs: Logs | undefined;
public get logs(): Logs {
return (this._logs ??= new Logs(this._options));
}
}