@tambo-ai/typescript-sdk 0.87.0 → 0.88.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.
- package/CHANGELOG.md +23 -0
- package/bin/migration-config.json +74 -0
- package/package.json +1 -1
- package/resources/threads/index.d.mts +1 -0
- package/resources/threads/index.d.mts.map +1 -1
- package/resources/threads/index.d.ts +1 -0
- package/resources/threads/index.d.ts.map +1 -1
- package/resources/threads/index.js +3 -1
- package/resources/threads/index.js.map +1 -1
- package/resources/threads/index.mjs +1 -0
- package/resources/threads/index.mjs.map +1 -1
- package/resources/threads/runs.d.mts +3 -3
- package/resources/threads/runs.d.ts +3 -3
- package/resources/threads/suggestions.d.mts +122 -0
- package/resources/threads/suggestions.d.mts.map +1 -0
- package/resources/threads/suggestions.d.ts +122 -0
- package/resources/threads/suggestions.d.ts.map +1 -0
- package/resources/threads/suggestions.js +49 -0
- package/resources/threads/suggestions.js.map +1 -0
- package/resources/threads/suggestions.mjs +45 -0
- package/resources/threads/suggestions.mjs.map +1 -0
- package/resources/threads/threads.d.mts +5 -1
- package/resources/threads/threads.d.mts.map +1 -1
- package/resources/threads/threads.d.ts +5 -1
- package/resources/threads/threads.d.ts.map +1 -1
- package/resources/threads/threads.js +4 -0
- package/resources/threads/threads.js.map +1 -1
- package/resources/threads/threads.mjs +4 -0
- package/resources/threads/threads.mjs.map +1 -1
- package/src/resources/threads/index.ts +7 -0
- package/src/resources/threads/runs.ts +3 -3
- package/src/resources/threads/suggestions.ts +170 -0
- package/src/resources/threads/threads.ts +19 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.88.0 (2026-01-30)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.87.0...v0.88.0](https://github.com/tambo-ai/typescript-sdk/compare/v0.87.0...v0.88.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add v1 suggestion endpoints ([cca1207](https://github.com/tambo-ai/typescript-sdk/commit/cca1207c13db97e372580ed33bb17af83f3fe696))
|
|
10
|
+
* **api:** api update ([f04f10a](https://github.com/tambo-ai/typescript-sdk/commit/f04f10a11830f1aa66b44855d1280a67ade351b0))
|
|
11
|
+
* **api:** api update ([ba5f205](https://github.com/tambo-ai/typescript-sdk/commit/ba5f20551164965e5ee478c6401c859a2a4c6d45))
|
|
12
|
+
* **api:** fix old suggestions api ([d3c8c76](https://github.com/tambo-ai/typescript-sdk/commit/d3c8c7677b3e548bb55d6ea5ecb663995b7ab58f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **docs:** fix mcp installation instructions for remote servers ([1c94188](https://github.com/tambo-ai/typescript-sdk/commit/1c94188c551305ed02635c03e3dcc810affc4c0e))
|
|
18
|
+
* **publish:** use npm registry directly for trusted publishing support ([01a0507](https://github.com/tambo-ai/typescript-sdk/commit/01a05079133ffbcaafc76b849606617d2a34b699))
|
|
19
|
+
* **tests:** use object values in state.test.ts to match OpenAPI schema ([d3c6f3f](https://github.com/tambo-ai/typescript-sdk/commit/d3c6f3f766ff744e9c5773886a6057654290ca13))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Chores
|
|
23
|
+
|
|
24
|
+
* **internal:** codegen related update ([c16d1e0](https://github.com/tambo-ai/typescript-sdk/commit/c16d1e01141db01726a1189b5f175af4da7b0b46))
|
|
25
|
+
|
|
3
26
|
## 0.87.0 (2026-01-28)
|
|
4
27
|
|
|
5
28
|
Full Changelog: [v0.86.0...v0.87.0](https://github.com/tambo-ai/typescript-sdk/compare/v0.86.0...v0.87.0)
|
|
@@ -311,6 +311,80 @@
|
|
|
311
311
|
"type": "options"
|
|
312
312
|
}
|
|
313
313
|
]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"base": "threads.suggestions",
|
|
317
|
+
"name": "create",
|
|
318
|
+
"params": [
|
|
319
|
+
{
|
|
320
|
+
"type": "param",
|
|
321
|
+
"key": "messageId",
|
|
322
|
+
"location": "path"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"type": "params",
|
|
326
|
+
"maybeOverload": false
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"type": "options"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"oldParams": [
|
|
333
|
+
{
|
|
334
|
+
"type": "param",
|
|
335
|
+
"key": "threadId",
|
|
336
|
+
"location": "path"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"type": "param",
|
|
340
|
+
"key": "messageId",
|
|
341
|
+
"location": "path"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"type": "params",
|
|
345
|
+
"maybeOverload": false
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"type": "options"
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"base": "threads.suggestions",
|
|
354
|
+
"name": "list",
|
|
355
|
+
"params": [
|
|
356
|
+
{
|
|
357
|
+
"type": "param",
|
|
358
|
+
"key": "messageId",
|
|
359
|
+
"location": "path"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "params",
|
|
363
|
+
"maybeOverload": false
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"type": "options"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"oldParams": [
|
|
370
|
+
{
|
|
371
|
+
"type": "param",
|
|
372
|
+
"key": "threadId",
|
|
373
|
+
"location": "path"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"type": "param",
|
|
377
|
+
"key": "messageId",
|
|
378
|
+
"location": "path"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"type": "params",
|
|
382
|
+
"maybeOverload": true
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"type": "options"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
314
388
|
}
|
|
315
389
|
]
|
|
316
390
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Messages, type MessageListResponse, type MessageGetResponse, type MessageListParams, type MessageGetParams, } from "./messages.mjs";
|
|
2
2
|
export { Runs, type InputMessage, type RunCreateResponse, type RunDeleteResponse, type RunRunResponse, type RunCreateParams, type RunDeleteParams, type RunRunParams, } from "./runs.mjs";
|
|
3
3
|
export { State, type StateUpdateStateResponse, type StateUpdateStateParams } from "./state.mjs";
|
|
4
|
+
export { Suggestions, type SuggestionCreateResponse, type SuggestionListResponse, type SuggestionCreateParams, type SuggestionListParams, } from "./suggestions.mjs";
|
|
4
5
|
export { Threads, type ComponentContent, type ResourceContent, type RunError, type TextContent, type ToolResultContent, type ToolUseContent, type ThreadCreateResponse, type ThreadRetrieveResponse, type ThreadListResponse, type ThreadCreateParams, type ThreadRetrieveParams, type ThreadListParams, } from "./threads.mjs";
|
|
5
6
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB;OACM,EACL,IAAI,EACJ,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB;OACM,EAAE,KAAK,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OACrE,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB;OACM,EACL,IAAI,EACJ,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB;OACM,EAAE,KAAK,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OACrE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B;OACM,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Messages, type MessageListResponse, type MessageGetResponse, type MessageListParams, type MessageGetParams, } from "./messages.js";
|
|
2
2
|
export { Runs, type InputMessage, type RunCreateResponse, type RunDeleteResponse, type RunRunResponse, type RunCreateParams, type RunDeleteParams, type RunRunParams, } from "./runs.js";
|
|
3
3
|
export { State, type StateUpdateStateResponse, type StateUpdateStateParams } from "./state.js";
|
|
4
|
+
export { Suggestions, type SuggestionCreateResponse, type SuggestionListResponse, type SuggestionCreateParams, type SuggestionListParams, } from "./suggestions.js";
|
|
4
5
|
export { Threads, type ComponentContent, type ResourceContent, type RunError, type TextContent, type ToolResultContent, type ToolUseContent, type ThreadCreateResponse, type ThreadRetrieveResponse, type ThreadListResponse, type ThreadCreateParams, type ThreadRetrieveParams, type ThreadListParams, } from "./threads.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB;OACM,EACL,IAAI,EACJ,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB;OACM,EAAE,KAAK,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OACrE,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB;OACM,EACL,IAAI,EACJ,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB;OACM,EAAE,KAAK,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OACrE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B;OACM,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Threads = exports.State = exports.Runs = exports.Messages = void 0;
|
|
4
|
+
exports.Threads = exports.Suggestions = exports.State = exports.Runs = exports.Messages = void 0;
|
|
5
5
|
var messages_1 = require("./messages.js");
|
|
6
6
|
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
|
|
7
7
|
var runs_1 = require("./runs.js");
|
|
8
8
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_1.Runs; } });
|
|
9
9
|
var state_1 = require("./state.js");
|
|
10
10
|
Object.defineProperty(exports, "State", { enumerable: true, get: function () { return state_1.State; } });
|
|
11
|
+
var suggestions_1 = require("./suggestions.js");
|
|
12
|
+
Object.defineProperty(exports, "Suggestions", { enumerable: true, get: function () { return suggestions_1.Suggestions; } });
|
|
11
13
|
var threads_1 = require("./threads.js");
|
|
12
14
|
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return threads_1.Threads; } });
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,kCASgB;AARd,4FAAA,IAAI,OAAA;AASN,oCAA4F;AAAnF,8FAAA,KAAK,OAAA;AACd,wCAcmB;AAbjB,kGAAA,OAAO,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,kCASgB;AARd,4FAAA,IAAI,OAAA;AASN,oCAA4F;AAAnF,8FAAA,KAAK,OAAA;AACd,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,wCAcmB;AAbjB,kGAAA,OAAO,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAKT;OACM,EACL,IAAI,GAQL;OACM,EAAE,KAAK,EAA8D;OACrE,EACL,OAAO,GAaR"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/threads/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAKT;OACM,EACL,IAAI,GAQL;OACM,EAAE,KAAK,EAA8D;OACrE,EACL,WAAW,GAKZ;OACM,EACL,OAAO,GAaR"}
|
|
@@ -145,7 +145,7 @@ export interface RunCreateParams {
|
|
|
145
145
|
*/
|
|
146
146
|
tools?: Array<RunCreateParams.Tool>;
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
149
149
|
*/
|
|
150
150
|
userKey?: string;
|
|
151
151
|
}
|
|
@@ -181,7 +181,7 @@ export declare namespace RunCreateParams {
|
|
|
181
181
|
*/
|
|
182
182
|
metadata?: unknown;
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
185
185
|
*/
|
|
186
186
|
userKey?: string;
|
|
187
187
|
}
|
|
@@ -256,7 +256,7 @@ export interface RunRunParams {
|
|
|
256
256
|
*/
|
|
257
257
|
tools?: Array<RunRunParams.Tool>;
|
|
258
258
|
/**
|
|
259
|
-
*
|
|
259
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
260
260
|
*/
|
|
261
261
|
userKey?: string;
|
|
262
262
|
}
|
|
@@ -145,7 +145,7 @@ export interface RunCreateParams {
|
|
|
145
145
|
*/
|
|
146
146
|
tools?: Array<RunCreateParams.Tool>;
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
149
149
|
*/
|
|
150
150
|
userKey?: string;
|
|
151
151
|
}
|
|
@@ -181,7 +181,7 @@ export declare namespace RunCreateParams {
|
|
|
181
181
|
*/
|
|
182
182
|
metadata?: unknown;
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
185
185
|
*/
|
|
186
186
|
userKey?: string;
|
|
187
187
|
}
|
|
@@ -256,7 +256,7 @@ export interface RunRunParams {
|
|
|
256
256
|
*/
|
|
257
257
|
tools?: Array<RunRunParams.Tool>;
|
|
258
258
|
/**
|
|
259
|
-
*
|
|
259
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
260
260
|
*/
|
|
261
261
|
userKey?: string;
|
|
262
262
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as ThreadsSuggestionsAPI from "../beta/threads/suggestions.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
export declare class Suggestions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Generate AI-powered suggestions for the next action based on the thread context.
|
|
8
|
+
* Suggestions are persisted and can be retrieved later via the list endpoint.
|
|
9
|
+
* Calling this endpoint replaces any existing suggestions for the message.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const suggestion = await client.threads.suggestions.create(
|
|
14
|
+
* 'msg_xyz789abc',
|
|
15
|
+
* { threadId: 'thr_abc123xyz' },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(messageID: string, params: SuggestionCreateParams, options?: RequestOptions): APIPromise<SuggestionCreateResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* List suggestions that have been generated for a specific message. Supports
|
|
22
|
+
* cursor-based pagination.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const suggestions = await client.threads.suggestions.list(
|
|
27
|
+
* 'msg_xyz789abc',
|
|
28
|
+
* { threadId: 'thr_abc123xyz' },
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(messageID: string, params: SuggestionListParams, options?: RequestOptions): APIPromise<SuggestionListResponse>;
|
|
33
|
+
}
|
|
34
|
+
export interface SuggestionCreateResponse {
|
|
35
|
+
/**
|
|
36
|
+
* Whether there are more results
|
|
37
|
+
*/
|
|
38
|
+
hasMore: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* List of suggestions for the message
|
|
41
|
+
*/
|
|
42
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
43
|
+
/**
|
|
44
|
+
* Cursor for the next page of results
|
|
45
|
+
*/
|
|
46
|
+
nextCursor?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SuggestionListResponse {
|
|
49
|
+
/**
|
|
50
|
+
* Whether there are more results
|
|
51
|
+
*/
|
|
52
|
+
hasMore: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* List of suggestions for the message
|
|
55
|
+
*/
|
|
56
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
57
|
+
/**
|
|
58
|
+
* Cursor for the next page of results
|
|
59
|
+
*/
|
|
60
|
+
nextCursor?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SuggestionCreateParams {
|
|
63
|
+
/**
|
|
64
|
+
* Path param: Thread ID
|
|
65
|
+
*/
|
|
66
|
+
threadId: string;
|
|
67
|
+
/**
|
|
68
|
+
* Body param: Available components that suggestions can reference
|
|
69
|
+
*/
|
|
70
|
+
availableComponents?: Array<SuggestionCreateParams.AvailableComponent>;
|
|
71
|
+
/**
|
|
72
|
+
* Body param: Maximum number of suggestions to generate (1-10)
|
|
73
|
+
*/
|
|
74
|
+
maxSuggestions?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Body param: Identifier for a user in your system. Required if no bearer token is
|
|
77
|
+
* provided.
|
|
78
|
+
*/
|
|
79
|
+
userKey?: string;
|
|
80
|
+
}
|
|
81
|
+
export declare namespace SuggestionCreateParams {
|
|
82
|
+
interface AvailableComponent {
|
|
83
|
+
/**
|
|
84
|
+
* Description of what this component displays
|
|
85
|
+
*/
|
|
86
|
+
description: string;
|
|
87
|
+
/**
|
|
88
|
+
* Component name (e.g., 'StockChart')
|
|
89
|
+
*/
|
|
90
|
+
name: string;
|
|
91
|
+
/**
|
|
92
|
+
* JSON Schema for component props
|
|
93
|
+
*/
|
|
94
|
+
propsSchema: unknown;
|
|
95
|
+
/**
|
|
96
|
+
* Optional JSON Schema for component state
|
|
97
|
+
*/
|
|
98
|
+
stateSchema?: unknown;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export interface SuggestionListParams {
|
|
102
|
+
/**
|
|
103
|
+
* Path param: Thread ID
|
|
104
|
+
*/
|
|
105
|
+
threadId: string;
|
|
106
|
+
/**
|
|
107
|
+
* Query param: Cursor for pagination
|
|
108
|
+
*/
|
|
109
|
+
cursor?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Query param: Maximum number of suggestions to return
|
|
112
|
+
*/
|
|
113
|
+
limit?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Query param: Optional user key for thread organization
|
|
116
|
+
*/
|
|
117
|
+
userKey?: string;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace Suggestions {
|
|
120
|
+
export { type SuggestionCreateResponse as SuggestionCreateResponse, type SuggestionListResponse as SuggestionListResponse, type SuggestionCreateParams as SuggestionCreateParams, type SuggestionListParams as SuggestionListParams, };
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=suggestions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.mts","sourceRoot":"","sources":["../../src/resources/threads/suggestions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAQvC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;CAOtC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAErD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAErD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAEvE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,kBAAkB;QACjC;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as ThreadsSuggestionsAPI from "../beta/threads/suggestions.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
export declare class Suggestions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Generate AI-powered suggestions for the next action based on the thread context.
|
|
8
|
+
* Suggestions are persisted and can be retrieved later via the list endpoint.
|
|
9
|
+
* Calling this endpoint replaces any existing suggestions for the message.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const suggestion = await client.threads.suggestions.create(
|
|
14
|
+
* 'msg_xyz789abc',
|
|
15
|
+
* { threadId: 'thr_abc123xyz' },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(messageID: string, params: SuggestionCreateParams, options?: RequestOptions): APIPromise<SuggestionCreateResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* List suggestions that have been generated for a specific message. Supports
|
|
22
|
+
* cursor-based pagination.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const suggestions = await client.threads.suggestions.list(
|
|
27
|
+
* 'msg_xyz789abc',
|
|
28
|
+
* { threadId: 'thr_abc123xyz' },
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(messageID: string, params: SuggestionListParams, options?: RequestOptions): APIPromise<SuggestionListResponse>;
|
|
33
|
+
}
|
|
34
|
+
export interface SuggestionCreateResponse {
|
|
35
|
+
/**
|
|
36
|
+
* Whether there are more results
|
|
37
|
+
*/
|
|
38
|
+
hasMore: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* List of suggestions for the message
|
|
41
|
+
*/
|
|
42
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
43
|
+
/**
|
|
44
|
+
* Cursor for the next page of results
|
|
45
|
+
*/
|
|
46
|
+
nextCursor?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SuggestionListResponse {
|
|
49
|
+
/**
|
|
50
|
+
* Whether there are more results
|
|
51
|
+
*/
|
|
52
|
+
hasMore: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* List of suggestions for the message
|
|
55
|
+
*/
|
|
56
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
57
|
+
/**
|
|
58
|
+
* Cursor for the next page of results
|
|
59
|
+
*/
|
|
60
|
+
nextCursor?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SuggestionCreateParams {
|
|
63
|
+
/**
|
|
64
|
+
* Path param: Thread ID
|
|
65
|
+
*/
|
|
66
|
+
threadId: string;
|
|
67
|
+
/**
|
|
68
|
+
* Body param: Available components that suggestions can reference
|
|
69
|
+
*/
|
|
70
|
+
availableComponents?: Array<SuggestionCreateParams.AvailableComponent>;
|
|
71
|
+
/**
|
|
72
|
+
* Body param: Maximum number of suggestions to generate (1-10)
|
|
73
|
+
*/
|
|
74
|
+
maxSuggestions?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Body param: Identifier for a user in your system. Required if no bearer token is
|
|
77
|
+
* provided.
|
|
78
|
+
*/
|
|
79
|
+
userKey?: string;
|
|
80
|
+
}
|
|
81
|
+
export declare namespace SuggestionCreateParams {
|
|
82
|
+
interface AvailableComponent {
|
|
83
|
+
/**
|
|
84
|
+
* Description of what this component displays
|
|
85
|
+
*/
|
|
86
|
+
description: string;
|
|
87
|
+
/**
|
|
88
|
+
* Component name (e.g., 'StockChart')
|
|
89
|
+
*/
|
|
90
|
+
name: string;
|
|
91
|
+
/**
|
|
92
|
+
* JSON Schema for component props
|
|
93
|
+
*/
|
|
94
|
+
propsSchema: unknown;
|
|
95
|
+
/**
|
|
96
|
+
* Optional JSON Schema for component state
|
|
97
|
+
*/
|
|
98
|
+
stateSchema?: unknown;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export interface SuggestionListParams {
|
|
102
|
+
/**
|
|
103
|
+
* Path param: Thread ID
|
|
104
|
+
*/
|
|
105
|
+
threadId: string;
|
|
106
|
+
/**
|
|
107
|
+
* Query param: Cursor for pagination
|
|
108
|
+
*/
|
|
109
|
+
cursor?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Query param: Maximum number of suggestions to return
|
|
112
|
+
*/
|
|
113
|
+
limit?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Query param: Optional user key for thread organization
|
|
116
|
+
*/
|
|
117
|
+
userKey?: string;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace Suggestions {
|
|
120
|
+
export { type SuggestionCreateResponse as SuggestionCreateResponse, type SuggestionListResponse as SuggestionListResponse, type SuggestionCreateParams as SuggestionCreateParams, type SuggestionListParams as SuggestionListParams, };
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../src/resources/threads/suggestions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAQvC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;CAOtC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAErD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAErD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAEvE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,kBAAkB;QACjC;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Suggestions = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Suggestions extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generate AI-powered suggestions for the next action based on the thread context.
|
|
10
|
+
* Suggestions are persisted and can be retrieved later via the list endpoint.
|
|
11
|
+
* Calling this endpoint replaces any existing suggestions for the message.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const suggestion = await client.threads.suggestions.create(
|
|
16
|
+
* 'msg_xyz789abc',
|
|
17
|
+
* { threadId: 'thr_abc123xyz' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(messageID, params, options) {
|
|
22
|
+
const { threadId, ...body } = params;
|
|
23
|
+
return this._client.post((0, path_1.path) `/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List suggestions that have been generated for a specific message. Supports
|
|
30
|
+
* cursor-based pagination.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const suggestions = await client.threads.suggestions.list(
|
|
35
|
+
* 'msg_xyz789abc',
|
|
36
|
+
* { threadId: 'thr_abc123xyz' },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
list(messageID, params, options) {
|
|
41
|
+
const { threadId, ...query } = params;
|
|
42
|
+
return this._client.get((0, path_1.path) `/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
43
|
+
query,
|
|
44
|
+
...options,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.Suggestions = Suggestions;
|
|
49
|
+
//# sourceMappingURL=suggestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.js","sourceRoot":"","sources":["../../src/resources/threads/suggestions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAiB,EACjB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,aAAa,SAAS,cAAc,EAAE;YACxF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAiB,EACjB,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,aAAa,SAAS,cAAc,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAjDD,kCAiDC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Suggestions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Generate AI-powered suggestions for the next action based on the thread context.
|
|
7
|
+
* Suggestions are persisted and can be retrieved later via the list endpoint.
|
|
8
|
+
* Calling this endpoint replaces any existing suggestions for the message.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const suggestion = await client.threads.suggestions.create(
|
|
13
|
+
* 'msg_xyz789abc',
|
|
14
|
+
* { threadId: 'thr_abc123xyz' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(messageID, params, options) {
|
|
19
|
+
const { threadId, ...body } = params;
|
|
20
|
+
return this._client.post(path `/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
21
|
+
body,
|
|
22
|
+
...options,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List suggestions that have been generated for a specific message. Supports
|
|
27
|
+
* cursor-based pagination.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const suggestions = await client.threads.suggestions.list(
|
|
32
|
+
* 'msg_xyz789abc',
|
|
33
|
+
* { threadId: 'thr_abc123xyz' },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(messageID, params, options) {
|
|
38
|
+
const { threadId, ...query } = params;
|
|
39
|
+
return this._client.get(path `/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
40
|
+
query,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=suggestions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.mjs","sourceRoot":"","sources":["../../src/resources/threads/suggestions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAiB,EACjB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,eAAe,QAAQ,aAAa,SAAS,cAAc,EAAE;YACxF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAiB,EACjB,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,aAAa,SAAS,cAAc,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -7,12 +7,15 @@ import * as RunsAPI from "./runs.mjs";
|
|
|
7
7
|
import { InputMessage, RunCreateParams, RunCreateResponse, RunDeleteParams, RunDeleteResponse, RunRunParams, RunRunResponse, Runs } from "./runs.mjs";
|
|
8
8
|
import * as StateAPI from "./state.mjs";
|
|
9
9
|
import { State, StateUpdateStateParams, StateUpdateStateResponse } from "./state.mjs";
|
|
10
|
+
import * as SuggestionsAPI from "./suggestions.mjs";
|
|
11
|
+
import { SuggestionCreateParams, SuggestionCreateResponse, SuggestionListParams, SuggestionListResponse, Suggestions } from "./suggestions.mjs";
|
|
10
12
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
11
13
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
12
14
|
export declare class Threads extends APIResource {
|
|
13
15
|
state: StateAPI.State;
|
|
14
16
|
messages: MessagesAPI.Messages;
|
|
15
17
|
runs: RunsAPI.Runs;
|
|
18
|
+
suggestions: SuggestionsAPI.Suggestions;
|
|
16
19
|
/**
|
|
17
20
|
* Create a new empty thread. Note: initialMessages is not supported yet; create
|
|
18
21
|
* the thread first, then add messages via runs/message endpoints.
|
|
@@ -356,7 +359,7 @@ export interface ThreadCreateParams {
|
|
|
356
359
|
*/
|
|
357
360
|
metadata?: unknown;
|
|
358
361
|
/**
|
|
359
|
-
*
|
|
362
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
360
363
|
*/
|
|
361
364
|
userKey?: string;
|
|
362
365
|
}
|
|
@@ -385,5 +388,6 @@ export declare namespace Threads {
|
|
|
385
388
|
export { State as State, type StateUpdateStateResponse as StateUpdateStateResponse, type StateUpdateStateParams as StateUpdateStateParams, };
|
|
386
389
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageGetResponse as MessageGetResponse, type MessageListParams as MessageListParams, type MessageGetParams as MessageGetParams, };
|
|
387
390
|
export { Runs as Runs, type InputMessage as InputMessage, type RunCreateResponse as RunCreateResponse, type RunDeleteResponse as RunDeleteResponse, type RunRunResponse as RunRunResponse, type RunCreateParams as RunCreateParams, type RunDeleteParams as RunDeleteParams, type RunRunParams as RunRunParams, };
|
|
391
|
+
export { Suggestions as Suggestions, type SuggestionCreateResponse as SuggestionCreateResponse, type SuggestionListResponse as SuggestionListResponse, type SuggestionCreateParams as SuggestionCreateParams, type SuggestionListParams as SuggestionListParams, };
|
|
388
392
|
}
|
|
389
393
|
//# sourceMappingURL=threads.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.mts","sourceRoot":"","sources":["../../src/resources/threads/threads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACT;OACM,KAAK,OAAO;OACZ,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,IAAI,EACL;OACM,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE;OAC3D,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,QAAQ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K,EACd,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,YAAY,IAAI,YAAY,GAClC,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -7,12 +7,15 @@ import * as RunsAPI from "./runs.js";
|
|
|
7
7
|
import { InputMessage, RunCreateParams, RunCreateResponse, RunDeleteParams, RunDeleteResponse, RunRunParams, RunRunResponse, Runs } from "./runs.js";
|
|
8
8
|
import * as StateAPI from "./state.js";
|
|
9
9
|
import { State, StateUpdateStateParams, StateUpdateStateResponse } from "./state.js";
|
|
10
|
+
import * as SuggestionsAPI from "./suggestions.js";
|
|
11
|
+
import { SuggestionCreateParams, SuggestionCreateResponse, SuggestionListParams, SuggestionListResponse, Suggestions } from "./suggestions.js";
|
|
10
12
|
import { APIPromise } from "../../core/api-promise.js";
|
|
11
13
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
12
14
|
export declare class Threads extends APIResource {
|
|
13
15
|
state: StateAPI.State;
|
|
14
16
|
messages: MessagesAPI.Messages;
|
|
15
17
|
runs: RunsAPI.Runs;
|
|
18
|
+
suggestions: SuggestionsAPI.Suggestions;
|
|
16
19
|
/**
|
|
17
20
|
* Create a new empty thread. Note: initialMessages is not supported yet; create
|
|
18
21
|
* the thread first, then add messages via runs/message endpoints.
|
|
@@ -356,7 +359,7 @@ export interface ThreadCreateParams {
|
|
|
356
359
|
*/
|
|
357
360
|
metadata?: unknown;
|
|
358
361
|
/**
|
|
359
|
-
*
|
|
362
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
360
363
|
*/
|
|
361
364
|
userKey?: string;
|
|
362
365
|
}
|
|
@@ -385,5 +388,6 @@ export declare namespace Threads {
|
|
|
385
388
|
export { State as State, type StateUpdateStateResponse as StateUpdateStateResponse, type StateUpdateStateParams as StateUpdateStateParams, };
|
|
386
389
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageGetResponse as MessageGetResponse, type MessageListParams as MessageListParams, type MessageGetParams as MessageGetParams, };
|
|
387
390
|
export { Runs as Runs, type InputMessage as InputMessage, type RunCreateResponse as RunCreateResponse, type RunDeleteResponse as RunDeleteResponse, type RunRunResponse as RunRunResponse, type RunCreateParams as RunCreateParams, type RunDeleteParams as RunDeleteParams, type RunRunParams as RunRunParams, };
|
|
391
|
+
export { Suggestions as Suggestions, type SuggestionCreateResponse as SuggestionCreateResponse, type SuggestionListResponse as SuggestionListResponse, type SuggestionCreateParams as SuggestionCreateParams, type SuggestionListParams as SuggestionListParams, };
|
|
388
392
|
}
|
|
389
393
|
//# sourceMappingURL=threads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../src/resources/threads/threads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAm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ACzB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,YAAY,IAAI,YAAY,GAClC,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -10,6 +10,8 @@ const RunsAPI = tslib_1.__importStar(require("./runs.js"));
|
|
|
10
10
|
const runs_1 = require("./runs.js");
|
|
11
11
|
const StateAPI = tslib_1.__importStar(require("./state.js"));
|
|
12
12
|
const state_1 = require("./state.js");
|
|
13
|
+
const SuggestionsAPI = tslib_1.__importStar(require("./suggestions.js"));
|
|
14
|
+
const suggestions_1 = require("./suggestions.js");
|
|
13
15
|
const headers_1 = require("../../internal/headers.js");
|
|
14
16
|
const path_1 = require("../../internal/utils/path.js");
|
|
15
17
|
class Threads extends resource_1.APIResource {
|
|
@@ -18,6 +20,7 @@ class Threads extends resource_1.APIResource {
|
|
|
18
20
|
this.state = new StateAPI.State(this._client);
|
|
19
21
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
20
22
|
this.runs = new RunsAPI.Runs(this._client);
|
|
23
|
+
this.suggestions = new SuggestionsAPI.Suggestions(this._client);
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Create a new empty thread. Note: initialMessages is not supported yet; create
|
|
@@ -76,4 +79,5 @@ exports.Threads = Threads;
|
|
|
76
79
|
Threads.State = state_1.State;
|
|
77
80
|
Threads.Messages = messages_1.Messages;
|
|
78
81
|
Threads.Runs = runs_1.Runs;
|
|
82
|
+
Threads.Suggestions = suggestions_1.Suggestions;
|
|
79
83
|
//# sourceMappingURL=threads.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../src/resources/threads/threads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,mEAA0C;AAC1C,4CAMoB;AACpB,2DAAkC;AAClC,oCASgB;AAChB,6DAAoC;AACpC,sCAAkF;
|
|
1
|
+
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../src/resources/threads/threads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,mEAA0C;AAC1C,4CAMoB;AACpB,2DAAkC;AAClC,oCASgB;AAChB,6DAAoC;AACpC,sCAAkF;AAClF,yEAAgD;AAChD,kDAMuB;AAEvB,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAA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IACL,CAAC;CACF;AApED,0BAoEC;AAoZD,OAAO,CAAC,KAAK,GAAG,aAAK,CAAC;AACtB,OAAO,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AAC5B,OAAO,CAAC,IAAI,GAAG,WAAI,CAAC;AACpB,OAAO,CAAC,WAAW,GAAG,yBAAW,CAAC"}
|
|
@@ -6,6 +6,8 @@ import * as RunsAPI from "./runs.mjs";
|
|
|
6
6
|
import { Runs, } from "./runs.mjs";
|
|
7
7
|
import * as StateAPI from "./state.mjs";
|
|
8
8
|
import { State } from "./state.mjs";
|
|
9
|
+
import * as SuggestionsAPI from "./suggestions.mjs";
|
|
10
|
+
import { Suggestions, } from "./suggestions.mjs";
|
|
9
11
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
10
12
|
import { path } from "../../internal/utils/path.mjs";
|
|
11
13
|
export class Threads extends APIResource {
|
|
@@ -14,6 +16,7 @@ export class Threads extends APIResource {
|
|
|
14
16
|
this.state = new StateAPI.State(this._client);
|
|
15
17
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
16
18
|
this.runs = new RunsAPI.Runs(this._client);
|
|
19
|
+
this.suggestions = new SuggestionsAPI.Suggestions(this._client);
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Create a new empty thread. Note: initialMessages is not supported yet; create
|
|
@@ -71,4 +74,5 @@ export class Threads extends APIResource {
|
|
|
71
74
|
Threads.State = State;
|
|
72
75
|
Threads.Messages = Messages;
|
|
73
76
|
Threads.Runs = Runs;
|
|
77
|
+
Threads.Suggestions = Suggestions;
|
|
74
78
|
//# sourceMappingURL=threads.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../src/resources/threads/threads.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,WAAW;OAChB,EAKL,QAAQ,GACT;OACM,KAAK,OAAO;OACZ,EAQL,IAAI,GACL;OAC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,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,eAAe,QAAQ,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAoZD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -18,6 +18,13 @@ export {
|
|
|
18
18
|
type RunRunParams,
|
|
19
19
|
} from './runs';
|
|
20
20
|
export { State, type StateUpdateStateResponse, type StateUpdateStateParams } from './state';
|
|
21
|
+
export {
|
|
22
|
+
Suggestions,
|
|
23
|
+
type SuggestionCreateResponse,
|
|
24
|
+
type SuggestionListResponse,
|
|
25
|
+
type SuggestionCreateParams,
|
|
26
|
+
type SuggestionListParams,
|
|
27
|
+
} from './suggestions';
|
|
21
28
|
export {
|
|
22
29
|
Threads,
|
|
23
30
|
type ComponentContent,
|
|
@@ -190,7 +190,7 @@ export interface RunCreateParams {
|
|
|
190
190
|
tools?: Array<RunCreateParams.Tool>;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
194
194
|
*/
|
|
195
195
|
userKey?: string;
|
|
196
196
|
}
|
|
@@ -233,7 +233,7 @@ export namespace RunCreateParams {
|
|
|
233
233
|
metadata?: unknown;
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
236
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
237
237
|
*/
|
|
238
238
|
userKey?: string;
|
|
239
239
|
}
|
|
@@ -325,7 +325,7 @@ export interface RunRunParams {
|
|
|
325
325
|
tools?: Array<RunRunParams.Tool>;
|
|
326
326
|
|
|
327
327
|
/**
|
|
328
|
-
*
|
|
328
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
329
329
|
*/
|
|
330
330
|
userKey?: string;
|
|
331
331
|
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ThreadsSuggestionsAPI from '../beta/threads/suggestions';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Suggestions extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Generate AI-powered suggestions for the next action based on the thread context.
|
|
12
|
+
* Suggestions are persisted and can be retrieved later via the list endpoint.
|
|
13
|
+
* Calling this endpoint replaces any existing suggestions for the message.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const suggestion = await client.threads.suggestions.create(
|
|
18
|
+
* 'msg_xyz789abc',
|
|
19
|
+
* { threadId: 'thr_abc123xyz' },
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(
|
|
24
|
+
messageID: string,
|
|
25
|
+
params: SuggestionCreateParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<SuggestionCreateResponse> {
|
|
28
|
+
const { threadId, ...body } = params;
|
|
29
|
+
return this._client.post(path`/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
30
|
+
body,
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* List suggestions that have been generated for a specific message. Supports
|
|
37
|
+
* cursor-based pagination.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const suggestions = await client.threads.suggestions.list(
|
|
42
|
+
* 'msg_xyz789abc',
|
|
43
|
+
* { threadId: 'thr_abc123xyz' },
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
list(
|
|
48
|
+
messageID: string,
|
|
49
|
+
params: SuggestionListParams,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): APIPromise<SuggestionListResponse> {
|
|
52
|
+
const { threadId, ...query } = params;
|
|
53
|
+
return this._client.get(path`/v1/threads/${threadId}/messages/${messageID}/suggestions`, {
|
|
54
|
+
query,
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface SuggestionCreateResponse {
|
|
61
|
+
/**
|
|
62
|
+
* Whether there are more results
|
|
63
|
+
*/
|
|
64
|
+
hasMore: boolean;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* List of suggestions for the message
|
|
68
|
+
*/
|
|
69
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Cursor for the next page of results
|
|
73
|
+
*/
|
|
74
|
+
nextCursor?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface SuggestionListResponse {
|
|
78
|
+
/**
|
|
79
|
+
* Whether there are more results
|
|
80
|
+
*/
|
|
81
|
+
hasMore: boolean;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* List of suggestions for the message
|
|
85
|
+
*/
|
|
86
|
+
suggestions: Array<ThreadsSuggestionsAPI.Suggestion>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Cursor for the next page of results
|
|
90
|
+
*/
|
|
91
|
+
nextCursor?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface SuggestionCreateParams {
|
|
95
|
+
/**
|
|
96
|
+
* Path param: Thread ID
|
|
97
|
+
*/
|
|
98
|
+
threadId: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Body param: Available components that suggestions can reference
|
|
102
|
+
*/
|
|
103
|
+
availableComponents?: Array<SuggestionCreateParams.AvailableComponent>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Body param: Maximum number of suggestions to generate (1-10)
|
|
107
|
+
*/
|
|
108
|
+
maxSuggestions?: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Body param: Identifier for a user in your system. Required if no bearer token is
|
|
112
|
+
* provided.
|
|
113
|
+
*/
|
|
114
|
+
userKey?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export namespace SuggestionCreateParams {
|
|
118
|
+
export interface AvailableComponent {
|
|
119
|
+
/**
|
|
120
|
+
* Description of what this component displays
|
|
121
|
+
*/
|
|
122
|
+
description: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Component name (e.g., 'StockChart')
|
|
126
|
+
*/
|
|
127
|
+
name: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* JSON Schema for component props
|
|
131
|
+
*/
|
|
132
|
+
propsSchema: unknown;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Optional JSON Schema for component state
|
|
136
|
+
*/
|
|
137
|
+
stateSchema?: unknown;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface SuggestionListParams {
|
|
142
|
+
/**
|
|
143
|
+
* Path param: Thread ID
|
|
144
|
+
*/
|
|
145
|
+
threadId: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Query param: Cursor for pagination
|
|
149
|
+
*/
|
|
150
|
+
cursor?: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Query param: Maximum number of suggestions to return
|
|
154
|
+
*/
|
|
155
|
+
limit?: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Query param: Optional user key for thread organization
|
|
159
|
+
*/
|
|
160
|
+
userKey?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export declare namespace Suggestions {
|
|
164
|
+
export {
|
|
165
|
+
type SuggestionCreateResponse as SuggestionCreateResponse,
|
|
166
|
+
type SuggestionListResponse as SuggestionListResponse,
|
|
167
|
+
type SuggestionCreateParams as SuggestionCreateParams,
|
|
168
|
+
type SuggestionListParams as SuggestionListParams,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
@@ -24,6 +24,14 @@ import {
|
|
|
24
24
|
} from './runs';
|
|
25
25
|
import * as StateAPI from './state';
|
|
26
26
|
import { State, StateUpdateStateParams, StateUpdateStateResponse } from './state';
|
|
27
|
+
import * as SuggestionsAPI from './suggestions';
|
|
28
|
+
import {
|
|
29
|
+
SuggestionCreateParams,
|
|
30
|
+
SuggestionCreateResponse,
|
|
31
|
+
SuggestionListParams,
|
|
32
|
+
SuggestionListResponse,
|
|
33
|
+
Suggestions,
|
|
34
|
+
} from './suggestions';
|
|
27
35
|
import { APIPromise } from '../../core/api-promise';
|
|
28
36
|
import { buildHeaders } from '../../internal/headers';
|
|
29
37
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -33,6 +41,7 @@ export class Threads extends APIResource {
|
|
|
33
41
|
state: StateAPI.State = new StateAPI.State(this._client);
|
|
34
42
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
35
43
|
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
44
|
+
suggestions: SuggestionsAPI.Suggestions = new SuggestionsAPI.Suggestions(this._client);
|
|
36
45
|
|
|
37
46
|
/**
|
|
38
47
|
* Create a new empty thread. Note: initialMessages is not supported yet; create
|
|
@@ -471,7 +480,7 @@ export interface ThreadCreateParams {
|
|
|
471
480
|
metadata?: unknown;
|
|
472
481
|
|
|
473
482
|
/**
|
|
474
|
-
*
|
|
483
|
+
* Identifier for a user in your system. Required if no bearer token is provided.
|
|
475
484
|
*/
|
|
476
485
|
userKey?: string;
|
|
477
486
|
}
|
|
@@ -503,6 +512,7 @@ export interface ThreadListParams {
|
|
|
503
512
|
Threads.State = State;
|
|
504
513
|
Threads.Messages = Messages;
|
|
505
514
|
Threads.Runs = Runs;
|
|
515
|
+
Threads.Suggestions = Suggestions;
|
|
506
516
|
|
|
507
517
|
export declare namespace Threads {
|
|
508
518
|
export {
|
|
@@ -544,4 +554,12 @@ export declare namespace Threads {
|
|
|
544
554
|
type RunDeleteParams as RunDeleteParams,
|
|
545
555
|
type RunRunParams as RunRunParams,
|
|
546
556
|
};
|
|
557
|
+
|
|
558
|
+
export {
|
|
559
|
+
Suggestions as Suggestions,
|
|
560
|
+
type SuggestionCreateResponse as SuggestionCreateResponse,
|
|
561
|
+
type SuggestionListResponse as SuggestionListResponse,
|
|
562
|
+
type SuggestionCreateParams as SuggestionCreateParams,
|
|
563
|
+
type SuggestionListParams as SuggestionListParams,
|
|
564
|
+
};
|
|
547
565
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.88.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.88.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.88.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.88.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|