@letta-ai/letta-client 0.1.157 → 0.1.159
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/api/resources/agents/client/Client.d.ts +33 -0
- package/api/resources/agents/client/Client.js +148 -11
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
- package/api/resources/agents/client/requests/UpdateAgent.d.ts +4 -0
- 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/groups/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 +8 -8
- package/api/resources/agents/resources/passages/client/Client.js +4 -4
- 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/batches/client/Client.js +4 -4
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/api/resources/embeddingModels/client/Client.js +1 -1
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +5 -5
- package/api/resources/messages/client/Client.js +1 -1
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +5 -5
- package/api/resources/runs/client/Client.js +4 -4
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.js +10 -10
- 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/steps/resources/feedback/client/Client.js +1 -1
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +19 -19
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/AgentState.d.ts +4 -0
- package/dist/api/resources/agents/client/Client.d.ts +33 -0
- package/dist/api/resources/agents/client/Client.js +148 -11
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +4 -0
- 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/groups/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 +8 -8
- package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
- 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/batches/client/Client.js +4 -4
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/dist/api/resources/embeddingModels/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +5 -5
- package/dist/api/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +5 -5
- package/dist/api/resources/runs/client/Client.js +4 -4
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.js +10 -10
- 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/steps/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +19 -19
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/AgentState.d.ts +4 -0
- package/dist/serialization/resources/agents/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/client/index.js +2 -1
- package/dist/serialization/resources/agents/client/openFile.d.ts +9 -0
- package/dist/serialization/resources/agents/client/openFile.js +41 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
- package/dist/serialization/types/AgentState.d.ts +2 -0
- package/dist/serialization/types/AgentState.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +149 -0
- package/serialization/resources/agents/client/index.d.ts +1 -0
- package/serialization/resources/agents/client/index.js +2 -1
- package/serialization/resources/agents/client/openFile.d.ts +9 -0
- package/serialization/resources/agents/client/openFile.js +41 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
- package/serialization/types/AgentState.d.ts +2 -0
- package/serialization/types/AgentState.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -178,6 +178,39 @@ export declare class Agents {
|
|
|
178
178
|
* await client.agents.closeAllOpenFiles("agent_id")
|
|
179
179
|
*/
|
|
180
180
|
closeAllOpenFiles(agentId: string, requestOptions?: Agents.RequestOptions): Promise<string[]>;
|
|
181
|
+
/**
|
|
182
|
+
* Opens a specific file for a given agent.
|
|
183
|
+
*
|
|
184
|
+
* This endpoint marks a specific file as open in the agent's file state.
|
|
185
|
+
* The file will be included in the agent's working memory view.
|
|
186
|
+
* Returns a list of file names that were closed due to LRU eviction.
|
|
187
|
+
*
|
|
188
|
+
* @param {string} agentId
|
|
189
|
+
* @param {string} fileId
|
|
190
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
|
+
*
|
|
192
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* await client.agents.openFile("agent_id", "file_id")
|
|
196
|
+
*/
|
|
197
|
+
openFile(agentId: string, fileId: string, requestOptions?: Agents.RequestOptions): Promise<string[]>;
|
|
198
|
+
/**
|
|
199
|
+
* Closes a specific file for a given agent.
|
|
200
|
+
*
|
|
201
|
+
* This endpoint marks a specific file as closed in the agent's file state.
|
|
202
|
+
* The file will be removed from the agent's working memory view.
|
|
203
|
+
*
|
|
204
|
+
* @param {string} agentId
|
|
205
|
+
* @param {string} fileId
|
|
206
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
207
|
+
*
|
|
208
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* await client.agents.closeFile("agent_id", "file_id")
|
|
212
|
+
*/
|
|
213
|
+
closeFile(agentId: string, fileId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
|
|
181
214
|
/**
|
|
182
215
|
* Summarize an agent's conversation history to a target message length.
|
|
183
216
|
*
|
|
@@ -193,7 +193,7 @@ class Agents {
|
|
|
193
193
|
method: "GET",
|
|
194
194
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
195
195
|
? yield core.Supplier.get(this._options.project)
|
|
196
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
196
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
197
197
|
contentType: "application/json",
|
|
198
198
|
queryParameters: _queryParams,
|
|
199
199
|
requestType: "json",
|
|
@@ -261,7 +261,7 @@ class Agents {
|
|
|
261
261
|
method: "POST",
|
|
262
262
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
263
263
|
? yield core.Supplier.get(this._options.project)
|
|
264
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
264
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
requestType: "json",
|
|
267
267
|
body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -328,7 +328,7 @@ class Agents {
|
|
|
328
328
|
method: "GET",
|
|
329
329
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
330
330
|
? yield core.Supplier.get(this._options.project)
|
|
331
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
331
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
332
332
|
contentType: "application/json",
|
|
333
333
|
requestType: "json",
|
|
334
334
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -395,7 +395,7 @@ class Agents {
|
|
|
395
395
|
method: "GET",
|
|
396
396
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
397
397
|
? yield core.Supplier.get(this._options.project)
|
|
398
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
398
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
399
399
|
contentType: "application/json",
|
|
400
400
|
requestType: "json",
|
|
401
401
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -479,7 +479,7 @@ class Agents {
|
|
|
479
479
|
method: "POST",
|
|
480
480
|
headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
481
481
|
? yield core.Supplier.get(this._options.project)
|
|
482
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
482
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
483
483
|
queryParameters: _queryParams,
|
|
484
484
|
requestType: "file",
|
|
485
485
|
duplex: _maybeEncodedRequest.duplex,
|
|
@@ -559,7 +559,7 @@ class Agents {
|
|
|
559
559
|
method: "GET",
|
|
560
560
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
561
561
|
? yield core.Supplier.get(this._options.project)
|
|
562
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
562
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
563
563
|
contentType: "application/json",
|
|
564
564
|
queryParameters: _queryParams,
|
|
565
565
|
requestType: "json",
|
|
@@ -627,7 +627,7 @@ class Agents {
|
|
|
627
627
|
method: "DELETE",
|
|
628
628
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
629
629
|
? yield core.Supplier.get(this._options.project)
|
|
630
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
630
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
631
631
|
contentType: "application/json",
|
|
632
632
|
requestType: "json",
|
|
633
633
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -689,7 +689,7 @@ class Agents {
|
|
|
689
689
|
method: "PATCH",
|
|
690
690
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
691
691
|
? yield core.Supplier.get(this._options.project)
|
|
692
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
692
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
693
693
|
contentType: "application/json",
|
|
694
694
|
requestType: "json",
|
|
695
695
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -760,7 +760,7 @@ class Agents {
|
|
|
760
760
|
method: "PATCH",
|
|
761
761
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
762
762
|
? yield core.Supplier.get(this._options.project)
|
|
763
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
763
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
764
764
|
contentType: "application/json",
|
|
765
765
|
requestType: "json",
|
|
766
766
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -808,6 +808,143 @@ class Agents {
|
|
|
808
808
|
}
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* Opens a specific file for a given agent.
|
|
813
|
+
*
|
|
814
|
+
* This endpoint marks a specific file as open in the agent's file state.
|
|
815
|
+
* The file will be included in the agent's working memory view.
|
|
816
|
+
* Returns a list of file names that were closed due to LRU eviction.
|
|
817
|
+
*
|
|
818
|
+
* @param {string} agentId
|
|
819
|
+
* @param {string} fileId
|
|
820
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
821
|
+
*
|
|
822
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
823
|
+
*
|
|
824
|
+
* @example
|
|
825
|
+
* await client.agents.openFile("agent_id", "file_id")
|
|
826
|
+
*/
|
|
827
|
+
openFile(agentId, fileId, requestOptions) {
|
|
828
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
829
|
+
var _a, _b, _c;
|
|
830
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
831
|
+
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)}/files/${encodeURIComponent(fileId)}/open`),
|
|
832
|
+
method: "PATCH",
|
|
833
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
834
|
+
? yield core.Supplier.get(this._options.project)
|
|
835
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
836
|
+
contentType: "application/json",
|
|
837
|
+
requestType: "json",
|
|
838
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
839
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
840
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
841
|
+
});
|
|
842
|
+
if (_response.ok) {
|
|
843
|
+
return serializers.agents.openFile.Response.parseOrThrow(_response.body, {
|
|
844
|
+
unrecognizedObjectKeys: "passthrough",
|
|
845
|
+
allowUnrecognizedUnionMembers: true,
|
|
846
|
+
allowUnrecognizedEnumValues: true,
|
|
847
|
+
skipValidation: true,
|
|
848
|
+
breadcrumbsPrefix: ["response"],
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
if (_response.error.reason === "status-code") {
|
|
852
|
+
switch (_response.error.statusCode) {
|
|
853
|
+
case 422:
|
|
854
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
855
|
+
unrecognizedObjectKeys: "passthrough",
|
|
856
|
+
allowUnrecognizedUnionMembers: true,
|
|
857
|
+
allowUnrecognizedEnumValues: true,
|
|
858
|
+
skipValidation: true,
|
|
859
|
+
breadcrumbsPrefix: ["response"],
|
|
860
|
+
}));
|
|
861
|
+
default:
|
|
862
|
+
throw new errors.LettaError({
|
|
863
|
+
statusCode: _response.error.statusCode,
|
|
864
|
+
body: _response.error.body,
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
switch (_response.error.reason) {
|
|
869
|
+
case "non-json":
|
|
870
|
+
throw new errors.LettaError({
|
|
871
|
+
statusCode: _response.error.statusCode,
|
|
872
|
+
body: _response.error.rawBody,
|
|
873
|
+
});
|
|
874
|
+
case "timeout":
|
|
875
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/files/{file_id}/open.");
|
|
876
|
+
case "unknown":
|
|
877
|
+
throw new errors.LettaError({
|
|
878
|
+
message: _response.error.errorMessage,
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Closes a specific file for a given agent.
|
|
885
|
+
*
|
|
886
|
+
* This endpoint marks a specific file as closed in the agent's file state.
|
|
887
|
+
* The file will be removed from the agent's working memory view.
|
|
888
|
+
*
|
|
889
|
+
* @param {string} agentId
|
|
890
|
+
* @param {string} fileId
|
|
891
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
892
|
+
*
|
|
893
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
894
|
+
*
|
|
895
|
+
* @example
|
|
896
|
+
* await client.agents.closeFile("agent_id", "file_id")
|
|
897
|
+
*/
|
|
898
|
+
closeFile(agentId, fileId, requestOptions) {
|
|
899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
900
|
+
var _a, _b, _c;
|
|
901
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
902
|
+
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)}/files/${encodeURIComponent(fileId)}/close`),
|
|
903
|
+
method: "PATCH",
|
|
904
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
905
|
+
? yield core.Supplier.get(this._options.project)
|
|
906
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
907
|
+
contentType: "application/json",
|
|
908
|
+
requestType: "json",
|
|
909
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
910
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
911
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
912
|
+
});
|
|
913
|
+
if (_response.ok) {
|
|
914
|
+
return _response.body;
|
|
915
|
+
}
|
|
916
|
+
if (_response.error.reason === "status-code") {
|
|
917
|
+
switch (_response.error.statusCode) {
|
|
918
|
+
case 422:
|
|
919
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
920
|
+
unrecognizedObjectKeys: "passthrough",
|
|
921
|
+
allowUnrecognizedUnionMembers: true,
|
|
922
|
+
allowUnrecognizedEnumValues: true,
|
|
923
|
+
skipValidation: true,
|
|
924
|
+
breadcrumbsPrefix: ["response"],
|
|
925
|
+
}));
|
|
926
|
+
default:
|
|
927
|
+
throw new errors.LettaError({
|
|
928
|
+
statusCode: _response.error.statusCode,
|
|
929
|
+
body: _response.error.body,
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
switch (_response.error.reason) {
|
|
934
|
+
case "non-json":
|
|
935
|
+
throw new errors.LettaError({
|
|
936
|
+
statusCode: _response.error.statusCode,
|
|
937
|
+
body: _response.error.rawBody,
|
|
938
|
+
});
|
|
939
|
+
case "timeout":
|
|
940
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/files/{file_id}/close.");
|
|
941
|
+
case "unknown":
|
|
942
|
+
throw new errors.LettaError({
|
|
943
|
+
message: _response.error.errorMessage,
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}
|
|
811
948
|
/**
|
|
812
949
|
* Summarize an agent's conversation history to a target message length.
|
|
813
950
|
*
|
|
@@ -836,7 +973,7 @@ class Agents {
|
|
|
836
973
|
method: "POST",
|
|
837
974
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
838
975
|
? yield core.Supplier.get(this._options.project)
|
|
839
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
976
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
840
977
|
contentType: "application/json",
|
|
841
978
|
queryParameters: _queryParams,
|
|
842
979
|
requestType: "json",
|
|
@@ -904,7 +1041,7 @@ class Agents {
|
|
|
904
1041
|
method: "POST",
|
|
905
1042
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
906
1043
|
? yield core.Supplier.get(this._options.project)
|
|
907
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1044
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
908
1045
|
contentType: "application/json",
|
|
909
1046
|
requestType: "json",
|
|
910
1047
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -85,4 +85,8 @@ export interface CreateAgentRequest {
|
|
|
85
85
|
responseFormat?: Letta.CreateAgentRequestResponseFormat;
|
|
86
86
|
/** The timezone of the agent (IANA format). */
|
|
87
87
|
timezone?: string;
|
|
88
|
+
/** Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. */
|
|
89
|
+
maxFilesOpen?: number;
|
|
90
|
+
/** The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. */
|
|
91
|
+
perFileViewWindowCharLimit?: number;
|
|
88
92
|
}
|
|
@@ -57,4 +57,8 @@ export interface UpdateAgent {
|
|
|
57
57
|
lastRunDurationMs?: number;
|
|
58
58
|
/** The timezone of the agent (IANA format). */
|
|
59
59
|
timezone?: string;
|
|
60
|
+
/** Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. */
|
|
61
|
+
maxFilesOpen?: number;
|
|
62
|
+
/** The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. */
|
|
63
|
+
perFileViewWindowCharLimit?: number;
|
|
60
64
|
}
|
|
@@ -79,7 +79,7 @@ class Blocks {
|
|
|
79
79
|
method: "GET",
|
|
80
80
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
81
|
? yield core.Supplier.get(this._options.project)
|
|
82
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,7 +148,7 @@ class Blocks {
|
|
|
148
148
|
method: "PATCH",
|
|
149
149
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
150
150
|
? yield core.Supplier.get(this._options.project)
|
|
151
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
151
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
152
152
|
contentType: "application/json",
|
|
153
153
|
requestType: "json",
|
|
154
154
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -216,7 +216,7 @@ class Blocks {
|
|
|
216
216
|
method: "GET",
|
|
217
217
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
218
218
|
? yield core.Supplier.get(this._options.project)
|
|
219
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
219
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
220
220
|
contentType: "application/json",
|
|
221
221
|
requestType: "json",
|
|
222
222
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -284,7 +284,7 @@ class Blocks {
|
|
|
284
284
|
method: "PATCH",
|
|
285
285
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
286
286
|
? yield core.Supplier.get(this._options.project)
|
|
287
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
287
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
288
288
|
contentType: "application/json",
|
|
289
289
|
requestType: "json",
|
|
290
290
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -352,7 +352,7 @@ class Blocks {
|
|
|
352
352
|
method: "PATCH",
|
|
353
353
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
354
354
|
? yield core.Supplier.get(this._options.project)
|
|
355
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
355
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
356
356
|
contentType: "application/json",
|
|
357
357
|
requestType: "json",
|
|
358
358
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -78,7 +78,7 @@ class Context {
|
|
|
78
78
|
method: "GET",
|
|
79
79
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
80
80
|
? yield core.Supplier.get(this._options.project)
|
|
81
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
81
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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,
|
|
@@ -79,7 +79,7 @@ class CoreMemory {
|
|
|
79
79
|
method: "GET",
|
|
80
80
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
81
|
? yield core.Supplier.get(this._options.project)
|
|
82
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -84,7 +84,7 @@ class Groups {
|
|
|
84
84
|
method: "GET",
|
|
85
85
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
86
86
|
? yield core.Supplier.get(this._options.project)
|
|
87
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
87
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
queryParameters: _queryParams,
|
|
90
90
|
requestType: "json",
|
|
@@ -80,7 +80,7 @@ class MemoryVariables {
|
|
|
80
80
|
method: "GET",
|
|
81
81
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
82
82
|
? yield core.Supplier.get(this._options.project)
|
|
83
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
83
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
requestType: "json",
|
|
86
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -105,7 +105,7 @@ class Messages {
|
|
|
105
105
|
method: "GET",
|
|
106
106
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
107
107
|
? yield core.Supplier.get(this._options.project)
|
|
108
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
108
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
109
109
|
contentType: "application/json",
|
|
110
110
|
queryParameters: _queryParams,
|
|
111
111
|
requestType: "json",
|
|
@@ -183,7 +183,7 @@ class Messages {
|
|
|
183
183
|
method: "POST",
|
|
184
184
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
185
185
|
? yield core.Supplier.get(this._options.project)
|
|
186
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
186
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
187
187
|
contentType: "application/json",
|
|
188
188
|
requestType: "json",
|
|
189
189
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -255,7 +255,7 @@ class Messages {
|
|
|
255
255
|
method: "PATCH",
|
|
256
256
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
257
257
|
? yield core.Supplier.get(this._options.project)
|
|
258
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
258
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
requestType: "json",
|
|
261
261
|
body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -317,7 +317,7 @@ class Messages {
|
|
|
317
317
|
method: "POST",
|
|
318
318
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
319
319
|
? yield core.Supplier.get(this._options.project)
|
|
320
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
320
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
321
321
|
contentType: "application/json",
|
|
322
322
|
requestType: "json",
|
|
323
323
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -399,7 +399,7 @@ class Messages {
|
|
|
399
399
|
method: "POST",
|
|
400
400
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
401
401
|
? yield core.Supplier.get(this._options.project)
|
|
402
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
402
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
403
403
|
contentType: "application/json",
|
|
404
404
|
requestType: "json",
|
|
405
405
|
body: request != null
|
|
@@ -484,7 +484,7 @@ class Messages {
|
|
|
484
484
|
method: "POST",
|
|
485
485
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
486
486
|
? yield core.Supplier.get(this._options.project)
|
|
487
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
487
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
488
488
|
contentType: "application/json",
|
|
489
489
|
requestType: "json",
|
|
490
490
|
body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -558,7 +558,7 @@ class Messages {
|
|
|
558
558
|
method: "PATCH",
|
|
559
559
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
560
560
|
? yield core.Supplier.get(this._options.project)
|
|
561
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
561
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
562
562
|
contentType: "application/json",
|
|
563
563
|
queryParameters: _queryParams,
|
|
564
564
|
requestType: "json",
|
|
@@ -639,7 +639,7 @@ class Messages {
|
|
|
639
639
|
method: "POST",
|
|
640
640
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
641
641
|
? yield core.Supplier.get(this._options.project)
|
|
642
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
642
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
643
643
|
contentType: "application/json",
|
|
644
644
|
requestType: "json",
|
|
645
645
|
body: serializers.agents.MessagesPreviewRawPayloadRequest.jsonOrThrow(request, {
|
|
@@ -96,7 +96,7 @@ class Passages {
|
|
|
96
96
|
method: "GET",
|
|
97
97
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
98
98
|
? yield core.Supplier.get(this._options.project)
|
|
99
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
99
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
100
100
|
contentType: "application/json",
|
|
101
101
|
queryParameters: _queryParams,
|
|
102
102
|
requestType: "json",
|
|
@@ -167,7 +167,7 @@ class Passages {
|
|
|
167
167
|
method: "POST",
|
|
168
168
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
169
|
? yield core.Supplier.get(this._options.project)
|
|
170
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
170
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -236,7 +236,7 @@ class Passages {
|
|
|
236
236
|
method: "DELETE",
|
|
237
237
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
238
238
|
? yield core.Supplier.get(this._options.project)
|
|
239
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
240
240
|
contentType: "application/json",
|
|
241
241
|
requestType: "json",
|
|
242
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -301,7 +301,7 @@ class Passages {
|
|
|
301
301
|
method: "PATCH",
|
|
302
302
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
303
303
|
? yield core.Supplier.get(this._options.project)
|
|
304
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
304
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
305
305
|
contentType: "application/json",
|
|
306
306
|
requestType: "json",
|
|
307
307
|
body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -79,7 +79,7 @@ class Sources {
|
|
|
79
79
|
method: "PATCH",
|
|
80
80
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
81
|
? yield core.Supplier.get(this._options.project)
|
|
82
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -147,7 +147,7 @@ class Sources {
|
|
|
147
147
|
method: "PATCH",
|
|
148
148
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
149
149
|
? yield core.Supplier.get(this._options.project)
|
|
150
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
150
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
151
151
|
contentType: "application/json",
|
|
152
152
|
requestType: "json",
|
|
153
153
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -214,7 +214,7 @@ class Sources {
|
|
|
214
214
|
method: "GET",
|
|
215
215
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
216
216
|
? yield core.Supplier.get(this._options.project)
|
|
217
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
217
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
218
218
|
contentType: "application/json",
|
|
219
219
|
requestType: "json",
|
|
220
220
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -98,7 +98,7 @@ class Templates {
|
|
|
98
98
|
method: "POST",
|
|
99
99
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
100
100
|
? yield core.Supplier.get(this._options.project)
|
|
101
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
101
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
102
102
|
contentType: "application/json",
|
|
103
103
|
queryParameters: _queryParams,
|
|
104
104
|
requestType: "json",
|
|
@@ -167,7 +167,7 @@ class Templates {
|
|
|
167
167
|
method: "POST",
|
|
168
168
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
169
|
? yield core.Supplier.get(this._options.project)
|
|
170
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
170
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -242,7 +242,7 @@ class Templates {
|
|
|
242
242
|
method: "POST",
|
|
243
243
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
244
244
|
? yield core.Supplier.get(this._options.project)
|
|
245
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
245
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.159", "User-Agent": "@letta-ai/letta-client/0.1.159", "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),
|
|
246
246
|
contentType: "application/json",
|
|
247
247
|
requestType: "json",
|
|
248
248
|
body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|