honeyhive 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -47
- package/dist/models/components/configuration.d.ts +17 -73
- package/dist/models/components/configuration.js +22 -115
- package/dist/models/components/createdatapointrequest.d.ts +2 -12
- package/dist/models/components/createdatapointrequest.js +3 -27
- package/dist/models/components/createdatasetrequest.d.ts +1 -6
- package/dist/models/components/createdatasetrequest.js +2 -14
- package/dist/models/components/createeventrequest.d.ts +15 -42
- package/dist/models/components/createeventrequest.js +18 -92
- package/dist/models/components/createprojectrequest.d.ts +0 -5
- package/dist/models/components/createprojectrequest.js +1 -11
- package/dist/models/components/createtoolrequest.d.ts +18 -0
- package/dist/models/components/createtoolrequest.js +70 -0
- package/dist/models/components/datapoint.d.ts +1 -3
- package/dist/models/components/datapoint.js +2 -11
- package/dist/models/components/datasetupdate.d.ts +1 -6
- package/dist/models/components/datasetupdate.js +2 -14
- package/dist/models/components/event.d.ts +7 -42
- package/dist/models/components/event.js +8 -92
- package/dist/models/components/index.d.ts +3 -1
- package/dist/models/components/index.js +3 -1
- package/dist/models/components/metric.d.ts +8 -3
- package/dist/models/components/metric.js +7 -1
- package/dist/models/components/metricedit.d.ts +9 -4
- package/dist/models/components/metricedit.js +7 -1
- package/dist/models/components/project.d.ts +0 -5
- package/dist/models/components/project.js +1 -11
- package/dist/models/components/sessionstartrequest.d.ts +7 -42
- package/dist/models/components/sessionstartrequest.js +8 -92
- package/dist/models/components/tool.d.ts +2 -7
- package/dist/models/components/tool.js +4 -16
- package/dist/models/components/updatedatapointrequest.d.ts +2 -12
- package/dist/models/components/updatedatapointrequest.js +3 -27
- package/dist/models/components/updateprojectrequest.d.ts +6 -0
- package/dist/models/components/updateprojectrequest.js +55 -0
- package/dist/models/components/updatetoolrequest.d.ts +7 -0
- package/dist/models/components/updatetoolrequest.js +60 -0
- package/dist/models/operations/createdataset.d.ts +12 -3
- package/dist/models/operations/createdataset.js +39 -27
- package/dist/models/operations/createevent.d.ts +31 -0
- package/dist/models/operations/createevent.js +115 -0
- package/dist/models/operations/createmetric.d.ts +16 -0
- package/dist/models/operations/createmetric.js +51 -0
- package/dist/models/operations/createtool.d.ts +12 -2
- package/dist/models/operations/createtool.js +31 -10
- package/dist/models/operations/deletedataset.d.ts +4 -11
- package/dist/models/operations/deletedataset.js +3 -24
- package/dist/models/operations/deleteevent.d.ts +20 -0
- package/dist/models/operations/deleteevent.js +67 -0
- package/dist/models/operations/deletemetric.d.ts +19 -0
- package/dist/models/operations/deletemetric.js +63 -0
- package/dist/models/operations/getconfigurations.d.ts +19 -3
- package/dist/models/operations/getconfigurations.js +19 -2
- package/dist/models/operations/getdatapoint.d.ts +7 -1
- package/dist/models/operations/getdatapoint.js +21 -3
- package/dist/models/operations/getdatasets.d.ts +1 -1
- package/dist/models/operations/getdatasets.js +2 -2
- package/dist/models/operations/gettools.d.ts +0 -3
- package/dist/models/operations/gettools.js +1 -15
- package/dist/models/operations/index.d.ts +9 -9
- package/dist/models/operations/index.js +9 -9
- package/dist/models/operations/updatedataset.d.ts +0 -9
- package/dist/models/operations/updatedataset.js +1 -45
- package/dist/models/operations/updateevent.d.ts +23 -0
- package/dist/models/operations/updateevent.js +85 -0
- package/dist/models/operations/updatemetric.d.ts +16 -0
- package/dist/models/operations/updatemetric.js +51 -0
- package/dist/models/operations/updateproject.d.ts +0 -5
- package/dist/models/operations/updateproject.js +0 -28
- package/dist/models/operations/updatetool.d.ts +0 -3
- package/dist/models/operations/updatetool.js +1 -15
- package/dist/sdk/configurations.d.ts +1 -1
- package/dist/sdk/configurations.js +3 -1
- package/dist/sdk/datapoints.js +1 -1
- package/dist/sdk/datasets.d.ts +3 -3
- package/dist/sdk/datasets.js +8 -8
- package/dist/sdk/events.d.ts +3 -3
- package/dist/sdk/events.js +10 -10
- package/dist/sdk/metrics.d.ts +3 -3
- package/dist/sdk/metrics.js +7 -7
- package/dist/sdk/projects.d.ts +1 -1
- package/dist/sdk/projects.js +4 -11
- package/dist/sdk/sdk.js +3 -3
- package/dist/sdk/tools.d.ts +3 -3
- package/dist/sdk/tools.js +50 -22
- package/dist/sdk/tracer.d.ts +18 -1
- package/dist/sdk/tracer.js +176 -16
- package/docs/models/components/configuration.md +10 -8
- package/docs/models/components/createdatapointrequest.md +11 -11
- package/docs/models/components/createdatasetrequest.md +11 -11
- package/docs/models/components/createeventrequest.md +21 -19
- package/docs/models/components/createprojectrequest.md +4 -5
- package/docs/models/components/createtoolrequest.md +12 -0
- package/docs/models/components/createtoolrequesttype.md +9 -0
- package/docs/models/components/datapoint.md +1 -1
- package/docs/models/components/datasetupdate.md +10 -10
- package/docs/models/components/env.md +10 -0
- package/docs/models/components/event.md +21 -21
- package/docs/models/components/metric.md +2 -1
- package/docs/models/components/metricedit.md +3 -2
- package/docs/models/components/metricedittype.md +3 -2
- package/docs/models/components/metrictype.md +3 -2
- package/docs/models/components/project.md +5 -6
- package/docs/models/components/sessionstartrequest.md +18 -18
- package/docs/models/components/tool.md +8 -8
- package/docs/models/components/updatedatapointrequest.md +2 -2
- package/docs/models/components/updateprojectrequest.md +10 -0
- package/docs/models/components/updatetoolrequest.md +11 -0
- package/docs/models/operations/createdatasetresponse.md +11 -0
- package/docs/models/operations/createdatasetresponsebody.md +11 -0
- package/docs/models/operations/{createtoolsecurity.md → createdatasetresult.md} +2 -2
- package/docs/models/operations/{posteventsrequestbody.md → createeventrequestbody.md} +1 -1
- package/docs/models/operations/createeventresponse.md +11 -0
- package/docs/models/operations/{posteventsresponsebody.md → createeventresponsebody.md} +1 -1
- package/docs/models/operations/{postmetricsresponse.md → createmetricresponse.md} +1 -1
- package/docs/models/operations/createtoolresponse.md +6 -5
- package/docs/models/operations/createtoolresponsebody.md +10 -0
- package/docs/models/operations/{postdatasetsresult.md → createtoolresult.md} +1 -1
- package/docs/models/operations/{deletedatasetsrequest.md → deletedatasetrequest.md} +1 -1
- package/docs/models/operations/{deletemetricsresponse.md → deletedatasetresponse.md} +1 -1
- package/docs/models/operations/{deleteeventseventidrequest.md → deleteeventrequest.md} +1 -1
- package/docs/models/operations/{putmetricsresponse.md → deleteeventresponse.md} +1 -1
- package/docs/models/operations/{deletemetricsrequest.md → deletemetricrequest.md} +1 -1
- package/docs/models/operations/{puteventsresponse.md → deletemetricresponse.md} +1 -1
- package/docs/models/operations/env.md +12 -0
- package/docs/models/operations/getconfigurationsrequest.md +6 -4
- package/docs/models/operations/getdatapointresponse.md +6 -6
- package/docs/models/operations/getdatapointresponsebody.md +10 -0
- package/docs/models/operations/getdatasetsresponsebody.md +1 -1
- package/docs/models/operations/typet.md +1 -1
- package/docs/models/operations/updatedatasetresponse.md +10 -0
- package/docs/models/operations/updateeventrequestbody.md +12 -0
- package/docs/models/operations/{putdatasetsresponse.md → updateeventresponse.md} +1 -1
- package/docs/models/operations/updatemetricresponse.md +10 -0
- package/docs/models/operations/updateprojectresponse.md +5 -6
- package/docs/sdks/configurations/README.md +35 -52
- package/docs/sdks/datapoints/README.md +23 -20
- package/docs/sdks/datasets/README.md +25 -21
- package/docs/sdks/events/README.md +59 -37
- package/docs/sdks/metrics/README.md +24 -23
- package/docs/sdks/projects/README.md +11 -15
- package/docs/sdks/session/README.md +28 -14
- package/docs/sdks/tools/README.md +37 -35
- package/package.json +1 -1
- package/docs/models/components/calltype.md +0 -11
- package/docs/models/components/config.md +0 -9
- package/docs/models/components/createdatapointrequestinputs.md +0 -9
- package/docs/models/components/createdatapointrequestmetadata.md +0 -9
- package/docs/models/components/createdatasetrequestmetadata.md +0 -9
- package/docs/models/components/createeventrequestinputs.md +0 -9
- package/docs/models/components/createeventrequestmetadata.md +0 -9
- package/docs/models/components/createeventrequestuserproperties.md +0 -9
- package/docs/models/components/createprojectrequesttype.md +0 -9
- package/docs/models/components/datasetupdatemetadata.md +0 -9
- package/docs/models/components/eventconfig.md +0 -9
- package/docs/models/components/eventfeedback.md +0 -9
- package/docs/models/components/eventinputs.md +0 -9
- package/docs/models/components/eventmetadata.md +0 -9
- package/docs/models/components/eventmetrics.md +0 -9
- package/docs/models/components/eventoutputs.md +0 -9
- package/docs/models/components/eventuserproperties.md +0 -9
- package/docs/models/components/feedback.md +0 -9
- package/docs/models/components/functioncallparams.md +0 -12
- package/docs/models/components/hyperparameters.md +0 -9
- package/docs/models/components/metadata.md +0 -7
- package/docs/models/components/metrics.md +0 -9
- package/docs/models/components/outputs.md +0 -9
- package/docs/models/components/parameterst.md +0 -13
- package/docs/models/components/projecttype.md +0 -9
- package/docs/models/components/selectedfunctions.md +0 -11
- package/docs/models/components/sessionstartrequestconfig.md +0 -9
- package/docs/models/components/sessionstartrequestfeedback.md +0 -9
- package/docs/models/components/sessionstartrequestinputs.md +0 -9
- package/docs/models/components/sessionstartrequestmetadata.md +0 -9
- package/docs/models/components/sessionstartrequestmetrics.md +0 -9
- package/docs/models/components/sessionstartrequestoutputs.md +0 -9
- package/docs/models/components/sessionstartrequestuserproperties.md +0 -9
- package/docs/models/components/toolparameters.md +0 -9
- package/docs/models/components/toolupdate.md +0 -11
- package/docs/models/components/toolupdateparameters.md +0 -7
- package/docs/models/components/updatedatapointrequestinputs.md +0 -9
- package/docs/models/components/updatedatapointrequestmetadata.md +0 -9
- package/docs/models/components/userproperties.md +0 -9
- package/docs/models/operations/deletedatasetsresponse.md +0 -10
- package/docs/models/operations/deleteeventseventidresponse.md +0 -10
- package/docs/models/operations/feedback.md +0 -7
- package/docs/models/operations/gettoolssecurity.md +0 -8
- package/docs/models/operations/metadata.md +0 -7
- package/docs/models/operations/metrics.md +0 -7
- package/docs/models/operations/outputs.md +0 -7
- package/docs/models/operations/postdatasetsresponse.md +0 -11
- package/docs/models/operations/postdatasetsresponsebody.md +0 -11
- package/docs/models/operations/posteventsresponse.md +0 -11
- package/docs/models/operations/puteventsrequestbody.md +0 -12
- package/docs/models/operations/updatetoolsecurity.md +0 -8
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ yarn add https://github.com/honeyhiveai/typescript-sdk
|
|
|
22
22
|
### Example
|
|
23
23
|
|
|
24
24
|
```typescript
|
|
25
|
-
import { HoneyHive } from "
|
|
26
|
-
import { GetConfigurationsRequest, TypeT } from "
|
|
25
|
+
import { HoneyHive } from "honeyhive";
|
|
26
|
+
import { Env, GetConfigurationsRequest, TypeT } from "honeyhive/dist/models/operations";
|
|
27
27
|
|
|
28
28
|
async function run() {
|
|
29
29
|
const sdk = new HoneyHive({
|
|
@@ -31,8 +31,10 @@ async function run() {
|
|
|
31
31
|
});
|
|
32
32
|
const projectName: string = "<value>";
|
|
33
33
|
const type: TypeT = TypeT.Llm;
|
|
34
|
+
const env: Env = Env.Prod;
|
|
35
|
+
const name: string = "<value>";
|
|
34
36
|
|
|
35
|
-
const res = await sdk.configurations.getConfigurations(projectName, type);
|
|
37
|
+
const res = await sdk.configurations.getConfigurations(projectName, type, env, name);
|
|
36
38
|
|
|
37
39
|
if (res.statusCode == 200) {
|
|
38
40
|
// handle response
|
|
@@ -64,23 +66,23 @@ run();
|
|
|
64
66
|
|
|
65
67
|
### [datasets](docs/sdks/datasets/README.md)
|
|
66
68
|
|
|
67
|
-
* [
|
|
69
|
+
* [deleteDataset](docs/sdks/datasets/README.md#deletedataset) - Delete a dataset
|
|
68
70
|
* [getDatasets](docs/sdks/datasets/README.md#getdatasets) - Get datasets
|
|
69
|
-
* [
|
|
70
|
-
* [
|
|
71
|
+
* [createDataset](docs/sdks/datasets/README.md#createdataset) - Create a dataset
|
|
72
|
+
* [updateDataset](docs/sdks/datasets/README.md#updatedataset) - Update a dataset
|
|
71
73
|
|
|
72
74
|
### [events](docs/sdks/events/README.md)
|
|
73
75
|
|
|
74
|
-
* [
|
|
75
|
-
* [
|
|
76
|
-
* [
|
|
76
|
+
* [createEvent](docs/sdks/events/README.md#createevent) - Create a new event
|
|
77
|
+
* [updateEvent](docs/sdks/events/README.md#updateevent) - Update an event
|
|
78
|
+
* [deleteEvent](docs/sdks/events/README.md#deleteevent) - Delete an event
|
|
77
79
|
|
|
78
80
|
### [metrics](docs/sdks/metrics/README.md)
|
|
79
81
|
|
|
80
|
-
* [
|
|
82
|
+
* [deleteMetric](docs/sdks/metrics/README.md#deletemetric) - Delete a metric
|
|
81
83
|
* [getMetrics](docs/sdks/metrics/README.md#getmetrics) - Get all metrics
|
|
82
|
-
* [
|
|
83
|
-
* [
|
|
84
|
+
* [createMetric](docs/sdks/metrics/README.md#createmetric) - Create a new metric
|
|
85
|
+
* [updateMetric](docs/sdks/metrics/README.md#updatemetric) - Update an existing metric
|
|
84
86
|
|
|
85
87
|
### [projects](docs/sdks/projects/README.md)
|
|
86
88
|
|
|
@@ -116,8 +118,8 @@ Handling errors in this SDK should largely match your expectations. All operati
|
|
|
116
118
|
Example
|
|
117
119
|
|
|
118
120
|
```typescript
|
|
119
|
-
import { HoneyHive } from "
|
|
120
|
-
import { GetConfigurationsRequest, TypeT } from "
|
|
121
|
+
import { HoneyHive } from "honeyhive";
|
|
122
|
+
import { Env, GetConfigurationsRequest, TypeT } from "honeyhive/dist/models/operations";
|
|
121
123
|
|
|
122
124
|
async function run() {
|
|
123
125
|
const sdk = new HoneyHive({
|
|
@@ -125,10 +127,12 @@ async function run() {
|
|
|
125
127
|
});
|
|
126
128
|
const projectName: string = "<value>";
|
|
127
129
|
const type: TypeT = TypeT.Llm;
|
|
130
|
+
const env: Env = Env.Prod;
|
|
131
|
+
const name: string = "<value>";
|
|
128
132
|
|
|
129
133
|
let res;
|
|
130
134
|
try {
|
|
131
|
-
res = await sdk.configurations.getConfigurations(projectName, type);
|
|
135
|
+
res = await sdk.configurations.getConfigurations(projectName, type, env, name);
|
|
132
136
|
} catch (err) {
|
|
133
137
|
if (err instanceof errors.SDKError) {
|
|
134
138
|
console.error(err); // handle exception
|
|
@@ -160,8 +164,8 @@ You can override the default server globally by passing a server index to the `s
|
|
|
160
164
|
#### Example
|
|
161
165
|
|
|
162
166
|
```typescript
|
|
163
|
-
import { HoneyHive } from "
|
|
164
|
-
import { GetConfigurationsRequest, TypeT } from "
|
|
167
|
+
import { HoneyHive } from "honeyhive";
|
|
168
|
+
import { Env, GetConfigurationsRequest, TypeT } from "honeyhive/dist/models/operations";
|
|
165
169
|
|
|
166
170
|
async function run() {
|
|
167
171
|
const sdk = new HoneyHive({
|
|
@@ -170,8 +174,10 @@ async function run() {
|
|
|
170
174
|
});
|
|
171
175
|
const projectName: string = "<value>";
|
|
172
176
|
const type: TypeT = TypeT.Llm;
|
|
177
|
+
const env: Env = Env.Prod;
|
|
178
|
+
const name: string = "<value>";
|
|
173
179
|
|
|
174
|
-
const res = await sdk.configurations.getConfigurations(projectName, type);
|
|
180
|
+
const res = await sdk.configurations.getConfigurations(projectName, type, env, name);
|
|
175
181
|
|
|
176
182
|
if (res.statusCode == 200) {
|
|
177
183
|
// handle response
|
|
@@ -187,8 +193,8 @@ run();
|
|
|
187
193
|
|
|
188
194
|
The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:
|
|
189
195
|
```typescript
|
|
190
|
-
import { HoneyHive } from "
|
|
191
|
-
import { GetConfigurationsRequest, TypeT } from "
|
|
196
|
+
import { HoneyHive } from "honeyhive";
|
|
197
|
+
import { Env, GetConfigurationsRequest, TypeT } from "honeyhive/dist/models/operations";
|
|
192
198
|
|
|
193
199
|
async function run() {
|
|
194
200
|
const sdk = new HoneyHive({
|
|
@@ -197,8 +203,10 @@ async function run() {
|
|
|
197
203
|
});
|
|
198
204
|
const projectName: string = "<value>";
|
|
199
205
|
const type: TypeT = TypeT.Llm;
|
|
206
|
+
const env: Env = Env.Prod;
|
|
207
|
+
const name: string = "<value>";
|
|
200
208
|
|
|
201
|
-
const res = await sdk.configurations.getConfigurations(projectName, type);
|
|
209
|
+
const res = await sdk.configurations.getConfigurations(projectName, type, env, name);
|
|
202
210
|
|
|
203
211
|
if (res.statusCode == 200) {
|
|
204
212
|
// handle response
|
|
@@ -218,7 +226,7 @@ The Typescript SDK makes API calls using the [axios](https://axios-http.com/docs
|
|
|
218
226
|
For example, you could specify a header for every request that your sdk makes as follows:
|
|
219
227
|
|
|
220
228
|
```typescript
|
|
221
|
-
import {
|
|
229
|
+
import { honeyhive } from "HoneyHive";
|
|
222
230
|
import axios from "axios";
|
|
223
231
|
|
|
224
232
|
const httpClient = axios.create({
|
|
@@ -242,8 +250,8 @@ This SDK supports the following security scheme globally:
|
|
|
242
250
|
|
|
243
251
|
To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example:
|
|
244
252
|
```typescript
|
|
245
|
-
import { HoneyHive } from "
|
|
246
|
-
import { GetConfigurationsRequest, TypeT } from "
|
|
253
|
+
import { HoneyHive } from "honeyhive";
|
|
254
|
+
import { Env, GetConfigurationsRequest, TypeT } from "honeyhive/dist/models/operations";
|
|
247
255
|
|
|
248
256
|
async function run() {
|
|
249
257
|
const sdk = new HoneyHive({
|
|
@@ -251,30 +259,10 @@ async function run() {
|
|
|
251
259
|
});
|
|
252
260
|
const projectName: string = "<value>";
|
|
253
261
|
const type: TypeT = TypeT.Llm;
|
|
262
|
+
const env: Env = Env.Prod;
|
|
263
|
+
const name: string = "<value>";
|
|
254
264
|
|
|
255
|
-
const res = await sdk.configurations.getConfigurations(projectName, type);
|
|
256
|
-
|
|
257
|
-
if (res.statusCode == 200) {
|
|
258
|
-
// handle response
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
run();
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### Per-Operation Security Schemes
|
|
267
|
-
|
|
268
|
-
Some operations in this SDK require the security scheme to be specified at the request level. For example:
|
|
269
|
-
```typescript
|
|
270
|
-
import { HoneyHive } from "HoneyHive";
|
|
271
|
-
import { GetToolsSecurity } from "HoneyHive/dist/models/operations";
|
|
272
|
-
|
|
273
|
-
async function run() {
|
|
274
|
-
const sdk = new HoneyHive();
|
|
275
|
-
const operationSecurity: GetToolsSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
276
|
-
|
|
277
|
-
const res = await sdk.tools.getTools(operationSecurity);
|
|
265
|
+
const res = await sdk.configurations.getConfigurations(projectName, type, env, name);
|
|
278
266
|
|
|
279
267
|
if (res.statusCode == 200) {
|
|
280
268
|
// handle response
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../internal/utils";
|
|
2
|
+
export declare enum Env {
|
|
3
|
+
Dev = "dev",
|
|
4
|
+
Staging = "staging",
|
|
5
|
+
Prod = "prod"
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Type of the configuration - "LLM" or "pipeline" - "LLM" by default
|
|
4
9
|
*/
|
|
@@ -6,95 +11,34 @@ export declare enum TypeT {
|
|
|
6
11
|
Llm = "LLM",
|
|
7
12
|
Pipeline = "pipeline"
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
* Type of API calling - "chat" or "completion"
|
|
11
|
-
*/
|
|
12
|
-
export declare enum CallType {
|
|
13
|
-
Chat = "chat",
|
|
14
|
-
Completion = "completion"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Model-specific hyperparameters
|
|
18
|
-
*/
|
|
19
|
-
export declare class Hyperparameters extends SpeakeasyBase {
|
|
20
|
-
}
|
|
21
|
-
export declare class SelectedFunctions extends SpeakeasyBase {
|
|
14
|
+
export declare class Configuration extends SpeakeasyBase {
|
|
22
15
|
/**
|
|
23
|
-
*
|
|
16
|
+
* ID of the configuration
|
|
24
17
|
*/
|
|
25
18
|
id?: string;
|
|
26
19
|
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Description of the function
|
|
32
|
-
*/
|
|
33
|
-
description?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Parameters for the function
|
|
36
|
-
*/
|
|
37
|
-
parameters?: Record<string, any>;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Function calling mode - "none", "auto" or "force"
|
|
41
|
-
*/
|
|
42
|
-
export declare enum FunctionCallParams {
|
|
43
|
-
None = "none",
|
|
44
|
-
Auto = "auto",
|
|
45
|
-
Force = "force"
|
|
46
|
-
}
|
|
47
|
-
export declare class ParametersT extends SpeakeasyBase {
|
|
48
|
-
/**
|
|
49
|
-
* Type of API calling - "chat" or "completion"
|
|
50
|
-
*/
|
|
51
|
-
callType: CallType;
|
|
52
|
-
/**
|
|
53
|
-
* Model unique name
|
|
54
|
-
*/
|
|
55
|
-
model: string;
|
|
56
|
-
/**
|
|
57
|
-
* Model-specific hyperparameters
|
|
20
|
+
* List of environments where the configuration is active
|
|
58
21
|
*/
|
|
59
|
-
|
|
22
|
+
env?: Env[];
|
|
60
23
|
/**
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
selectedFunctions?: SelectedFunctions[];
|
|
64
|
-
/**
|
|
65
|
-
* Function calling mode - "none", "auto" or "force"
|
|
66
|
-
*/
|
|
67
|
-
functionCallParams?: FunctionCallParams;
|
|
68
|
-
/**
|
|
69
|
-
* Force function-specific parameters
|
|
24
|
+
* Name of the configuration
|
|
70
25
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Details of user who created the configuration
|
|
75
|
-
*/
|
|
76
|
-
export declare class UserProperties extends SpeakeasyBase {
|
|
77
|
-
}
|
|
78
|
-
export declare class Configuration extends SpeakeasyBase {
|
|
26
|
+
name: string;
|
|
27
|
+
parameters: Record<string, any>;
|
|
79
28
|
/**
|
|
80
29
|
* ID of the project to which this configuration belongs
|
|
81
30
|
*/
|
|
82
31
|
project: string;
|
|
83
|
-
/**
|
|
84
|
-
* Type of the configuration - "LLM" or "pipeline" - "LLM" by default
|
|
85
|
-
*/
|
|
86
|
-
type?: TypeT;
|
|
87
|
-
/**
|
|
88
|
-
* Name of the configuration
|
|
89
|
-
*/
|
|
90
|
-
name: string;
|
|
91
32
|
/**
|
|
92
33
|
* Name of the provider - "openai", "anthropic", etc.
|
|
93
34
|
*/
|
|
94
35
|
provider: string;
|
|
95
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Type of the configuration - "LLM" or "pipeline" - "LLM" by default
|
|
38
|
+
*/
|
|
39
|
+
type: TypeT;
|
|
96
40
|
/**
|
|
97
41
|
* Details of user who created the configuration
|
|
98
42
|
*/
|
|
99
|
-
userProperties?:
|
|
43
|
+
userProperties?: Record<string, any>;
|
|
100
44
|
}
|
|
@@ -27,9 +27,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
27
27
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.Configuration = exports.
|
|
30
|
+
exports.Configuration = exports.TypeT = exports.Env = void 0;
|
|
31
31
|
var utils_1 = require("../../internal/utils");
|
|
32
32
|
var class_transformer_1 = require("class-transformer");
|
|
33
|
+
var Env;
|
|
34
|
+
(function (Env) {
|
|
35
|
+
Env["Dev"] = "dev";
|
|
36
|
+
Env["Staging"] = "staging";
|
|
37
|
+
Env["Prod"] = "prod";
|
|
38
|
+
})(Env = exports.Env || (exports.Env = {}));
|
|
33
39
|
/**
|
|
34
40
|
* Type of the configuration - "LLM" or "pipeline" - "LLM" by default
|
|
35
41
|
*/
|
|
@@ -38,133 +44,36 @@ var TypeT;
|
|
|
38
44
|
TypeT["Llm"] = "LLM";
|
|
39
45
|
TypeT["Pipeline"] = "pipeline";
|
|
40
46
|
})(TypeT = exports.TypeT || (exports.TypeT = {}));
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var CallType;
|
|
45
|
-
(function (CallType) {
|
|
46
|
-
CallType["Chat"] = "chat";
|
|
47
|
-
CallType["Completion"] = "completion";
|
|
48
|
-
})(CallType = exports.CallType || (exports.CallType = {}));
|
|
49
|
-
/**
|
|
50
|
-
* Model-specific hyperparameters
|
|
51
|
-
*/
|
|
52
|
-
var Hyperparameters = /** @class */ (function (_super) {
|
|
53
|
-
__extends(Hyperparameters, _super);
|
|
54
|
-
function Hyperparameters() {
|
|
55
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
56
|
-
}
|
|
57
|
-
return Hyperparameters;
|
|
58
|
-
}(utils_1.SpeakeasyBase));
|
|
59
|
-
exports.Hyperparameters = Hyperparameters;
|
|
60
|
-
var SelectedFunctions = /** @class */ (function (_super) {
|
|
61
|
-
__extends(SelectedFunctions, _super);
|
|
62
|
-
function SelectedFunctions() {
|
|
63
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
-
}
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
67
|
-
(0, class_transformer_1.Expose)({ name: "id" }),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], SelectedFunctions.prototype, "id", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
72
|
-
(0, class_transformer_1.Expose)({ name: "name" }),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], SelectedFunctions.prototype, "name", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
77
|
-
(0, class_transformer_1.Expose)({ name: "description" }),
|
|
78
|
-
__metadata("design:type", String)
|
|
79
|
-
], SelectedFunctions.prototype, "description", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
82
|
-
(0, class_transformer_1.Expose)({ name: "parameters" }),
|
|
83
|
-
__metadata("design:type", Object)
|
|
84
|
-
], SelectedFunctions.prototype, "parameters", void 0);
|
|
85
|
-
return SelectedFunctions;
|
|
86
|
-
}(utils_1.SpeakeasyBase));
|
|
87
|
-
exports.SelectedFunctions = SelectedFunctions;
|
|
88
|
-
/**
|
|
89
|
-
* Function calling mode - "none", "auto" or "force"
|
|
90
|
-
*/
|
|
91
|
-
var FunctionCallParams;
|
|
92
|
-
(function (FunctionCallParams) {
|
|
93
|
-
FunctionCallParams["None"] = "none";
|
|
94
|
-
FunctionCallParams["Auto"] = "auto";
|
|
95
|
-
FunctionCallParams["Force"] = "force";
|
|
96
|
-
})(FunctionCallParams = exports.FunctionCallParams || (exports.FunctionCallParams = {}));
|
|
97
|
-
var ParametersT = /** @class */ (function (_super) {
|
|
98
|
-
__extends(ParametersT, _super);
|
|
99
|
-
function ParametersT() {
|
|
47
|
+
var Configuration = /** @class */ (function (_super) {
|
|
48
|
+
__extends(Configuration, _super);
|
|
49
|
+
function Configuration() {
|
|
100
50
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
101
51
|
}
|
|
102
52
|
__decorate([
|
|
103
53
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
104
|
-
(0, class_transformer_1.Expose)({ name: "
|
|
105
|
-
__metadata("design:type", String)
|
|
106
|
-
], ParametersT.prototype, "callType", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
109
|
-
(0, class_transformer_1.Expose)({ name: "model" }),
|
|
54
|
+
(0, class_transformer_1.Expose)({ name: "_id" }),
|
|
110
55
|
__metadata("design:type", String)
|
|
111
|
-
],
|
|
56
|
+
], Configuration.prototype, "id", void 0);
|
|
112
57
|
__decorate([
|
|
113
58
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
114
|
-
(0, class_transformer_1.Expose)({ name: "
|
|
115
|
-
(0, class_transformer_1.Type)(function () { return Hyperparameters; }),
|
|
116
|
-
__metadata("design:type", Hyperparameters)
|
|
117
|
-
], ParametersT.prototype, "hyperparameters", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, utils_1.SpeakeasyMetadata)({ elemType: SelectedFunctions }),
|
|
120
|
-
(0, class_transformer_1.Expose)({ name: "selectedFunctions" }),
|
|
121
|
-
(0, class_transformer_1.Type)(function () { return SelectedFunctions; }),
|
|
59
|
+
(0, class_transformer_1.Expose)({ name: "env" }),
|
|
122
60
|
__metadata("design:type", Array)
|
|
123
|
-
],
|
|
61
|
+
], Configuration.prototype, "env", void 0);
|
|
124
62
|
__decorate([
|
|
125
63
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
126
|
-
(0, class_transformer_1.Expose)({ name: "
|
|
64
|
+
(0, class_transformer_1.Expose)({ name: "name" }),
|
|
127
65
|
__metadata("design:type", String)
|
|
128
|
-
],
|
|
66
|
+
], Configuration.prototype, "name", void 0);
|
|
129
67
|
__decorate([
|
|
130
68
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
131
|
-
(0, class_transformer_1.Expose)({ name: "
|
|
69
|
+
(0, class_transformer_1.Expose)({ name: "parameters" }),
|
|
132
70
|
__metadata("design:type", Object)
|
|
133
|
-
],
|
|
134
|
-
return ParametersT;
|
|
135
|
-
}(utils_1.SpeakeasyBase));
|
|
136
|
-
exports.ParametersT = ParametersT;
|
|
137
|
-
/**
|
|
138
|
-
* Details of user who created the configuration
|
|
139
|
-
*/
|
|
140
|
-
var UserProperties = /** @class */ (function (_super) {
|
|
141
|
-
__extends(UserProperties, _super);
|
|
142
|
-
function UserProperties() {
|
|
143
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
144
|
-
}
|
|
145
|
-
return UserProperties;
|
|
146
|
-
}(utils_1.SpeakeasyBase));
|
|
147
|
-
exports.UserProperties = UserProperties;
|
|
148
|
-
var Configuration = /** @class */ (function (_super) {
|
|
149
|
-
__extends(Configuration, _super);
|
|
150
|
-
function Configuration() {
|
|
151
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
152
|
-
}
|
|
71
|
+
], Configuration.prototype, "parameters", void 0);
|
|
153
72
|
__decorate([
|
|
154
73
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
155
74
|
(0, class_transformer_1.Expose)({ name: "project" }),
|
|
156
75
|
__metadata("design:type", String)
|
|
157
76
|
], Configuration.prototype, "project", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
160
|
-
(0, class_transformer_1.Expose)({ name: "type" }),
|
|
161
|
-
__metadata("design:type", String)
|
|
162
|
-
], Configuration.prototype, "type", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
(0, utils_1.SpeakeasyMetadata)(),
|
|
165
|
-
(0, class_transformer_1.Expose)({ name: "name" }),
|
|
166
|
-
__metadata("design:type", String)
|
|
167
|
-
], Configuration.prototype, "name", void 0);
|
|
168
77
|
__decorate([
|
|
169
78
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
170
79
|
(0, class_transformer_1.Expose)({ name: "provider" }),
|
|
@@ -172,15 +81,13 @@ var Configuration = /** @class */ (function (_super) {
|
|
|
172
81
|
], Configuration.prototype, "provider", void 0);
|
|
173
82
|
__decorate([
|
|
174
83
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
175
|
-
(0, class_transformer_1.Expose)({ name: "
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
], Configuration.prototype, "parameters", void 0);
|
|
84
|
+
(0, class_transformer_1.Expose)({ name: "type" }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], Configuration.prototype, "type", void 0);
|
|
179
87
|
__decorate([
|
|
180
88
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
181
89
|
(0, class_transformer_1.Expose)({ name: "user_properties" }),
|
|
182
|
-
(
|
|
183
|
-
__metadata("design:type", UserProperties)
|
|
90
|
+
__metadata("design:type", Object)
|
|
184
91
|
], Configuration.prototype, "userProperties", void 0);
|
|
185
92
|
return Configuration;
|
|
186
93
|
}(utils_1.SpeakeasyBase));
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../internal/utils";
|
|
2
|
-
/**
|
|
3
|
-
* Arbitrary JSON object containing the inputs for the datapoint
|
|
4
|
-
*/
|
|
5
|
-
export declare class CreateDatapointRequestInputs extends SpeakeasyBase {
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Any additional metadata for the datapoint
|
|
9
|
-
*/
|
|
10
|
-
export declare class CreateDatapointRequestMetadata extends SpeakeasyBase {
|
|
11
|
-
}
|
|
12
2
|
/**
|
|
13
3
|
* Type of datapoint - "evaluation" or "fine-tuning"
|
|
14
4
|
*/
|
|
@@ -24,7 +14,7 @@ export declare class CreateDatapointRequest extends SpeakeasyBase {
|
|
|
24
14
|
/**
|
|
25
15
|
* Arbitrary JSON object containing the inputs for the datapoint
|
|
26
16
|
*/
|
|
27
|
-
inputs:
|
|
17
|
+
inputs: Record<string, any>;
|
|
28
18
|
/**
|
|
29
19
|
* Ids of all datasets that include the datapoint
|
|
30
20
|
*/
|
|
@@ -40,7 +30,7 @@ export declare class CreateDatapointRequest extends SpeakeasyBase {
|
|
|
40
30
|
/**
|
|
41
31
|
* Any additional metadata for the datapoint
|
|
42
32
|
*/
|
|
43
|
-
metadata?:
|
|
33
|
+
metadata?: Record<string, any>;
|
|
44
34
|
/**
|
|
45
35
|
* UUID for the project to which the datapoint belongs
|
|
46
36
|
*/
|
|
@@ -27,31 +27,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
27
27
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.CreateDatapointRequest = exports.CreateDatapointRequestType =
|
|
30
|
+
exports.CreateDatapointRequest = exports.CreateDatapointRequestType = void 0;
|
|
31
31
|
var utils_1 = require("../../internal/utils");
|
|
32
32
|
var class_transformer_1 = require("class-transformer");
|
|
33
|
-
/**
|
|
34
|
-
* Arbitrary JSON object containing the inputs for the datapoint
|
|
35
|
-
*/
|
|
36
|
-
var CreateDatapointRequestInputs = /** @class */ (function (_super) {
|
|
37
|
-
__extends(CreateDatapointRequestInputs, _super);
|
|
38
|
-
function CreateDatapointRequestInputs() {
|
|
39
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
40
|
-
}
|
|
41
|
-
return CreateDatapointRequestInputs;
|
|
42
|
-
}(utils_1.SpeakeasyBase));
|
|
43
|
-
exports.CreateDatapointRequestInputs = CreateDatapointRequestInputs;
|
|
44
|
-
/**
|
|
45
|
-
* Any additional metadata for the datapoint
|
|
46
|
-
*/
|
|
47
|
-
var CreateDatapointRequestMetadata = /** @class */ (function (_super) {
|
|
48
|
-
__extends(CreateDatapointRequestMetadata, _super);
|
|
49
|
-
function CreateDatapointRequestMetadata() {
|
|
50
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
-
}
|
|
52
|
-
return CreateDatapointRequestMetadata;
|
|
53
|
-
}(utils_1.SpeakeasyBase));
|
|
54
|
-
exports.CreateDatapointRequestMetadata = CreateDatapointRequestMetadata;
|
|
55
33
|
/**
|
|
56
34
|
* Type of datapoint - "evaluation" or "fine-tuning"
|
|
57
35
|
*/
|
|
@@ -73,8 +51,7 @@ var CreateDatapointRequest = /** @class */ (function (_super) {
|
|
|
73
51
|
__decorate([
|
|
74
52
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
75
53
|
(0, class_transformer_1.Expose)({ name: "inputs" }),
|
|
76
|
-
(
|
|
77
|
-
__metadata("design:type", CreateDatapointRequestInputs)
|
|
54
|
+
__metadata("design:type", Object)
|
|
78
55
|
], CreateDatapointRequest.prototype, "inputs", void 0);
|
|
79
56
|
__decorate([
|
|
80
57
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
@@ -94,8 +71,7 @@ var CreateDatapointRequest = /** @class */ (function (_super) {
|
|
|
94
71
|
__decorate([
|
|
95
72
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
96
73
|
(0, class_transformer_1.Expose)({ name: "metadata" }),
|
|
97
|
-
(
|
|
98
|
-
__metadata("design:type", CreateDatapointRequestMetadata)
|
|
74
|
+
__metadata("design:type", Object)
|
|
99
75
|
], CreateDatapointRequest.prototype, "metadata", void 0);
|
|
100
76
|
__decorate([
|
|
101
77
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../internal/utils";
|
|
2
|
-
/**
|
|
3
|
-
* Any helpful metadata to track for the dataset
|
|
4
|
-
*/
|
|
5
|
-
export declare class CreateDatasetRequestMetadata extends SpeakeasyBase {
|
|
6
|
-
}
|
|
7
2
|
/**
|
|
8
3
|
* The type of data included in the dataset - "event" or "session"
|
|
9
4
|
*/
|
|
@@ -31,7 +26,7 @@ export declare class CreateDatasetRequest extends SpeakeasyBase {
|
|
|
31
26
|
/**
|
|
32
27
|
* Any helpful metadata to track for the dataset
|
|
33
28
|
*/
|
|
34
|
-
metadata?:
|
|
29
|
+
metadata?: Record<string, any>;
|
|
35
30
|
name: string;
|
|
36
31
|
/**
|
|
37
32
|
* The type of data included in the dataset - "event" or "session"
|
|
@@ -27,20 +27,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
27
27
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.CreateDatasetRequest = exports.CreateDatasetRequestType = exports.PipelineType =
|
|
30
|
+
exports.CreateDatasetRequest = exports.CreateDatasetRequestType = exports.PipelineType = void 0;
|
|
31
31
|
var utils_1 = require("../../internal/utils");
|
|
32
32
|
var class_transformer_1 = require("class-transformer");
|
|
33
|
-
/**
|
|
34
|
-
* Any helpful metadata to track for the dataset
|
|
35
|
-
*/
|
|
36
|
-
var CreateDatasetRequestMetadata = /** @class */ (function (_super) {
|
|
37
|
-
__extends(CreateDatasetRequestMetadata, _super);
|
|
38
|
-
function CreateDatasetRequestMetadata() {
|
|
39
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
40
|
-
}
|
|
41
|
-
return CreateDatasetRequestMetadata;
|
|
42
|
-
}(utils_1.SpeakeasyBase));
|
|
43
|
-
exports.CreateDatasetRequestMetadata = CreateDatasetRequestMetadata;
|
|
44
33
|
/**
|
|
45
34
|
* The type of data included in the dataset - "event" or "session"
|
|
46
35
|
*/
|
|
@@ -80,8 +69,7 @@ var CreateDatasetRequest = /** @class */ (function (_super) {
|
|
|
80
69
|
__decorate([
|
|
81
70
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
82
71
|
(0, class_transformer_1.Expose)({ name: "metadata" }),
|
|
83
|
-
(
|
|
84
|
-
__metadata("design:type", CreateDatasetRequestMetadata)
|
|
72
|
+
__metadata("design:type", Object)
|
|
85
73
|
], CreateDatasetRequest.prototype, "metadata", void 0);
|
|
86
74
|
__decorate([
|
|
87
75
|
(0, utils_1.SpeakeasyMetadata)(),
|