@letta-ai/letta-client 0.1.93 → 0.1.94
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/Client.d.ts +3 -0
- package/Client.js +13 -8
- package/api/resources/agents/client/Client.d.ts +0 -34
- package/api/resources/agents/client/Client.js +11 -154
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/api/resources/agents/resources/passages/client/Client.js +3 -3
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +4 -4
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +2 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/messages/client/Client.d.ts +46 -0
- package/api/resources/messages/client/Client.js +133 -0
- package/api/resources/messages/client/index.d.ts +1 -0
- package/api/resources/messages/client/index.js +2 -0
- package/api/resources/messages/index.d.ts +2 -0
- package/api/resources/messages/index.js +18 -0
- package/api/resources/messages/resources/batches/client/Client.d.ts +87 -0
- package/api/resources/messages/resources/batches/client/Client.js +320 -0
- package/api/resources/messages/resources/batches/client/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/client/index.js +17 -0
- package/api/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +23 -0
- package/api/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/client/requests/index.js +2 -0
- package/api/resources/messages/resources/batches/index.d.ts +1 -0
- package/api/resources/messages/resources/batches/index.js +17 -0
- package/api/resources/messages/resources/index.d.ts +2 -0
- package/api/resources/messages/resources/index.js +41 -0
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +4 -4
- package/api/resources/runs/client/Client.js +7 -7
- package/api/resources/sources/client/Client.js +6 -6
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.js +2 -2
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +2 -2
- package/api/resources/tools/client/Client.js +16 -16
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/BatchJob.d.ts +23 -0
- package/api/types/JobType.d.ts +2 -1
- package/api/types/JobType.js +1 -0
- package/api/types/index.d.ts +1 -1
- package/api/types/index.js +1 -1
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +13 -8
- package/dist/api/resources/agents/client/Client.d.ts +0 -34
- package/dist/api/resources/agents/client/Client.js +11 -154
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +4 -4
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +2 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/messages/client/Client.d.ts +46 -0
- package/dist/api/resources/messages/client/Client.js +133 -0
- package/dist/api/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/messages/client/index.js +2 -0
- package/dist/api/resources/messages/index.d.ts +2 -0
- package/dist/api/resources/messages/index.js +18 -0
- package/dist/api/resources/messages/resources/batches/client/Client.d.ts +87 -0
- package/dist/api/resources/messages/resources/batches/client/Client.js +320 -0
- package/dist/api/resources/messages/resources/batches/client/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/client/index.js +17 -0
- package/dist/api/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +23 -0
- package/dist/api/resources/messages/resources/batches/client/requests/CreateBatch.js +5 -0
- package/dist/api/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/client/requests/index.js +2 -0
- package/dist/api/resources/messages/resources/batches/index.d.ts +1 -0
- package/dist/api/resources/messages/resources/batches/index.js +17 -0
- package/dist/api/resources/messages/resources/index.d.ts +2 -0
- package/dist/api/resources/messages/resources/index.js +41 -0
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +4 -4
- package/dist/api/resources/runs/client/Client.js +7 -7
- package/dist/api/resources/sources/client/Client.js +6 -6
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.js +2 -2
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +2 -2
- package/dist/api/resources/tools/client/Client.js +16 -16
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/BatchJob.d.ts +23 -0
- package/dist/api/types/BatchJob.js +5 -0
- package/dist/api/types/JobType.d.ts +2 -1
- package/dist/api/types/JobType.js +1 -0
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +1 -1
- package/dist/serialization/resources/agents/client/index.d.ts +0 -1
- package/dist/serialization/resources/agents/client/index.js +1 -2
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +2 -1
- package/dist/serialization/resources/messages/index.d.ts +1 -0
- package/dist/serialization/resources/messages/index.js +17 -0
- package/dist/serialization/resources/messages/resources/batches/client/index.d.ts +2 -0
- package/dist/serialization/resources/messages/resources/batches/client/index.js +41 -0
- package/dist/serialization/resources/messages/resources/batches/client/list.d.ts +11 -0
- package/dist/serialization/resources/{agents/client/createBatchMessageRequest.js → messages/resources/batches/client/list.js} +4 -4
- package/dist/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +13 -0
- package/dist/serialization/{types/LettaBatchResponse.js → resources/messages/resources/batches/client/requests/CreateBatch.js} +5 -9
- package/dist/serialization/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/messages/resources/batches/client/requests/index.js +5 -0
- package/dist/serialization/resources/messages/resources/batches/index.d.ts +1 -0
- package/dist/serialization/resources/messages/resources/batches/index.js +17 -0
- package/dist/serialization/resources/messages/resources/index.d.ts +2 -0
- package/dist/serialization/resources/messages/resources/index.js +41 -0
- package/dist/serialization/types/BatchJob.d.ts +22 -0
- package/dist/serialization/types/BatchJob.js +53 -0
- package/dist/serialization/types/JobType.d.ts +1 -1
- package/dist/serialization/types/JobType.js +1 -0
- package/dist/serialization/types/index.d.ts +1 -1
- package/dist/serialization/types/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +314 -142
- package/serialization/resources/agents/client/index.d.ts +0 -1
- package/serialization/resources/agents/client/index.js +1 -2
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +2 -1
- package/serialization/resources/messages/index.d.ts +1 -0
- package/serialization/resources/messages/index.js +17 -0
- package/serialization/resources/messages/resources/batches/client/index.d.ts +2 -0
- package/serialization/resources/messages/resources/batches/client/index.js +41 -0
- package/serialization/resources/messages/resources/batches/client/list.d.ts +11 -0
- package/serialization/resources/{agents/client/createBatchMessageRequest.js → messages/resources/batches/client/list.js} +4 -4
- package/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +13 -0
- package/serialization/{types/LettaBatchResponse.js → resources/messages/resources/batches/client/requests/CreateBatch.js} +5 -9
- package/serialization/resources/messages/resources/batches/client/requests/index.d.ts +1 -0
- package/serialization/resources/messages/resources/batches/client/requests/index.js +5 -0
- package/serialization/resources/messages/resources/batches/index.d.ts +1 -0
- package/serialization/resources/messages/resources/batches/index.js +17 -0
- package/serialization/resources/messages/resources/index.d.ts +2 -0
- package/serialization/resources/messages/resources/index.js +41 -0
- package/serialization/types/BatchJob.d.ts +22 -0
- package/serialization/types/BatchJob.js +53 -0
- package/serialization/types/JobType.d.ts +1 -1
- package/serialization/types/JobType.js +1 -0
- package/serialization/types/index.d.ts +1 -1
- package/serialization/types/index.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/LettaBatchResponse.d.ts +0 -16
- package/dist/api/types/LettaBatchResponse.d.ts +0 -16
- package/dist/serialization/resources/agents/client/createBatchMessageRequest.d.ts +0 -11
- package/dist/serialization/types/LettaBatchResponse.d.ts +0 -17
- package/serialization/resources/agents/client/createBatchMessageRequest.d.ts +0 -11
- package/serialization/types/LettaBatchResponse.d.ts +0 -17
- /package/api/{types/LettaBatchResponse.js → resources/messages/resources/batches/client/requests/CreateBatch.js} +0 -0
- /package/{dist/api/types/LettaBatchResponse.js → api/types/BatchJob.js} +0 -0
package/api/types/JobType.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type JobType = "job" | "run";
|
|
4
|
+
export type JobType = "job" | "run" | "batch";
|
|
5
5
|
export declare const JobType: {
|
|
6
6
|
readonly Job: "job";
|
|
7
7
|
readonly Run: "run";
|
|
8
|
+
readonly Batch: "batch";
|
|
8
9
|
};
|
package/api/types/JobType.js
CHANGED
package/api/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./AuthRequest";
|
|
|
22
22
|
export * from "./AuthResponse";
|
|
23
23
|
export * from "./AuthSchemeField";
|
|
24
24
|
export * from "./BaseToolRuleSchema";
|
|
25
|
+
export * from "./BatchJob";
|
|
25
26
|
export * from "./Block";
|
|
26
27
|
export * from "./BlockUpdate";
|
|
27
28
|
export * from "./ChatCompletionAssistantMessageParamContentItem";
|
|
@@ -116,7 +117,6 @@ export * from "./LlmConfigModelEndpointType";
|
|
|
116
117
|
export * from "./LlmConfigReasoningEffort";
|
|
117
118
|
export * from "./LlmConfig";
|
|
118
119
|
export * from "./LettaBatchRequest";
|
|
119
|
-
export * from "./LettaBatchResponse";
|
|
120
120
|
export * from "./LettaRequest";
|
|
121
121
|
export * from "./LettaRequestConfig";
|
|
122
122
|
export * from "./LettaResponse";
|
package/api/types/index.js
CHANGED
|
@@ -38,6 +38,7 @@ __exportStar(require("./AuthRequest"), exports);
|
|
|
38
38
|
__exportStar(require("./AuthResponse"), exports);
|
|
39
39
|
__exportStar(require("./AuthSchemeField"), exports);
|
|
40
40
|
__exportStar(require("./BaseToolRuleSchema"), exports);
|
|
41
|
+
__exportStar(require("./BatchJob"), exports);
|
|
41
42
|
__exportStar(require("./Block"), exports);
|
|
42
43
|
__exportStar(require("./BlockUpdate"), exports);
|
|
43
44
|
__exportStar(require("./ChatCompletionAssistantMessageParamContentItem"), exports);
|
|
@@ -132,7 +133,6 @@ __exportStar(require("./LlmConfigModelEndpointType"), exports);
|
|
|
132
133
|
__exportStar(require("./LlmConfigReasoningEffort"), exports);
|
|
133
134
|
__exportStar(require("./LlmConfig"), exports);
|
|
134
135
|
__exportStar(require("./LettaBatchRequest"), exports);
|
|
135
|
-
__exportStar(require("./LettaBatchResponse"), exports);
|
|
136
136
|
__exportStar(require("./LettaRequest"), exports);
|
|
137
137
|
__exportStar(require("./LettaRequestConfig"), exports);
|
|
138
138
|
__exportStar(require("./LettaResponse"), exports);
|
package/dist/Client.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { Providers } from "./api/resources/providers/client/Client";
|
|
|
16
16
|
import { Runs } from "./api/resources/runs/client/Client";
|
|
17
17
|
import { Steps } from "./api/resources/steps/client/Client";
|
|
18
18
|
import { Tag } from "./api/resources/tag/client/Client";
|
|
19
|
+
import { Messages } from "./api/resources/messages/client/Client";
|
|
19
20
|
import { Voice } from "./api/resources/voice/client/Client";
|
|
20
21
|
import { Templates } from "./api/resources/templates/client/Client";
|
|
21
22
|
import { ClientSideAccessTokens } from "./api/resources/clientSideAccessTokens/client/Client";
|
|
@@ -54,6 +55,7 @@ export declare class LettaClient {
|
|
|
54
55
|
protected _runs: Runs | undefined;
|
|
55
56
|
protected _steps: Steps | undefined;
|
|
56
57
|
protected _tag: Tag | undefined;
|
|
58
|
+
protected _messages: Messages | undefined;
|
|
57
59
|
protected _voice: Voice | undefined;
|
|
58
60
|
protected _templates: Templates | undefined;
|
|
59
61
|
protected _clientSideAccessTokens: ClientSideAccessTokens | undefined;
|
|
@@ -72,6 +74,7 @@ export declare class LettaClient {
|
|
|
72
74
|
get runs(): Runs;
|
|
73
75
|
get steps(): Steps;
|
|
74
76
|
get tag(): Tag;
|
|
77
|
+
get messages(): Messages;
|
|
75
78
|
get voice(): Voice;
|
|
76
79
|
get templates(): Templates;
|
|
77
80
|
get clientSideAccessTokens(): ClientSideAccessTokens;
|
package/dist/Client.js
CHANGED
|
@@ -17,10 +17,11 @@ const Client_10 = require("./api/resources/providers/client/Client");
|
|
|
17
17
|
const Client_11 = require("./api/resources/runs/client/Client");
|
|
18
18
|
const Client_12 = require("./api/resources/steps/client/Client");
|
|
19
19
|
const Client_13 = require("./api/resources/tag/client/Client");
|
|
20
|
-
const Client_14 = require("./api/resources/
|
|
21
|
-
const Client_15 = require("./api/resources/
|
|
22
|
-
const Client_16 = require("./api/resources/
|
|
23
|
-
const Client_17 = require("./api/resources/
|
|
20
|
+
const Client_14 = require("./api/resources/messages/client/Client");
|
|
21
|
+
const Client_15 = require("./api/resources/voice/client/Client");
|
|
22
|
+
const Client_16 = require("./api/resources/templates/client/Client");
|
|
23
|
+
const Client_17 = require("./api/resources/clientSideAccessTokens/client/Client");
|
|
24
|
+
const Client_18 = require("./api/resources/projects/client/Client");
|
|
24
25
|
class LettaClient {
|
|
25
26
|
constructor(_options = {}) {
|
|
26
27
|
this._options = _options;
|
|
@@ -77,21 +78,25 @@ class LettaClient {
|
|
|
77
78
|
var _a;
|
|
78
79
|
return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_13.Tag(this._options)));
|
|
79
80
|
}
|
|
81
|
+
get messages() {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_14.Messages(this._options)));
|
|
84
|
+
}
|
|
80
85
|
get voice() {
|
|
81
86
|
var _a;
|
|
82
|
-
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new
|
|
87
|
+
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_15.Voice(this._options)));
|
|
83
88
|
}
|
|
84
89
|
get templates() {
|
|
85
90
|
var _a;
|
|
86
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
91
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_16.Templates(this._options)));
|
|
87
92
|
}
|
|
88
93
|
get clientSideAccessTokens() {
|
|
89
94
|
var _a;
|
|
90
|
-
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new
|
|
95
|
+
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new Client_17.ClientSideAccessTokens(this._options)));
|
|
91
96
|
}
|
|
92
97
|
get projects() {
|
|
93
98
|
var _a;
|
|
94
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
99
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_18.Projects(this._options)));
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
exports.LettaClient = LettaClient;
|
|
@@ -186,40 +186,6 @@ export declare class Agents {
|
|
|
186
186
|
* await client.agents.listAgentGroups("agent_id")
|
|
187
187
|
*/
|
|
188
188
|
listAgentGroups(agentId: string, request?: Letta.ListAgentGroupsRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.Group[]>;
|
|
189
|
-
/**
|
|
190
|
-
* Submit a batch of agent messages for asynchronous processing.
|
|
191
|
-
* Creates a job that will fan out messages to all listed agents and process them in parallel.
|
|
192
|
-
*
|
|
193
|
-
* @param {Letta.LettaBatchRequest[]} request
|
|
194
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
-
*
|
|
196
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* await client.agents.createBatchMessageRequest([{
|
|
200
|
-
* messages: [{
|
|
201
|
-
* role: "user",
|
|
202
|
-
* content: [{
|
|
203
|
-
* type: "text",
|
|
204
|
-
* text: "text"
|
|
205
|
-
* }]
|
|
206
|
-
* }],
|
|
207
|
-
* agentId: "agent_id"
|
|
208
|
-
* }])
|
|
209
|
-
*/
|
|
210
|
-
createBatchMessageRequest(request: Letta.LettaBatchRequest[], requestOptions?: Agents.RequestOptions): Promise<Letta.LettaBatchResponse>;
|
|
211
|
-
/**
|
|
212
|
-
* Retrieve the result or current status of a previously submitted batch message request.
|
|
213
|
-
*
|
|
214
|
-
* @param {string} batchId
|
|
215
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
216
|
-
*
|
|
217
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* await client.agents.retrieveBatchMessageRequest("batch_id")
|
|
221
|
-
*/
|
|
222
|
-
retrieveBatchMessageRequest(batchId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.LettaBatchResponse>;
|
|
223
189
|
/**
|
|
224
190
|
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
225
191
|
*
|
|
@@ -194,7 +194,7 @@ class Agents {
|
|
|
194
194
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
195
195
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
|
|
196
196
|
method: "GET",
|
|
197
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
197
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
198
198
|
contentType: "application/json",
|
|
199
199
|
queryParameters: _queryParams,
|
|
200
200
|
requestType: "json",
|
|
@@ -261,7 +261,7 @@ class Agents {
|
|
|
261
261
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
262
262
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
|
|
263
263
|
method: "POST",
|
|
264
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
264
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
requestType: "json",
|
|
267
267
|
body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -327,7 +327,7 @@ class Agents {
|
|
|
327
327
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
328
328
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/export`),
|
|
329
329
|
method: "GET",
|
|
330
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
330
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
331
331
|
contentType: "application/json",
|
|
332
332
|
requestType: "json",
|
|
333
333
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -409,7 +409,7 @@ class Agents {
|
|
|
409
409
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
410
410
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/import"),
|
|
411
411
|
method: "POST",
|
|
412
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
412
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
413
413
|
queryParameters: _queryParams,
|
|
414
414
|
requestType: "file",
|
|
415
415
|
duplex: _maybeEncodedRequest.duplex,
|
|
@@ -476,7 +476,7 @@ class Agents {
|
|
|
476
476
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
477
477
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
478
478
|
method: "GET",
|
|
479
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
479
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
480
480
|
contentType: "application/json",
|
|
481
481
|
requestType: "json",
|
|
482
482
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -541,7 +541,7 @@ class Agents {
|
|
|
541
541
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
542
542
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
543
543
|
method: "DELETE",
|
|
544
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
544
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
545
545
|
contentType: "application/json",
|
|
546
546
|
requestType: "json",
|
|
547
547
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -601,7 +601,7 @@ class Agents {
|
|
|
601
601
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
602
602
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
603
603
|
method: "PATCH",
|
|
604
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
604
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
605
605
|
contentType: "application/json",
|
|
606
606
|
requestType: "json",
|
|
607
607
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -671,7 +671,7 @@ class Agents {
|
|
|
671
671
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
672
672
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
|
|
673
673
|
method: "PATCH",
|
|
674
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
674
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
675
675
|
contentType: "application/json",
|
|
676
676
|
requestType: "json",
|
|
677
677
|
body: serializers.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -743,7 +743,7 @@ class Agents {
|
|
|
743
743
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
744
744
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
|
|
745
745
|
method: "PATCH",
|
|
746
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
746
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
747
747
|
contentType: "application/json",
|
|
748
748
|
queryParameters: _queryParams,
|
|
749
749
|
requestType: "json",
|
|
@@ -815,7 +815,7 @@ class Agents {
|
|
|
815
815
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
816
816
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/groups`),
|
|
817
817
|
method: "GET",
|
|
818
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
818
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
819
819
|
contentType: "application/json",
|
|
820
820
|
queryParameters: _queryParams,
|
|
821
821
|
requestType: "json",
|
|
@@ -864,149 +864,6 @@ class Agents {
|
|
|
864
864
|
}
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
|
-
/**
|
|
868
|
-
* Submit a batch of agent messages for asynchronous processing.
|
|
869
|
-
* Creates a job that will fan out messages to all listed agents and process them in parallel.
|
|
870
|
-
*
|
|
871
|
-
* @param {Letta.LettaBatchRequest[]} request
|
|
872
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
873
|
-
*
|
|
874
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
875
|
-
*
|
|
876
|
-
* @example
|
|
877
|
-
* await client.agents.createBatchMessageRequest([{
|
|
878
|
-
* messages: [{
|
|
879
|
-
* role: "user",
|
|
880
|
-
* content: [{
|
|
881
|
-
* type: "text",
|
|
882
|
-
* text: "text"
|
|
883
|
-
* }]
|
|
884
|
-
* }],
|
|
885
|
-
* agentId: "agent_id"
|
|
886
|
-
* }])
|
|
887
|
-
*/
|
|
888
|
-
createBatchMessageRequest(request, requestOptions) {
|
|
889
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
890
|
-
var _a, _b, _c;
|
|
891
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
892
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/messages/batches"),
|
|
893
|
-
method: "POST",
|
|
894
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.93", "User-Agent": "@letta-ai/letta-client/0.1.93", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
895
|
-
contentType: "application/json",
|
|
896
|
-
requestType: "json",
|
|
897
|
-
body: serializers.agents.createBatchMessageRequest.Request.jsonOrThrow(request, {
|
|
898
|
-
unrecognizedObjectKeys: "strip",
|
|
899
|
-
}),
|
|
900
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
901
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
902
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
903
|
-
});
|
|
904
|
-
if (_response.ok) {
|
|
905
|
-
return serializers.LettaBatchResponse.parseOrThrow(_response.body, {
|
|
906
|
-
unrecognizedObjectKeys: "passthrough",
|
|
907
|
-
allowUnrecognizedUnionMembers: true,
|
|
908
|
-
allowUnrecognizedEnumValues: true,
|
|
909
|
-
skipValidation: true,
|
|
910
|
-
breadcrumbsPrefix: ["response"],
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
if (_response.error.reason === "status-code") {
|
|
914
|
-
switch (_response.error.statusCode) {
|
|
915
|
-
case 422:
|
|
916
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
917
|
-
unrecognizedObjectKeys: "passthrough",
|
|
918
|
-
allowUnrecognizedUnionMembers: true,
|
|
919
|
-
allowUnrecognizedEnumValues: true,
|
|
920
|
-
skipValidation: true,
|
|
921
|
-
breadcrumbsPrefix: ["response"],
|
|
922
|
-
}));
|
|
923
|
-
default:
|
|
924
|
-
throw new errors.LettaError({
|
|
925
|
-
statusCode: _response.error.statusCode,
|
|
926
|
-
body: _response.error.body,
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
switch (_response.error.reason) {
|
|
931
|
-
case "non-json":
|
|
932
|
-
throw new errors.LettaError({
|
|
933
|
-
statusCode: _response.error.statusCode,
|
|
934
|
-
body: _response.error.rawBody,
|
|
935
|
-
});
|
|
936
|
-
case "timeout":
|
|
937
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/messages/batches.");
|
|
938
|
-
case "unknown":
|
|
939
|
-
throw new errors.LettaError({
|
|
940
|
-
message: _response.error.errorMessage,
|
|
941
|
-
});
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
/**
|
|
946
|
-
* Retrieve the result or current status of a previously submitted batch message request.
|
|
947
|
-
*
|
|
948
|
-
* @param {string} batchId
|
|
949
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
950
|
-
*
|
|
951
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
952
|
-
*
|
|
953
|
-
* @example
|
|
954
|
-
* await client.agents.retrieveBatchMessageRequest("batch_id")
|
|
955
|
-
*/
|
|
956
|
-
retrieveBatchMessageRequest(batchId, requestOptions) {
|
|
957
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
958
|
-
var _a, _b, _c;
|
|
959
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
960
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/messages/batches/${encodeURIComponent(batchId)}`),
|
|
961
|
-
method: "GET",
|
|
962
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.93", "User-Agent": "@letta-ai/letta-client/0.1.93", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
963
|
-
contentType: "application/json",
|
|
964
|
-
requestType: "json",
|
|
965
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
966
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
967
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
968
|
-
});
|
|
969
|
-
if (_response.ok) {
|
|
970
|
-
return serializers.LettaBatchResponse.parseOrThrow(_response.body, {
|
|
971
|
-
unrecognizedObjectKeys: "passthrough",
|
|
972
|
-
allowUnrecognizedUnionMembers: true,
|
|
973
|
-
allowUnrecognizedEnumValues: true,
|
|
974
|
-
skipValidation: true,
|
|
975
|
-
breadcrumbsPrefix: ["response"],
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
if (_response.error.reason === "status-code") {
|
|
979
|
-
switch (_response.error.statusCode) {
|
|
980
|
-
case 422:
|
|
981
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
982
|
-
unrecognizedObjectKeys: "passthrough",
|
|
983
|
-
allowUnrecognizedUnionMembers: true,
|
|
984
|
-
allowUnrecognizedEnumValues: true,
|
|
985
|
-
skipValidation: true,
|
|
986
|
-
breadcrumbsPrefix: ["response"],
|
|
987
|
-
}));
|
|
988
|
-
default:
|
|
989
|
-
throw new errors.LettaError({
|
|
990
|
-
statusCode: _response.error.statusCode,
|
|
991
|
-
body: _response.error.body,
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
switch (_response.error.reason) {
|
|
996
|
-
case "non-json":
|
|
997
|
-
throw new errors.LettaError({
|
|
998
|
-
statusCode: _response.error.statusCode,
|
|
999
|
-
body: _response.error.rawBody,
|
|
1000
|
-
});
|
|
1001
|
-
case "timeout":
|
|
1002
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/messages/batches/{batch_id}.");
|
|
1003
|
-
case "unknown":
|
|
1004
|
-
throw new errors.LettaError({
|
|
1005
|
-
message: _response.error.errorMessage,
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
867
|
/**
|
|
1011
868
|
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
1012
869
|
*
|
|
@@ -1024,7 +881,7 @@ class Agents {
|
|
|
1024
881
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1025
882
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
|
|
1026
883
|
method: "POST",
|
|
1027
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
884
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1028
885
|
contentType: "application/json",
|
|
1029
886
|
requestType: "json",
|
|
1030
887
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -77,7 +77,7 @@ class Blocks {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -144,7 +144,7 @@ class Blocks {
|
|
|
144
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
145
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
|
|
146
146
|
method: "PATCH",
|
|
147
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
147
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -210,7 +210,7 @@ class Blocks {
|
|
|
210
210
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
211
211
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks`),
|
|
212
212
|
method: "GET",
|
|
213
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
213
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
214
|
contentType: "application/json",
|
|
215
215
|
requestType: "json",
|
|
216
216
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -276,7 +276,7 @@ class Blocks {
|
|
|
276
276
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
277
277
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
|
|
278
278
|
method: "PATCH",
|
|
279
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
279
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
280
280
|
contentType: "application/json",
|
|
281
281
|
requestType: "json",
|
|
282
282
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -342,7 +342,7 @@ class Blocks {
|
|
|
342
342
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
343
343
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
|
|
344
344
|
method: "PATCH",
|
|
345
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
345
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
346
346
|
contentType: "application/json",
|
|
347
347
|
requestType: "json",
|
|
348
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -76,7 +76,7 @@ class Context {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -77,7 +77,7 @@ class CoreMemory {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -78,7 +78,7 @@ class MemoryVariables {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/variables`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -100,7 +100,7 @@ class Messages {
|
|
|
100
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
101
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
102
102
|
method: "GET",
|
|
103
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
103
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
104
104
|
contentType: "application/json",
|
|
105
105
|
queryParameters: _queryParams,
|
|
106
106
|
requestType: "json",
|
|
@@ -176,7 +176,7 @@ class Messages {
|
|
|
176
176
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
177
177
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
178
178
|
method: "POST",
|
|
179
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
179
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
180
180
|
contentType: "application/json",
|
|
181
181
|
requestType: "json",
|
|
182
182
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -246,7 +246,7 @@ class Messages {
|
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
247
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
|
|
248
248
|
method: "PATCH",
|
|
249
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
249
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
250
250
|
contentType: "application/json",
|
|
251
251
|
requestType: "json",
|
|
252
252
|
body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +306,7 @@ class Messages {
|
|
|
306
306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
307
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
|
|
308
308
|
method: "POST",
|
|
309
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
309
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
requestType: "json",
|
|
312
312
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -393,7 +393,7 @@ class Messages {
|
|
|
393
393
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
394
394
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
|
|
395
395
|
method: "POST",
|
|
396
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
396
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.94", "User-Agent": "@letta-ai/letta-client/0.1.94", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
397
397
|
contentType: "application/json",
|
|
398
398
|
requestType: "json",
|
|
399
399
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|