@gpt-platform/client 0.10.4 → 0.11.0

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.
Files changed (155) hide show
  1. package/dist/_internal/client/client.gen.d.ts +3 -0
  2. package/dist/_internal/client/client.gen.d.ts.map +1 -0
  3. package/dist/_internal/client/index.d.ts +9 -0
  4. package/dist/_internal/client/index.d.ts.map +1 -0
  5. package/dist/_internal/client/types.gen.d.ts +118 -0
  6. package/dist/_internal/client/types.gen.d.ts.map +1 -0
  7. package/dist/_internal/client/utils.gen.d.ts +34 -0
  8. package/dist/_internal/client/utils.gen.d.ts.map +1 -0
  9. package/dist/_internal/client.gen.d.ts +13 -0
  10. package/dist/_internal/client.gen.d.ts.map +1 -0
  11. package/dist/_internal/core/auth.gen.d.ts +19 -0
  12. package/dist/_internal/core/auth.gen.d.ts.map +1 -0
  13. package/dist/_internal/core/bodySerializer.gen.d.ts +26 -0
  14. package/dist/_internal/core/bodySerializer.gen.d.ts.map +1 -0
  15. package/dist/_internal/core/params.gen.d.ts +44 -0
  16. package/dist/_internal/core/params.gen.d.ts.map +1 -0
  17. package/dist/_internal/core/pathSerializer.gen.d.ts +34 -0
  18. package/dist/_internal/core/pathSerializer.gen.d.ts.map +1 -0
  19. package/dist/_internal/core/queryKeySerializer.gen.d.ts +19 -0
  20. package/dist/_internal/core/queryKeySerializer.gen.d.ts.map +1 -0
  21. package/dist/_internal/core/serverSentEvents.gen.d.ts +72 -0
  22. package/dist/_internal/core/serverSentEvents.gen.d.ts.map +1 -0
  23. package/dist/_internal/core/types.gen.d.ts +79 -0
  24. package/dist/_internal/core/types.gen.d.ts.map +1 -0
  25. package/dist/_internal/core/utils.gen.d.ts +20 -0
  26. package/dist/_internal/core/utils.gen.d.ts.map +1 -0
  27. package/dist/_internal/index.d.ts +3 -0
  28. package/dist/_internal/index.d.ts.map +1 -0
  29. package/dist/_internal/sdk.gen.d.ts +7053 -0
  30. package/dist/_internal/sdk.gen.d.ts.map +1 -0
  31. package/dist/_internal/types.gen.d.ts +146633 -0
  32. package/dist/_internal/types.gen.d.ts.map +1 -0
  33. package/dist/base-client.d.ts +199 -0
  34. package/dist/base-client.d.ts.map +1 -0
  35. package/dist/errors/index.d.ts +128 -0
  36. package/dist/errors/index.d.ts.map +1 -0
  37. package/dist/events.d.ts +69 -0
  38. package/dist/events.d.ts.map +1 -0
  39. package/dist/execution-events.d.ts +95 -0
  40. package/dist/execution-events.d.ts.map +1 -0
  41. package/dist/gpt-client.d.ts +2175 -0
  42. package/dist/gpt-client.d.ts.map +1 -0
  43. package/dist/index.d.ts +51 -30308
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +775 -14
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +775 -14
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/json-api.d.ts +26 -0
  50. package/dist/json-api.d.ts.map +1 -0
  51. package/dist/logging.d.ts +22 -0
  52. package/dist/logging.d.ts.map +1 -0
  53. package/dist/namespace-types.d.ts +79 -0
  54. package/dist/namespace-types.d.ts.map +1 -0
  55. package/dist/namespaces/access-grants.d.ts +71 -0
  56. package/dist/namespaces/access-grants.d.ts.map +1 -0
  57. package/dist/namespaces/agents.d.ts +1406 -0
  58. package/dist/namespaces/agents.d.ts.map +1 -0
  59. package/dist/namespaces/ai.d.ts +407 -0
  60. package/dist/namespaces/ai.d.ts.map +1 -0
  61. package/dist/namespaces/audit.d.ts +83 -0
  62. package/dist/namespaces/audit.d.ts.map +1 -0
  63. package/dist/namespaces/billing.d.ts +854 -0
  64. package/dist/namespaces/billing.d.ts.map +1 -0
  65. package/dist/namespaces/campaigns.d.ts +973 -0
  66. package/dist/namespaces/campaigns.d.ts.map +1 -0
  67. package/dist/namespaces/catalog.d.ts +964 -0
  68. package/dist/namespaces/catalog.d.ts.map +1 -0
  69. package/dist/namespaces/channels.d.ts +162 -0
  70. package/dist/namespaces/channels.d.ts.map +1 -0
  71. package/dist/namespaces/clinical.d.ts +2443 -0
  72. package/dist/namespaces/clinical.d.ts.map +1 -0
  73. package/dist/namespaces/communication.d.ts +439 -0
  74. package/dist/namespaces/communication.d.ts.map +1 -0
  75. package/dist/namespaces/compliance.d.ts +2310 -0
  76. package/dist/namespaces/compliance.d.ts.map +1 -0
  77. package/dist/namespaces/connectors.d.ts +1368 -0
  78. package/dist/namespaces/connectors.d.ts.map +1 -0
  79. package/dist/namespaces/content.d.ts +188 -0
  80. package/dist/namespaces/content.d.ts.map +1 -0
  81. package/dist/namespaces/crawler.d.ts +408 -0
  82. package/dist/namespaces/crawler.d.ts.map +1 -0
  83. package/dist/namespaces/crm-clusters.d.ts +31 -0
  84. package/dist/namespaces/crm-clusters.d.ts.map +1 -0
  85. package/dist/namespaces/crm.d.ts +1539 -0
  86. package/dist/namespaces/crm.d.ts.map +1 -0
  87. package/dist/namespaces/documents.d.ts +136 -0
  88. package/dist/namespaces/documents.d.ts.map +1 -0
  89. package/dist/namespaces/email.d.ts +550 -0
  90. package/dist/namespaces/email.d.ts.map +1 -0
  91. package/dist/namespaces/extraction.d.ts +1249 -0
  92. package/dist/namespaces/extraction.d.ts.map +1 -0
  93. package/dist/namespaces/identity.d.ts +411 -0
  94. package/dist/namespaces/identity.d.ts.map +1 -0
  95. package/dist/namespaces/imports.d.ts +177 -0
  96. package/dist/namespaces/imports.d.ts.map +1 -0
  97. package/dist/namespaces/index.d.ts +119 -0
  98. package/dist/namespaces/index.d.ts.map +1 -0
  99. package/dist/namespaces/memory.d.ts +105 -0
  100. package/dist/namespaces/memory.d.ts.map +1 -0
  101. package/dist/namespaces/models.d.ts +75 -0
  102. package/dist/namespaces/models.d.ts.map +1 -0
  103. package/dist/namespaces/permissions.d.ts +75 -0
  104. package/dist/namespaces/permissions.d.ts.map +1 -0
  105. package/dist/namespaces/pipeline-executions.d.ts +130 -0
  106. package/dist/namespaces/pipeline-executions.d.ts.map +1 -0
  107. package/dist/namespaces/pipelines.d.ts +120 -0
  108. package/dist/namespaces/pipelines.d.ts.map +1 -0
  109. package/dist/namespaces/platform.d.ts +1430 -0
  110. package/dist/namespaces/platform.d.ts.map +1 -0
  111. package/dist/namespaces/portal.d.ts +198 -0
  112. package/dist/namespaces/portal.d.ts.map +1 -0
  113. package/dist/namespaces/projects.d.ts +553 -0
  114. package/dist/namespaces/projects.d.ts.map +1 -0
  115. package/dist/namespaces/roles.d.ts +65 -0
  116. package/dist/namespaces/roles.d.ts.map +1 -0
  117. package/dist/namespaces/scheduling.d.ts +944 -0
  118. package/dist/namespaces/scheduling.d.ts.map +1 -0
  119. package/dist/namespaces/search.d.ts +224 -0
  120. package/dist/namespaces/search.d.ts.map +1 -0
  121. package/dist/namespaces/session-notes.d.ts +67 -0
  122. package/dist/namespaces/session-notes.d.ts.map +1 -0
  123. package/dist/namespaces/social.d.ts +330 -0
  124. package/dist/namespaces/social.d.ts.map +1 -0
  125. package/dist/namespaces/storage.d.ts +378 -0
  126. package/dist/namespaces/storage.d.ts.map +1 -0
  127. package/dist/namespaces/support.d.ts +427 -0
  128. package/dist/namespaces/support.d.ts.map +1 -0
  129. package/dist/namespaces/threads.d.ts +596 -0
  130. package/dist/namespaces/threads.d.ts.map +1 -0
  131. package/dist/namespaces/training.d.ts +358 -0
  132. package/dist/namespaces/training.d.ts.map +1 -0
  133. package/dist/namespaces/voice.d.ts +752 -0
  134. package/dist/namespaces/voice.d.ts.map +1 -0
  135. package/dist/namespaces/watcher.d.ts +425 -0
  136. package/dist/namespaces/watcher.d.ts.map +1 -0
  137. package/dist/namespaces/webhooks-ns.d.ts +3 -0
  138. package/dist/namespaces/webhooks-ns.d.ts.map +1 -0
  139. package/dist/pagination.d.ts +57 -0
  140. package/dist/pagination.d.ts.map +1 -0
  141. package/dist/request-builder.d.ts +95 -0
  142. package/dist/request-builder.d.ts.map +1 -0
  143. package/dist/security.d.ts +32 -0
  144. package/dist/security.d.ts.map +1 -0
  145. package/dist/streaming.d.ts +135 -0
  146. package/dist/streaming.d.ts.map +1 -0
  147. package/dist/utils/retry.d.ts +63 -0
  148. package/dist/utils/retry.d.ts.map +1 -0
  149. package/dist/version.d.ts +5 -0
  150. package/dist/version.d.ts.map +1 -0
  151. package/dist/webhook-signature.d.ts +109 -0
  152. package/dist/webhook-signature.d.ts.map +1 -0
  153. package/llms.txt +40 -1
  154. package/package.json +286 -36
  155. package/dist/index.d.mts +0 -30308
