@tambo-ai/typescript-sdk 0.47.0 → 0.48.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 +20 -0
- package/README.md +2 -5
- package/package.json +1 -1
- package/resources/beta/projects/api-key.d.ts +17 -0
- package/resources/beta/projects/api-key.d.ts.map +1 -1
- package/resources/beta/projects/api-key.js +17 -0
- package/resources/beta/projects/api-key.js.map +1 -1
- package/resources/beta/projects/api-key.mjs +17 -0
- package/resources/beta/projects/api-key.mjs.map +1 -1
- package/resources/beta/projects/projects.d.ts +18 -0
- package/resources/beta/projects/projects.d.ts.map +1 -1
- package/resources/beta/projects/projects.js +18 -0
- package/resources/beta/projects/projects.js.map +1 -1
- package/resources/beta/projects/projects.mjs +18 -0
- package/resources/beta/projects/projects.mjs.map +1 -1
- package/resources/beta/projects/provider-key.d.ts +17 -0
- package/resources/beta/projects/provider-key.d.ts.map +1 -1
- package/resources/beta/projects/provider-key.js +17 -0
- package/resources/beta/projects/provider-key.js.map +1 -1
- package/resources/beta/projects/provider-key.mjs +17 -0
- package/resources/beta/projects/provider-key.mjs.map +1 -1
- package/resources/beta/registry.d.ts +8 -0
- package/resources/beta/registry.d.ts.map +1 -1
- package/resources/beta/registry.js +8 -0
- package/resources/beta/registry.js.map +1 -1
- package/resources/beta/registry.mjs +8 -0
- package/resources/beta/registry.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +36 -0
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +29 -0
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +29 -0
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/suggestions.d.ts +18 -0
- package/resources/beta/threads/suggestions.d.ts.map +1 -1
- package/resources/beta/threads/suggestions.js +18 -0
- package/resources/beta/threads/suggestions.js.map +1 -1
- package/resources/beta/threads/suggestions.mjs +18 -0
- package/resources/beta/threads/suggestions.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +66 -0
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +53 -0
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +53 -0
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/src/resources/beta/projects/api-key.ts +17 -0
- package/src/resources/beta/projects/projects.ts +18 -0
- package/src/resources/beta/projects/provider-key.ts +17 -0
- package/src/resources/beta/registry.ts +8 -0
- package/src/resources/beta/threads/messages.ts +36 -0
- package/src/resources/beta/threads/suggestions.ts +18 -0
- package/src/resources/beta/threads/threads.ts +68 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -29,18 +29,51 @@ export class Threads extends APIResource {
|
|
|
29
29
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
30
30
|
suggestions: SuggestionsAPI.Suggestions = new SuggestionsAPI.Suggestions(this._client);
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const thread = await client.beta.threads.create({
|
|
36
|
+
* projectId: 'projectId',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
32
40
|
create(body: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
33
41
|
return this._client.post('/threads', { body, ...options });
|
|
34
42
|
}
|
|
35
43
|
|
|
44
|
+
/**
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const thread = await client.beta.threads.retrieve('id');
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
36
50
|
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ThreadRetrieveResponse> {
|
|
37
51
|
return this._client.get(`/threads/${id}`, options);
|
|
38
52
|
}
|
|
39
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const thread = await client.beta.threads.update('id', {
|
|
58
|
+
* projectId: 'projectId',
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
40
62
|
update(id: string, body: ThreadUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
41
63
|
return this._client.put(`/threads/${id}`, { body, ...options });
|
|
42
64
|
}
|
|
43
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Automatically fetches more pages as needed.
|
|
70
|
+
* for await (const thread of client.beta.threads.list(
|
|
71
|
+
* 'projectId',
|
|
72
|
+
* )) {
|
|
73
|
+
* // ...
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
44
77
|
list(
|
|
45
78
|
projectId: string,
|
|
46
79
|
query?: ThreadListParams,
|
|
@@ -61,6 +94,12 @@ export class Threads extends APIResource {
|
|
|
61
94
|
});
|
|
62
95
|
}
|
|
63
96
|
|
|
97
|
+
/**
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* await client.beta.threads.delete('id');
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
64
103
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
65
104
|
return this._client.delete(`/threads/${id}`, {
|
|
66
105
|
...options,
|
|
@@ -68,10 +107,35 @@ export class Threads extends APIResource {
|
|
|
68
107
|
});
|
|
69
108
|
}
|
|
70
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.beta.threads.advance({
|
|
114
|
+
* messageToAppend: {
|
|
115
|
+
* content: [{ type: 'text' }],
|
|
116
|
+
* role: 'user',
|
|
117
|
+
* },
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
71
121
|
advance(body: ThreadAdvanceParams, options?: Core.RequestOptions): Core.APIPromise<ThreadAdvanceResponse> {
|
|
72
122
|
return this._client.post('/threads/advance', { body, ...options });
|
|
73
123
|
}
|
|
74
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* const response = await client.beta.threads.advanceById(
|
|
129
|
+
* 'id',
|
|
130
|
+
* {
|
|
131
|
+
* messageToAppend: {
|
|
132
|
+
* content: [{ type: 'text' }],
|
|
133
|
+
* role: 'user',
|
|
134
|
+
* },
|
|
135
|
+
* },
|
|
136
|
+
* );
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
75
139
|
advanceById(
|
|
76
140
|
id: string,
|
|
77
141
|
body: ThreadAdvanceByIDParams,
|
|
@@ -283,6 +347,8 @@ export interface ThreadAdvanceParams {
|
|
|
283
347
|
clientTools?: Array<Shared.ComponentContextToolMetadata>;
|
|
284
348
|
|
|
285
349
|
contextKey?: string;
|
|
350
|
+
|
|
351
|
+
forceToolChoice?: string;
|
|
286
352
|
}
|
|
287
353
|
|
|
288
354
|
export namespace ThreadAdvanceParams {
|
|
@@ -323,6 +389,8 @@ export interface ThreadAdvanceByIDParams {
|
|
|
323
389
|
clientTools?: Array<Shared.ComponentContextToolMetadata>;
|
|
324
390
|
|
|
325
391
|
contextKey?: string;
|
|
392
|
+
|
|
393
|
+
forceToolChoice?: string;
|
|
326
394
|
}
|
|
327
395
|
|
|
328
396
|
export namespace ThreadAdvanceByIDParams {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.48.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.48.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.48.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|