@letta-ai/letta-client 0.1.148 → 0.1.149
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 +0 -15
- package/api/resources/agents/client/Client.js +11 -86
- 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.d.ts +15 -0
- package/api/resources/agents/resources/messages/client/Client.js +81 -6
- 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.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +15 -3
- package/api/resources/blocks/resources/agents/client/index.d.ts +1 -1
- package/api/resources/blocks/resources/agents/client/index.js +15 -0
- package/api/resources/blocks/resources/agents/client/requests/AgentsListRequest.d.ts +13 -0
- package/api/resources/blocks/resources/agents/client/requests/AgentsListRequest.js +5 -0
- package/api/resources/blocks/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/blocks/resources/agents/client/requests/index.js +2 -0
- package/api/resources/blocks/resources/index.d.ts +1 -0
- package/api/resources/blocks/resources/index.js +4 -0
- package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- 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.d.ts +17 -0
- package/api/resources/sources/client/Client.js +80 -8
- 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/FileMetadata.d.ts +4 -0
- package/api/types/FileStats.d.ts +14 -0
- package/api/types/FileStats.js +5 -0
- package/api/types/LlmConfig.d.ts +2 -0
- package/api/types/OrganizationSourcesStats.d.ts +17 -0
- package/api/types/OrganizationSourcesStats.js +5 -0
- package/api/types/SourceStats.d.ts +19 -0
- package/api/types/SourceStats.js +5 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/api/resources/agents/client/Client.d.ts +0 -15
- package/dist/api/resources/agents/client/Client.js +11 -86
- 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.d.ts +15 -0
- package/dist/api/resources/agents/resources/messages/client/Client.js +81 -6
- 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.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +15 -3
- package/dist/api/resources/blocks/resources/agents/client/index.d.ts +1 -1
- package/dist/api/resources/blocks/resources/agents/client/index.js +15 -0
- package/dist/api/resources/blocks/resources/agents/client/requests/AgentsListRequest.d.ts +13 -0
- package/dist/api/resources/blocks/resources/agents/client/requests/AgentsListRequest.js +5 -0
- package/dist/api/resources/blocks/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/blocks/resources/agents/client/requests/index.js +2 -0
- package/dist/api/resources/blocks/resources/index.d.ts +1 -0
- package/dist/api/resources/blocks/resources/index.js +4 -0
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- 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.d.ts +17 -0
- package/dist/api/resources/sources/client/Client.js +80 -8
- 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/FileMetadata.d.ts +4 -0
- package/dist/api/types/FileStats.d.ts +14 -0
- package/dist/api/types/FileStats.js +5 -0
- package/dist/api/types/LlmConfig.d.ts +2 -0
- package/dist/api/types/OrganizationSourcesStats.d.ts +17 -0
- package/dist/api/types/OrganizationSourcesStats.js +5 -0
- package/dist/api/types/SourceStats.d.ts +19 -0
- package/dist/api/types/SourceStats.js +5 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- 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/agents/{client/cancelAgentRun.d.ts → resources/messages/client/cancel.d.ts} +4 -4
- package/dist/serialization/resources/agents/{client/cancelAgentRun.js → resources/messages/client/cancel.js} +1 -1
- package/dist/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/messages/client/index.js +2 -1
- package/dist/serialization/types/FileMetadata.d.ts +2 -0
- package/dist/serialization/types/FileMetadata.js +2 -0
- package/dist/serialization/types/FileStats.d.ts +14 -0
- package/dist/serialization/types/FileStats.js +45 -0
- package/dist/serialization/types/LlmConfig.d.ts +1 -0
- package/dist/serialization/types/LlmConfig.js +1 -0
- package/dist/serialization/types/OrganizationSourcesStats.d.ts +16 -0
- package/dist/serialization/types/OrganizationSourcesStats.js +47 -0
- package/dist/serialization/types/SourceStats.d.ts +17 -0
- package/dist/serialization/types/SourceStats.js +48 -0
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +143 -74
- package/serialization/resources/agents/client/index.d.ts +0 -1
- package/serialization/resources/agents/client/index.js +1 -2
- package/serialization/resources/agents/{client/cancelAgentRun.d.ts → resources/messages/client/cancel.d.ts} +4 -4
- package/serialization/resources/agents/{client/cancelAgentRun.js → resources/messages/client/cancel.js} +1 -1
- package/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
- package/serialization/resources/agents/resources/messages/client/index.js +2 -1
- package/serialization/types/FileMetadata.d.ts +2 -0
- package/serialization/types/FileMetadata.js +2 -0
- package/serialization/types/FileStats.d.ts +14 -0
- package/serialization/types/FileStats.js +45 -0
- package/serialization/types/LlmConfig.d.ts +1 -0
- package/serialization/types/LlmConfig.js +1 -0
- package/serialization/types/OrganizationSourcesStats.d.ts +16 -0
- package/serialization/types/OrganizationSourcesStats.js +47 -0
- package/serialization/types/SourceStats.d.ts +17 -0
- package/serialization/types/SourceStats.js +48 -0
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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,
|
|
@@ -87,6 +87,21 @@ export declare class Messages {
|
|
|
87
87
|
* It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
88
88
|
*/
|
|
89
89
|
createStream(agentId: string, request: Letta.LettaStreamingRequest, requestOptions?: Messages.RequestOptions): Promise<core.Stream<Letta.agents.LettaStreamingResponse>>;
|
|
90
|
+
/**
|
|
91
|
+
* Cancel runs associated with an agent. If run_ids are passed in, cancel those in particular.
|
|
92
|
+
*
|
|
93
|
+
* Note to cancel active runs associated with an agent, redis is required.
|
|
94
|
+
*
|
|
95
|
+
* @param {string} agentId
|
|
96
|
+
* @param {string[]} request
|
|
97
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.agents.messages.cancel("agent_id", undefined)
|
|
103
|
+
*/
|
|
104
|
+
cancel(agentId: string, request?: string[], requestOptions?: Messages.RequestOptions): Promise<Record<string, unknown>>;
|
|
90
105
|
/**
|
|
91
106
|
* Asynchronously process a user message and return a run object.
|
|
92
107
|
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
@@ -102,7 +102,7 @@ class Messages {
|
|
|
102
102
|
method: "GET",
|
|
103
103
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
104
104
|
? yield core.Supplier.get(this._options.project)
|
|
105
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
105
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
106
106
|
contentType: "application/json",
|
|
107
107
|
queryParameters: _queryParams,
|
|
108
108
|
requestType: "json",
|
|
@@ -180,7 +180,7 @@ class Messages {
|
|
|
180
180
|
method: "POST",
|
|
181
181
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
182
182
|
? yield core.Supplier.get(this._options.project)
|
|
183
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
183
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
184
184
|
contentType: "application/json",
|
|
185
185
|
requestType: "json",
|
|
186
186
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -252,7 +252,7 @@ class Messages {
|
|
|
252
252
|
method: "PATCH",
|
|
253
253
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
254
254
|
? yield core.Supplier.get(this._options.project)
|
|
255
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
255
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
256
256
|
contentType: "application/json",
|
|
257
257
|
requestType: "json",
|
|
258
258
|
body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -314,7 +314,7 @@ class Messages {
|
|
|
314
314
|
method: "POST",
|
|
315
315
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
316
316
|
? yield core.Supplier.get(this._options.project)
|
|
317
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
317
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
318
318
|
contentType: "application/json",
|
|
319
319
|
requestType: "json",
|
|
320
320
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -374,6 +374,81 @@ class Messages {
|
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Cancel runs associated with an agent. If run_ids are passed in, cancel those in particular.
|
|
379
|
+
*
|
|
380
|
+
* Note to cancel active runs associated with an agent, redis is required.
|
|
381
|
+
*
|
|
382
|
+
* @param {string} agentId
|
|
383
|
+
* @param {string[]} request
|
|
384
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
385
|
+
*
|
|
386
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* await client.agents.messages.cancel("agent_id", undefined)
|
|
390
|
+
*/
|
|
391
|
+
cancel(agentId, request, requestOptions) {
|
|
392
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
var _a, _b, _c;
|
|
394
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
395
|
+
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/cancel`),
|
|
396
|
+
method: "POST",
|
|
397
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
398
|
+
? yield core.Supplier.get(this._options.project)
|
|
399
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
400
|
+
contentType: "application/json",
|
|
401
|
+
requestType: "json",
|
|
402
|
+
body: request != null
|
|
403
|
+
? serializers.agents.messages.cancel.Request.jsonOrThrow(request, {
|
|
404
|
+
unrecognizedObjectKeys: "strip",
|
|
405
|
+
})
|
|
406
|
+
: undefined,
|
|
407
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
408
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
409
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
410
|
+
});
|
|
411
|
+
if (_response.ok) {
|
|
412
|
+
return serializers.agents.messages.cancel.Response.parseOrThrow(_response.body, {
|
|
413
|
+
unrecognizedObjectKeys: "passthrough",
|
|
414
|
+
allowUnrecognizedUnionMembers: true,
|
|
415
|
+
allowUnrecognizedEnumValues: true,
|
|
416
|
+
skipValidation: true,
|
|
417
|
+
breadcrumbsPrefix: ["response"],
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
if (_response.error.reason === "status-code") {
|
|
421
|
+
switch (_response.error.statusCode) {
|
|
422
|
+
case 422:
|
|
423
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
424
|
+
unrecognizedObjectKeys: "passthrough",
|
|
425
|
+
allowUnrecognizedUnionMembers: true,
|
|
426
|
+
allowUnrecognizedEnumValues: true,
|
|
427
|
+
skipValidation: true,
|
|
428
|
+
breadcrumbsPrefix: ["response"],
|
|
429
|
+
}));
|
|
430
|
+
default:
|
|
431
|
+
throw new errors.LettaError({
|
|
432
|
+
statusCode: _response.error.statusCode,
|
|
433
|
+
body: _response.error.body,
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
switch (_response.error.reason) {
|
|
438
|
+
case "non-json":
|
|
439
|
+
throw new errors.LettaError({
|
|
440
|
+
statusCode: _response.error.statusCode,
|
|
441
|
+
body: _response.error.rawBody,
|
|
442
|
+
});
|
|
443
|
+
case "timeout":
|
|
444
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/cancel.");
|
|
445
|
+
case "unknown":
|
|
446
|
+
throw new errors.LettaError({
|
|
447
|
+
message: _response.error.errorMessage,
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}
|
|
377
452
|
/**
|
|
378
453
|
* Asynchronously process a user message and return a run object.
|
|
379
454
|
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
@@ -406,7 +481,7 @@ class Messages {
|
|
|
406
481
|
method: "POST",
|
|
407
482
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
408
483
|
? yield core.Supplier.get(this._options.project)
|
|
409
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
484
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
410
485
|
contentType: "application/json",
|
|
411
486
|
requestType: "json",
|
|
412
487
|
body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -480,7 +555,7 @@ class Messages {
|
|
|
480
555
|
method: "PATCH",
|
|
481
556
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
482
557
|
? yield core.Supplier.get(this._options.project)
|
|
483
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
558
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
484
559
|
contentType: "application/json",
|
|
485
560
|
queryParameters: _queryParams,
|
|
486
561
|
requestType: "json",
|
|
@@ -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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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" }),
|
|
@@ -78,7 +78,7 @@ class Tools {
|
|
|
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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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,
|
|
@@ -146,7 +146,7 @@ class Tools {
|
|
|
146
146
|
method: "PATCH",
|
|
147
147
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
148
148
|
? yield core.Supplier.get(this._options.project)
|
|
149
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
149
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
150
150
|
contentType: "application/json",
|
|
151
151
|
requestType: "json",
|
|
152
152
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -214,7 +214,7 @@ class Tools {
|
|
|
214
214
|
method: "PATCH",
|
|
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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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,
|
|
@@ -77,7 +77,7 @@ class Batches {
|
|
|
77
77
|
method: "GET",
|
|
78
78
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
79
79
|
? yield core.Supplier.get(this._options.project)
|
|
80
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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,
|
|
@@ -156,7 +156,7 @@ class Batches {
|
|
|
156
156
|
method: "POST",
|
|
157
157
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
158
158
|
? yield core.Supplier.get(this._options.project)
|
|
159
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
159
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
160
160
|
contentType: "application/json",
|
|
161
161
|
requestType: "json",
|
|
162
162
|
body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -224,7 +224,7 @@ class Batches {
|
|
|
224
224
|
method: "GET",
|
|
225
225
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
226
226
|
? yield core.Supplier.get(this._options.project)
|
|
227
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
227
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
228
228
|
contentType: "application/json",
|
|
229
229
|
requestType: "json",
|
|
230
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -291,7 +291,7 @@ class Batches {
|
|
|
291
291
|
method: "PATCH",
|
|
292
292
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
293
293
|
? yield core.Supplier.get(this._options.project)
|
|
294
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
294
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
295
295
|
contentType: "application/json",
|
|
296
296
|
requestType: "json",
|
|
297
297
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -106,7 +106,7 @@ class Blocks {
|
|
|
106
106
|
method: "GET",
|
|
107
107
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
108
108
|
? yield core.Supplier.get(this._options.project)
|
|
109
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
109
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
110
110
|
contentType: "application/json",
|
|
111
111
|
queryParameters: _queryParams,
|
|
112
112
|
requestType: "json",
|
|
@@ -175,7 +175,7 @@ class Blocks {
|
|
|
175
175
|
method: "POST",
|
|
176
176
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
177
177
|
? yield core.Supplier.get(this._options.project)
|
|
178
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
178
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
179
179
|
contentType: "application/json",
|
|
180
180
|
requestType: "json",
|
|
181
181
|
body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -242,7 +242,7 @@ class Blocks {
|
|
|
242
242
|
method: "GET",
|
|
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.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -307,7 +307,7 @@ class Blocks {
|
|
|
307
307
|
method: "GET",
|
|
308
308
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
309
309
|
? yield core.Supplier.get(this._options.project)
|
|
310
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
310
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
311
311
|
contentType: "application/json",
|
|
312
312
|
requestType: "json",
|
|
313
313
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -372,7 +372,7 @@ class Blocks {
|
|
|
372
372
|
method: "DELETE",
|
|
373
373
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
374
374
|
? yield core.Supplier.get(this._options.project)
|
|
375
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
375
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
376
376
|
contentType: "application/json",
|
|
377
377
|
requestType: "json",
|
|
378
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -438,7 +438,7 @@ class Blocks {
|
|
|
438
438
|
method: "PATCH",
|
|
439
439
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
440
440
|
? yield core.Supplier.get(this._options.project)
|
|
441
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
441
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
|
|
442
442
|
contentType: "application/json",
|
|
443
443
|
requestType: "json",
|
|
444
444
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -35,6 +35,7 @@ export declare class Agents {
|
|
|
35
35
|
* Raises a 404 if the block does not exist.
|
|
36
36
|
*
|
|
37
37
|
* @param {string} blockId
|
|
38
|
+
* @param {Letta.blocks.AgentsListRequest} request
|
|
38
39
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
40
|
*
|
|
40
41
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
@@ -42,7 +43,7 @@ export declare class Agents {
|
|
|
42
43
|
* @example
|
|
43
44
|
* await client.blocks.agents.list("block_id")
|
|
44
45
|
*/
|
|
45
|
-
list(blockId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState[]>;
|
|
46
|
+
list(blockId: string, request?: Letta.blocks.AgentsListRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState[]>;
|
|
46
47
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
47
48
|
Authorization: string;
|
|
48
49
|
}>;
|
|
@@ -64,6 +64,7 @@ class Agents {
|
|
|
64
64
|
* Raises a 404 if the block does not exist.
|
|
65
65
|
*
|
|
66
66
|
* @param {string} blockId
|
|
67
|
+
* @param {Letta.blocks.AgentsListRequest} request
|
|
67
68
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
69
|
*
|
|
69
70
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
@@ -71,16 +72,27 @@ class Agents {
|
|
|
71
72
|
* @example
|
|
72
73
|
* await client.blocks.agents.list("block_id")
|
|
73
74
|
*/
|
|
74
|
-
list(
|
|
75
|
-
return __awaiter(this,
|
|
75
|
+
list(blockId_1) {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* (blockId, request = {}, requestOptions) {
|
|
76
77
|
var _a, _b, _c;
|
|
78
|
+
const { includeRelationships } = request;
|
|
79
|
+
const _queryParams = {};
|
|
80
|
+
if (includeRelationships != null) {
|
|
81
|
+
if (Array.isArray(includeRelationships)) {
|
|
82
|
+
_queryParams["include_relationships"] = includeRelationships.map((item) => item);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
_queryParams["include_relationships"] = includeRelationships;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
77
88
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
89
|
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/blocks/${encodeURIComponent(blockId)}/agents`),
|
|
79
90
|
method: "GET",
|
|
80
91
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
92
|
? 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.
|
|
93
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
94
|
contentType: "application/json",
|
|
95
|
+
queryParameters: _queryParams,
|
|
84
96
|
requestType: "json",
|
|
85
97
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
86
98
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests";
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|