@@ -0,0 +1,358 @@
1
+ import type { TrainingExample, TrainingSession } from "../_internal/types.gen";
2
+ /** Attributes accepted when creating a new training example. */
3
+ export type CreateTrainingExampleAttributes = {
4
+ agent_id?: string;
5
+ input?: string;
6
+ output?: string;
7
+ label?: string;
8
+ [key: string]: unknown;
9
+ };
10
+ /** Attributes accepted when updating a training example (PATCH semantics). */
11
+ export type UpdateTrainingExampleAttributes = {
12
+ input?: string;
13
+ output?: string;
14
+ label?: string;
15
+ [key: string]: unknown;
16
+ };
17
+ /** Attributes accepted when creating a new training session. */
18
+ export type CreateTrainingSessionAttributes = {
19
+ agent_id: string;
20
+ model?: string;
21
+ epochs?: number;
22
+ [key: string]: unknown;
23
+ };
24
+ /** Attributes accepted when updating a training session (PATCH semantics). */
25
+ export type UpdateTrainingSessionAttributes = {
26
+ notes?: string;
27
+ [key: string]: unknown;
28
+ };
29
+ import type { RequestOptions } from "../base-client";
30
+ import { RequestBuilder } from "../request-builder";
31
+ /**
32
+ * Creates the `training` namespace, providing methods for managing training
33
+ * examples and training sessions across the workspace.
34
+ *
35
+ * Training examples are labeled input/output pairs used to teach agents how to
36
+ * respond correctly. Training sessions are batch fine-tuning or in-context
37
+ * learning runs that consume a set of examples and update an agent's behavior.
38
+ *
39
+ * This namespace surfaces workspace-level access to both resources. For
40
+ * agent-scoped training operations (e.g. examples belonging to a specific agent),
41
+ * see `client.agents.training` instead.
42
+ *
43
+ * @param rb - The `RequestBuilder` instance bound to the authenticated client.
44
+ * @returns An object containing the `examples` and `sessions` sub-namespaces.
45
+ *
46
+ * @example
47
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
48
+ * const examples = await client.training.examples.listAll();
49
+ * console.log(`Workspace training examples: ${examples.length}`);
50
+ */
51
+ export declare function createTrainingNamespace(rb: RequestBuilder): {
52
+ /**
53
+ * Sub-namespace for managing individual training examples.
54
+ *
55
+ * Training examples are the raw labeled data that drives agent learning.
56
+ * Each example pairs an `input` (what the user or document provides) with
57
+ * an expected `output` (what the agent should produce). High-quality,
58
+ * diverse examples improve consistency and accuracy.
59
+ *
60
+ * @example
61
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
62
+ * const example = await client.training.examples.create({
63
+ * agent_id: 'agt_01HXYZ...',
64
+ * input: 'What is the due date?',
65
+ * output: '2026-04-15',
66
+ * });
67
+ */
68
+ examples: {
69
+ /**
70
+ * Permanently deletes a training example by its ID.
71
+ *
72
+ * This action is irreversible. The example will be removed from the agent's
73
+ * training dataset and will not be included in any future teach or fine-tune
74
+ * runs. Examples already incorporated into a completed training session are
75
+ * not retroactively affected.
76
+ *
77
+ * @param id - The UUID of the training example to delete.
78
+ * @param options - Optional request options.
79
+ * @returns A promise that resolves to `true` on successful deletion.
80
+ *
81
+ * @example
82
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
83
+ * await client.training.examples.delete('tex_01HXYZ...');
84
+ */
85
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
86
+ /**
87
+ * Lists training examples in the workspace with optional pagination controls.
88
+ *
89
+ * Returns a single page of examples. Use {@link listAll} to fetch every
90
+ * example across all pages automatically.
91
+ *
92
+ * @param options - Optional pagination and request options.
93
+ * @param options.page - The page number to fetch (1-based). Defaults to 1.
94
+ * @param options.pageSize - Number of examples per page. Defaults to the server default.
95
+ * @returns A promise that resolves to an array of `TrainingExample` objects.
96
+ *
97
+ * @example
98
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
99
+ * const page1 = await client.training.examples.list({ page: 1, pageSize: 25 });
100
+ */
101
+ list: (options?: {
102
+ page?: number;
103
+ pageSize?: number;
104
+ } & RequestOptions) => Promise<TrainingExample[]>;
105
+ /**
106
+ * Fetches all training examples in the workspace by transparently paginating
107
+ * through every page until exhausted.
108
+ *
109
+ * This is a convenience wrapper that handles cursor/page management
110
+ * automatically. For large datasets, prefer {@link list} with explicit
111
+ * pagination to control memory usage.
112
+ *
113
+ * @param options - Optional request options.
114
+ * @returns A promise that resolves to a flat array of all `TrainingExample` objects.
115
+ *
116
+ * @example
117
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
118
+ * const allExamples = await client.training.examples.listAll();
119
+ * console.log(`Total examples: ${allExamples.length}`);
120
+ */
121
+ listAll: (options?: RequestOptions) => Promise<TrainingExample[]>;
122
+ /**
123
+ * Fetches a single training example by its ID.
124
+ *
125
+ * @param id - The UUID of the training example to retrieve.
126
+ * @param options - Optional request options.
127
+ * @returns A promise that resolves to the full `TrainingExample` object.
128
+ *
129
+ * @example
130
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
131
+ * const example = await client.training.examples.get('tex_01HXYZ...');
132
+ * console.log(`Input: ${example.attributes.input}`);
133
+ * console.log(`Expected output: ${example.attributes.output}`);
134
+ */
135
+ get: (id: string, options?: RequestOptions) => Promise<TrainingExample>;
136
+ /**
137
+ * Creates a new training example for an agent.
138
+ *
139
+ * Provide at minimum `agent_id`, `input`, and `output`. Additional
140
+ * metadata fields such as `label`, `weight`, `source_document_id`, or
141
+ * `notes` may be included in `attributes` to help organize and prioritize
142
+ * examples.
143
+ *
144
+ * @param attributes - The training example attributes. Must include at least
145
+ * `agent_id` (string), `input` (string), and `output` (string).
146
+ * @param options - Optional request options.
147
+ * @returns A promise that resolves to the newly created `TrainingExample` object.
148
+ *
149
+ * @example
150
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
151
+ *
152
+ * const example = await client.training.examples.create({
153
+ * agent_id: 'agt_01HXYZ...',
154
+ * input: 'What is the subtotal before tax?',
155
+ * output: '$980.00',
156
+ * label: 'currency-extraction',
157
+ * });
158
+ * console.log(`Created: ${example.id}`);
159
+ */
160
+ create: (attributes: CreateTrainingExampleAttributes, options?: RequestOptions) => Promise<TrainingExample>;
161
+ /**
162
+ * Updates one or more attributes of an existing training example.
163
+ *
164
+ * Only the fields provided in `attributes` are changed; all other fields
165
+ * remain unchanged (PATCH semantics). Commonly used to correct the expected
166
+ * `output` of an example after a human review.
167
+ *
168
+ * @param id - The UUID of the training example to update.
169
+ * @param attributes - A partial map of attributes to update
170
+ * (e.g. `{ output: 'Corrected answer', label: 'reviewed' }`).
171
+ * @param options - Optional request options.
172
+ * @returns A promise that resolves to the updated `TrainingExample` object.
173
+ *
174
+ * @example
175
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
176
+ *
177
+ * const updated = await client.training.examples.update('tex_01HXYZ...', {
178
+ * output: '$1,100.00',
179
+ * label: 'reviewed',
180
+ * });
181
+ */
182
+ update: (id: string, attributes: UpdateTrainingExampleAttributes, options?: RequestOptions) => Promise<TrainingExample>;
183
+ /**
184
+ * Creates multiple training examples in a single request.
185
+ *
186
+ * More efficient than issuing individual `create` calls in a loop.
187
+ * Useful when ingesting a batch of labeled examples from an external
188
+ * dataset, annotation tool export, or historical conversation log.
189
+ *
190
+ * @param options - Optional request options.
191
+ * @returns A promise that resolves to the created `TrainingExample` records.
192
+ *
193
+ * @example
194
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
195
+ * const result = await client.training.examples.bulkCreate();
196
+ */
197
+ bulkCreate: (options?: RequestOptions) => Promise<TrainingExample>;
198
+ /**
199
+ * Deletes multiple training examples in a single request.
200
+ *
201
+ * More efficient than issuing individual `delete` calls in a loop.
202
+ * Useful for pruning a large set of outdated or low-quality examples
203
+ * identified during a training analysis run.
204
+ *
205
+ * @param options - Optional request options.
206
+ * @returns A promise that resolves once all targeted examples are deleted.
207
+ *
208
+ * @example
209
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
210
+ * await client.training.examples.bulkDestroy();
211
+ */
212
+ bulkDestroy: (options?: RequestOptions) => Promise<TrainingExample>;
213
+ /**
214
+ * Searches for training examples semantically similar to a query vector.
215
+ *
216
+ * Uses vector similarity (pgvector cosine distance) to find examples whose
217
+ * `input` embeddings are closest to the provided query. Useful for finding
218
+ * near-duplicate examples before adding new ones, or for discovering which
219
+ * examples are most relevant to a given input at inference time.
220
+ *
221
+ * @param options - Optional request options. Pass the query vector and
222
+ * similarity threshold via request body options.
223
+ * @returns A promise that resolves to an array of semantically similar
224
+ * `TrainingExample` objects, ordered by descending similarity.
225
+ *
226
+ * @example
227
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
228
+ * const similar = await client.training.examples.searchByVector();
229
+ * console.log(`Found ${similar.length} similar examples`);
230
+ */
231
+ searchByVector: (options?: RequestOptions) => Promise<TrainingExample>;
232
+ };
233
+ /**
234
+ * Sub-namespace for managing training sessions.
235
+ *
236
+ * Training sessions are batch fine-tuning or in-context learning runs
237
+ * associated with a specific agent. Each session consumes a snapshot of the
238
+ * agent's training examples and produces an updated model or prompt
239
+ * configuration. Sessions provide an audit trail of when and how an agent
240
+ * was trained, along with metrics such as loss, accuracy, and example count.
241
+ *
242
+ * @example
243
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
244
+ * const sessions = await client.training.sessions.listAllAgentsSessions();
245
+ * console.log(`Training sessions: ${sessions.length}`);
246
+ */
247
+ sessions: {
248
+ /**
249
+ * Lists training sessions for a specific agent with optional pagination controls.
250
+ *
251
+ * Returns a single page of sessions. Use {@link listAllAgentsSessions} to
252
+ * fetch every session across all pages automatically.
253
+ *
254
+ * @param options - Optional pagination and request options.
255
+ * @param options.page - The page number to fetch (1-based). Defaults to 1.
256
+ * @param options.pageSize - Number of sessions per page.
257
+ * @returns A promise that resolves to an array of `TrainingSession` objects.
258
+ *
259
+ * @example
260
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
261
+ * const sessions = await client.training.sessions.listAgentsSessions({ pageSize: 10 });
262
+ */
263
+ listAgentsSessions: (options?: {
264
+ page?: number;
265
+ pageSize?: number;
266
+ } & RequestOptions) => Promise<TrainingSession[]>;
267
+ /**
268
+ * Fetches all training sessions for an agent by transparently paginating
269
+ * through every page until exhausted.
270
+ *
271
+ * @param options - Optional request options.
272
+ * @returns A promise that resolves to a flat array of all `TrainingSession` objects.
273
+ *
274
+ * @example
275
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
276
+ * const allSessions = await client.training.sessions.listAllAgentsSessions();
277
+ * const latest = allSessions.at(-1);
278
+ * console.log(`Latest session status: ${latest?.attributes.status}`);
279
+ */
280
+ listAllAgentsSessions: (options?: RequestOptions) => Promise<TrainingSession[]>;
281
+ /**
282
+ * Fetches a single training session by its ID.
283
+ *
284
+ * @param id - The UUID of the training session to retrieve.
285
+ * @param options - Optional request options.
286
+ * @returns A promise that resolves to the full `TrainingSession` object,
287
+ * including status, metrics, and associated agent ID.
288
+ *
289
+ * @example
290
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
291
+ * const session = await client.training.sessions.get('tsn_01HXYZ...');
292
+ * console.log(`Status: ${session.attributes.status}`);
293
+ * console.log(`Examples used: ${session.attributes.example_count}`);
294
+ */
295
+ get: (id: string, options?: RequestOptions) => Promise<TrainingSession>;
296
+ /**
297
+ * Creates and enqueues a new training session for an agent.
298
+ *
299
+ * Initiates a training run that will consume the agent's current set of
300
+ * training examples. The session is created in a `pending` or `running`
301
+ * state and transitions to `completed` or `failed` asynchronously. Poll
302
+ * `sessions.get(id)` to monitor progress.
303
+ *
304
+ * @param attributes - Session configuration attributes. Must include at least
305
+ * `agent_id` (string). Optional fields include `model`, `epochs`,
306
+ * `learning_rate`, and `example_filter`.
307
+ * @param options - Optional request options.
308
+ * @returns A promise that resolves to the newly created `TrainingSession` object.
309
+ *
310
+ * @example
311
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
312
+ *
313
+ * const session = await client.training.sessions.create({
314
+ * agent_id: 'agt_01HXYZ...',
315
+ * epochs: 3,
316
+ * });
317
+ * console.log(`Session started: ${session.id} (${session.attributes.status})`);
318
+ */
319
+ create: (attributes: CreateTrainingSessionAttributes, options?: RequestOptions) => Promise<TrainingSession>;
320
+ /**
321
+ * Permanently deletes a training session by its ID.
322
+ *
323
+ * Deleting a completed session removes its metrics and audit record but
324
+ * does not revert any model changes that the session produced. Running or
325
+ * pending sessions should be cancelled before deletion.
326
+ *
327
+ * @param id - The UUID of the training session to delete.
328
+ * @param options - Optional request options.
329
+ * @returns A promise that resolves to `true` on successful deletion.
330
+ *
331
+ * @example
332
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
333
+ * await client.training.sessions.delete('tsn_01HXYZ...');
334
+ */
335
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
336
+ /**
337
+ * Updates one or more attributes of an existing training session for an agent.
338
+ *
339
+ * Typically used to update session metadata such as `notes` or `label` after
340
+ * the session completes. Configuration fields (epochs, learning rate) cannot
341
+ * be changed after a session has started.
342
+ *
343
+ * @param agentId - The UUID of the agent the session belongs to.
344
+ * @param attributes - A partial map of session attributes to update.
345
+ * @param options - Optional request options.
346
+ * @returns A promise that resolves to the updated `TrainingSession` object.
347
+ *
348
+ * @example
349
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
350
+ *
351
+ * const updated = await client.training.sessions.update('agt_01HXYZ...', {
352
+ * notes: 'Post-review fine-tune — improved currency extraction accuracy',
353
+ * });
354
+ */
355
+ update: (agentId: string, attributes: UpdateTrainingSessionAttributes, options?: RequestOptions) => Promise<TrainingSession>;
356
+ };
357
+ };
358
+ //# sourceMappingURL=training.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training.d.ts","sourceRoot":"","sources":["../../src/namespaces/training.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE/E,gEAAgE;AAChE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE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