@letta-ai/letta-client 0.1.9 → 0.1.12
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 +1 -4
- package/api/resources/agents/client/Client.js +21 -23
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/api/resources/agents/resources/index.d.ts +0 -1
- package/api/resources/agents/resources/index.js +1 -2
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/api/resources/agents/resources/messages/types/index.js +0 -1
- package/api/resources/agents/resources/sources/client/Client.js +1 -1
- 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/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/api/resources/agents/types/index.d.ts +1 -0
- package/api/resources/agents/types/index.js +1 -0
- package/api/resources/blocks/client/Client.js +7 -7
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.d.ts +11 -11
- package/api/resources/providers/client/Client.js +32 -32
- package/api/resources/providers/client/requests/index.d.ts +1 -1
- package/api/resources/runs/client/Client.d.ts +6 -8
- package/api/resources/runs/client/Client.js +12 -37
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/api/resources/sources/client/Client.js +8 -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/tag/client/Client.js +1 -1
- package/api/resources/tools/client/Client.d.ts +0 -12
- package/api/resources/tools/client/Client.js +11 -76
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{dist/api/types/LettaResponseMessagesItem.d.ts → api/types/LettaMessageUnion.d.ts} +2 -2
- package/api/types/LettaRequest.d.ts +2 -6
- package/api/types/LettaRequestConfig.d.ts +11 -0
- package/api/types/LettaResponse.d.ts +1 -1
- package/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/api/types/LlmConfigModelEndpointType.js +1 -0
- package/api/types/Run.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -3
- package/api/types/index.js +2 -3
- package/dist/api/resources/agents/client/Client.d.ts +1 -4
- package/dist/api/resources/agents/client/Client.js +21 -23
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/dist/api/resources/agents/resources/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/index.js +1 -2
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
- 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/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/dist/api/resources/agents/types/index.d.ts +1 -0
- package/dist/api/resources/agents/types/index.js +1 -0
- package/dist/api/resources/blocks/client/Client.js +7 -7
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.d.ts +11 -11
- package/dist/api/resources/providers/client/Client.js +32 -32
- package/dist/api/resources/providers/client/requests/index.d.ts +1 -1
- package/dist/api/resources/runs/client/Client.d.ts +6 -8
- package/dist/api/resources/runs/client/Client.js +12 -37
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/dist/api/resources/sources/client/Client.js +8 -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/tag/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.d.ts +0 -12
- package/dist/api/resources/tools/client/Client.js +11 -76
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{api/types/LettaResponseMessagesItem.d.ts → dist/api/types/LettaMessageUnion.d.ts} +2 -2
- package/dist/api/types/LettaRequest.d.ts +2 -6
- package/dist/api/types/LettaRequestConfig.d.ts +11 -0
- package/dist/api/types/LettaResponse.d.ts +1 -1
- package/dist/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/dist/api/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/api/types/Run.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -3
- package/dist/api/types/index.js +2 -3
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{serialization/resources/tools/client/getByName.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/dist/serialization/resources/agents/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/types/index.js +1 -0
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/dist/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/dist/serialization/resources/tools/client/index.d.ts +0 -1
- package/dist/serialization/resources/tools/client/index.js +1 -2
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/dist/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/dist/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/dist/serialization/types/LettaRequest.d.ts +2 -3
- package/dist/serialization/types/LettaRequest.js +2 -3
- package/dist/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/dist/serialization/types/{RecallMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/dist/serialization/types/LettaResponse.d.ts +2 -2
- package/dist/serialization/types/LettaResponse.js +2 -2
- package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/dist/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/serialization/types/Run.d.ts +2 -0
- package/dist/serialization/types/Run.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -3
- package/dist/serialization/types/index.js +2 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +24 -280
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{dist/serialization/resources/tools/client/getByName.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/serialization/resources/agents/types/index.d.ts +1 -0
- package/serialization/resources/agents/types/index.js +1 -0
- package/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/serialization/resources/tools/client/index.d.ts +0 -1
- package/serialization/resources/tools/client/index.js +1 -2
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/serialization/types/LettaRequest.d.ts +2 -3
- package/serialization/types/LettaRequest.js +2 -3
- package/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/serialization/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/serialization/types/LettaResponse.d.ts +2 -2
- package/serialization/types/LettaResponse.js +2 -2
- package/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/serialization/types/Run.d.ts +2 -0
- package/serialization/types/Run.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/serialization/types/index.d.ts +2 -3
- package/serialization/types/index.js +2 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/dist/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/dist/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/dist/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/dist/api/types/LettaResponseMessagesItem.js +0 -5
- package/dist/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/types/RecallMemorySummary.js +0 -5
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/dist/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/dist/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/dist/serialization/types/ArchivalMemorySummary.js +0 -43
- package/dist/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.js +0 -43
- /package/api/resources/agents/{resources/messages/types/MessagesListResponseItem.js → types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/api/types/{ArchivalMemorySummary.js → LettaMessageUnion.js} +0 -0
- /package/api/types/{LettaResponseMessagesItem.js → LettaRequestConfig.js} +0 -0
- /package/{api/types/RecallMemorySummary.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/dist/api/{resources/agents/resources/messages/types/MessagesListResponseItem.js → types/LettaMessageUnion.js} +0 -0
- /package/dist/api/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +0 -0
- /package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
- /package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
|
@@ -85,7 +85,7 @@ class Blocks {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
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/"),
|
|
87
87
|
method: "GET",
|
|
88
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
88
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
queryParameters: _queryParams,
|
|
91
91
|
requestType: "json",
|
|
@@ -152,7 +152,7 @@ class Blocks {
|
|
|
152
152
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
153
153
|
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/"),
|
|
154
154
|
method: "POST",
|
|
155
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
155
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
requestType: "json",
|
|
158
158
|
body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -216,7 +216,7 @@ class Blocks {
|
|
|
216
216
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
217
217
|
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)}`),
|
|
218
218
|
method: "GET",
|
|
219
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
219
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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,
|
|
@@ -279,7 +279,7 @@ class Blocks {
|
|
|
279
279
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
280
280
|
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)}`),
|
|
281
281
|
method: "DELETE",
|
|
282
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
282
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
283
283
|
contentType: "application/json",
|
|
284
284
|
requestType: "json",
|
|
285
285
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -343,7 +343,7 @@ class Blocks {
|
|
|
343
343
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
344
344
|
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)}`),
|
|
345
345
|
method: "PATCH",
|
|
346
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
346
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
347
347
|
contentType: "application/json",
|
|
348
348
|
requestType: "json",
|
|
349
349
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -415,7 +415,7 @@ class Blocks {
|
|
|
415
415
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
416
416
|
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)}/attach`),
|
|
417
417
|
method: "PATCH",
|
|
418
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
418
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
419
419
|
contentType: "application/json",
|
|
420
420
|
queryParameters: _queryParams,
|
|
421
421
|
requestType: "json",
|
|
@@ -481,7 +481,7 @@ class Blocks {
|
|
|
481
481
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
482
482
|
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)}/detach`),
|
|
483
483
|
method: "PATCH",
|
|
484
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
484
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
485
485
|
contentType: "application/json",
|
|
486
486
|
queryParameters: _queryParams,
|
|
487
487
|
requestType: "json",
|
|
@@ -70,7 +70,7 @@ class Health {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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/health/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -81,7 +81,7 @@ class Jobs {
|
|
|
81
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
82
|
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/jobs/"),
|
|
83
83
|
method: "GET",
|
|
84
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
84
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
queryParameters: _queryParams,
|
|
87
87
|
requestType: "json",
|
|
@@ -146,7 +146,7 @@ class Jobs {
|
|
|
146
146
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
147
|
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/jobs/active"),
|
|
148
148
|
method: "GET",
|
|
149
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
149
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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,
|
|
@@ -211,7 +211,7 @@ class Jobs {
|
|
|
211
211
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
212
212
|
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/jobs/${encodeURIComponent(jobId)}`),
|
|
213
213
|
method: "GET",
|
|
214
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
214
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
215
215
|
contentType: "application/json",
|
|
216
216
|
requestType: "json",
|
|
217
217
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -276,7 +276,7 @@ class Jobs {
|
|
|
276
276
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
277
277
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
|
|
278
278
|
method: "DELETE",
|
|
279
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
279
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
280
280
|
contentType: "application/json",
|
|
281
281
|
requestType: "json",
|
|
282
282
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -70,7 +70,7 @@ class Models {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
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/models/"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
73
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -119,7 +119,7 @@ class Models {
|
|
|
119
119
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
120
120
|
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/models/embedding"),
|
|
121
121
|
method: "GET",
|
|
122
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
122
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
123
123
|
contentType: "application/json",
|
|
124
124
|
requestType: "json",
|
|
125
125
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -54,34 +54,34 @@ export declare class Providers {
|
|
|
54
54
|
*/
|
|
55
55
|
createProvider(request: Letta.ProviderCreate, requestOptions?: Providers.RequestOptions): Promise<Letta.Provider>;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Delete an existing custom provider
|
|
58
58
|
*
|
|
59
|
-
* @param {Letta.
|
|
59
|
+
* @param {Letta.DeleteProviderRequest} request
|
|
60
60
|
* @param {Providers.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
61
|
*
|
|
62
62
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
|
-
* await client.providers.
|
|
66
|
-
*
|
|
67
|
-
* apiKey: "api_key"
|
|
65
|
+
* await client.providers.deleteProvider({
|
|
66
|
+
* providerId: "provider_id"
|
|
68
67
|
* })
|
|
69
68
|
*/
|
|
70
|
-
|
|
69
|
+
deleteProvider(request: Letta.DeleteProviderRequest, requestOptions?: Providers.RequestOptions): Promise<unknown>;
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
71
|
+
* Update an existing custom provider
|
|
73
72
|
*
|
|
74
|
-
* @param {Letta.
|
|
73
|
+
* @param {Letta.ProviderUpdate} request
|
|
75
74
|
* @param {Providers.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
75
|
*
|
|
77
76
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
78
77
|
*
|
|
79
78
|
* @example
|
|
80
|
-
* await client.providers.
|
|
81
|
-
*
|
|
79
|
+
* await client.providers.updateProvider({
|
|
80
|
+
* id: "id",
|
|
81
|
+
* apiKey: "api_key"
|
|
82
82
|
* })
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
updateProvider(request: Letta.ProviderUpdate, requestOptions?: Providers.RequestOptions): Promise<Letta.Provider>;
|
|
85
85
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
86
86
|
Authorization: string;
|
|
87
87
|
}>;
|
|
@@ -84,7 +84,7 @@ class Providers {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
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/providers/"),
|
|
86
86
|
method: "GET",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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",
|
|
@@ -153,7 +153,7 @@ class Providers {
|
|
|
153
153
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
154
|
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/providers/"),
|
|
155
155
|
method: "POST",
|
|
156
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
156
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
157
157
|
contentType: "application/json",
|
|
158
158
|
requestType: "json",
|
|
159
159
|
body: serializers.ProviderCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -203,41 +203,37 @@ class Providers {
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
|
-
*
|
|
206
|
+
* Delete an existing custom provider
|
|
207
207
|
*
|
|
208
|
-
* @param {Letta.
|
|
208
|
+
* @param {Letta.DeleteProviderRequest} request
|
|
209
209
|
* @param {Providers.RequestOptions} requestOptions - Request-specific configuration.
|
|
210
210
|
*
|
|
211
211
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
212
212
|
*
|
|
213
213
|
* @example
|
|
214
|
-
* await client.providers.
|
|
215
|
-
*
|
|
216
|
-
* apiKey: "api_key"
|
|
214
|
+
* await client.providers.deleteProvider({
|
|
215
|
+
* providerId: "provider_id"
|
|
217
216
|
* })
|
|
218
217
|
*/
|
|
219
|
-
|
|
218
|
+
deleteProvider(request, requestOptions) {
|
|
220
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
220
|
var _a, _b, _c;
|
|
221
|
+
const { providerId } = request;
|
|
222
|
+
const _queryParams = {};
|
|
223
|
+
_queryParams["provider_id"] = providerId;
|
|
222
224
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
223
225
|
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/providers/"),
|
|
224
|
-
method: "
|
|
225
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
226
|
+
method: "DELETE",
|
|
227
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
226
228
|
contentType: "application/json",
|
|
229
|
+
queryParameters: _queryParams,
|
|
227
230
|
requestType: "json",
|
|
228
|
-
body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
229
231
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
230
232
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
233
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
232
234
|
});
|
|
233
235
|
if (_response.ok) {
|
|
234
|
-
return
|
|
235
|
-
unrecognizedObjectKeys: "passthrough",
|
|
236
|
-
allowUnrecognizedUnionMembers: true,
|
|
237
|
-
allowUnrecognizedEnumValues: true,
|
|
238
|
-
skipValidation: true,
|
|
239
|
-
breadcrumbsPrefix: ["response"],
|
|
240
|
-
});
|
|
236
|
+
return _response.body;
|
|
241
237
|
}
|
|
242
238
|
if (_response.error.reason === "status-code") {
|
|
243
239
|
switch (_response.error.statusCode) {
|
|
@@ -263,7 +259,7 @@ class Providers {
|
|
|
263
259
|
body: _response.error.rawBody,
|
|
264
260
|
});
|
|
265
261
|
case "timeout":
|
|
266
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling
|
|
262
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/providers/.");
|
|
267
263
|
case "unknown":
|
|
268
264
|
throw new errors.LettaError({
|
|
269
265
|
message: _response.error.errorMessage,
|
|
@@ -272,37 +268,41 @@ class Providers {
|
|
|
272
268
|
});
|
|
273
269
|
}
|
|
274
270
|
/**
|
|
275
|
-
*
|
|
271
|
+
* Update an existing custom provider
|
|
276
272
|
*
|
|
277
|
-
* @param {Letta.
|
|
273
|
+
* @param {Letta.ProviderUpdate} request
|
|
278
274
|
* @param {Providers.RequestOptions} requestOptions - Request-specific configuration.
|
|
279
275
|
*
|
|
280
276
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
281
277
|
*
|
|
282
278
|
* @example
|
|
283
|
-
* await client.providers.
|
|
284
|
-
*
|
|
279
|
+
* await client.providers.updateProvider({
|
|
280
|
+
* id: "id",
|
|
281
|
+
* apiKey: "api_key"
|
|
285
282
|
* })
|
|
286
283
|
*/
|
|
287
|
-
|
|
284
|
+
updateProvider(request, requestOptions) {
|
|
288
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
286
|
var _a, _b, _c;
|
|
290
|
-
const { providerId } = request;
|
|
291
|
-
const _queryParams = {};
|
|
292
|
-
_queryParams["provider_id"] = providerId;
|
|
293
287
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
294
288
|
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/providers/"),
|
|
295
|
-
method: "
|
|
296
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
289
|
+
method: "PATCH",
|
|
290
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
297
291
|
contentType: "application/json",
|
|
298
|
-
queryParameters: _queryParams,
|
|
299
292
|
requestType: "json",
|
|
293
|
+
body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
300
294
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
301
295
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
302
296
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
303
297
|
});
|
|
304
298
|
if (_response.ok) {
|
|
305
|
-
return _response.body
|
|
299
|
+
return serializers.Provider.parseOrThrow(_response.body, {
|
|
300
|
+
unrecognizedObjectKeys: "passthrough",
|
|
301
|
+
allowUnrecognizedUnionMembers: true,
|
|
302
|
+
allowUnrecognizedEnumValues: true,
|
|
303
|
+
skipValidation: true,
|
|
304
|
+
breadcrumbsPrefix: ["response"],
|
|
305
|
+
});
|
|
306
306
|
}
|
|
307
307
|
if (_response.error.reason === "status-code") {
|
|
308
308
|
switch (_response.error.statusCode) {
|
|
@@ -328,7 +328,7 @@ class Providers {
|
|
|
328
328
|
body: _response.error.rawBody,
|
|
329
329
|
});
|
|
330
330
|
case "timeout":
|
|
331
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling
|
|
331
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/providers/.");
|
|
332
332
|
case "unknown":
|
|
333
333
|
throw new errors.LettaError({
|
|
334
334
|
message: _response.error.errorMessage,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { type ListProvidersRequest } from "./ListProvidersRequest";
|
|
2
2
|
export { type ProviderCreate } from "./ProviderCreate";
|
|
3
|
-
export { type ProviderUpdate } from "./ProviderUpdate";
|
|
4
3
|
export { type DeleteProviderRequest } from "./DeleteProviderRequest";
|
|
4
|
+
export { type ProviderUpdate } from "./ProviderUpdate";
|
|
@@ -78,17 +78,15 @@ export declare class Runs {
|
|
|
78
78
|
* Args:
|
|
79
79
|
* run_id: ID of the run
|
|
80
80
|
* cursor: Cursor for pagination
|
|
81
|
-
* start_date: Filter messages after this date
|
|
82
|
-
* end_date: Filter messages before this date
|
|
83
81
|
* limit: Maximum number of messages to return
|
|
84
|
-
* query_text: Search text in message content
|
|
85
82
|
* ascending: Sort order by creation time
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* role: Filter by message role (user/assistant/system/tool)
|
|
89
|
-
* tool_name: Filter by tool call name
|
|
83
|
+
* role: Filter by role (user/assistant/system/tool)
|
|
84
|
+
* return_message_object: Whether to return Message objects or LettaMessage objects
|
|
90
85
|
* user_id: ID of the user making the request
|
|
91
86
|
*
|
|
87
|
+
* Returns:
|
|
88
|
+
* A list of messages associated with the run. Default is List[LettaMessage].
|
|
89
|
+
*
|
|
92
90
|
* @param {string} runId
|
|
93
91
|
* @param {Letta.GetRunMessagesRequest} request
|
|
94
92
|
* @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -98,7 +96,7 @@ export declare class Runs {
|
|
|
98
96
|
* @example
|
|
99
97
|
* await client.runs.getRunMessages("run_id")
|
|
100
98
|
*/
|
|
101
|
-
getRunMessages(runId: string, request?: Letta.GetRunMessagesRequest, requestOptions?: Runs.RequestOptions): Promise<Letta.
|
|
99
|
+
getRunMessages(runId: string, request?: Letta.GetRunMessagesRequest, requestOptions?: Runs.RequestOptions): Promise<Letta.LettaMessageUnion[]>;
|
|
102
100
|
/**
|
|
103
101
|
* Get usage statistics for a run.
|
|
104
102
|
*
|
|
@@ -75,7 +75,7 @@ class Runs {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
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/runs/"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -139,7 +139,7 @@ class Runs {
|
|
|
139
139
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
140
140
|
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/runs/active"),
|
|
141
141
|
method: "GET",
|
|
142
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
142
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
143
143
|
contentType: "application/json",
|
|
144
144
|
requestType: "json",
|
|
145
145
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -204,7 +204,7 @@ class Runs {
|
|
|
204
204
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
205
205
|
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/runs/${encodeURIComponent(runId)}`),
|
|
206
206
|
method: "GET",
|
|
207
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
207
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
208
208
|
contentType: "application/json",
|
|
209
209
|
requestType: "json",
|
|
210
210
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -269,7 +269,7 @@ class Runs {
|
|
|
269
269
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
270
270
|
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/runs/${encodeURIComponent(runId)}`),
|
|
271
271
|
method: "DELETE",
|
|
272
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
272
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
273
273
|
contentType: "application/json",
|
|
274
274
|
requestType: "json",
|
|
275
275
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -323,17 +323,15 @@ class Runs {
|
|
|
323
323
|
* Args:
|
|
324
324
|
* run_id: ID of the run
|
|
325
325
|
* cursor: Cursor for pagination
|
|
326
|
-
* start_date: Filter messages after this date
|
|
327
|
-
* end_date: Filter messages before this date
|
|
328
326
|
* limit: Maximum number of messages to return
|
|
329
|
-
* query_text: Search text in message content
|
|
330
327
|
* ascending: Sort order by creation time
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* role: Filter by message role (user/assistant/system/tool)
|
|
334
|
-
* tool_name: Filter by tool call name
|
|
328
|
+
* role: Filter by role (user/assistant/system/tool)
|
|
329
|
+
* return_message_object: Whether to return Message objects or LettaMessage objects
|
|
335
330
|
* user_id: ID of the user making the request
|
|
336
331
|
*
|
|
332
|
+
* Returns:
|
|
333
|
+
* A list of messages associated with the run. Default is List[LettaMessage].
|
|
334
|
+
*
|
|
337
335
|
* @param {string} runId
|
|
338
336
|
* @param {Letta.GetRunMessagesRequest} request
|
|
339
337
|
* @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -346,47 +344,24 @@ class Runs {
|
|
|
346
344
|
getRunMessages(runId_1) {
|
|
347
345
|
return __awaiter(this, arguments, void 0, function* (runId, request = {}, requestOptions) {
|
|
348
346
|
var _a, _b, _c;
|
|
349
|
-
const { cursor,
|
|
347
|
+
const { cursor, limit, ascending, role } = request;
|
|
350
348
|
const _queryParams = {};
|
|
351
349
|
if (cursor != null) {
|
|
352
350
|
_queryParams["cursor"] = cursor;
|
|
353
351
|
}
|
|
354
|
-
if (startDate != null) {
|
|
355
|
-
_queryParams["start_date"] = startDate.toISOString();
|
|
356
|
-
}
|
|
357
|
-
if (endDate != null) {
|
|
358
|
-
_queryParams["end_date"] = endDate.toISOString();
|
|
359
|
-
}
|
|
360
352
|
if (limit != null) {
|
|
361
353
|
_queryParams["limit"] = limit.toString();
|
|
362
354
|
}
|
|
363
|
-
if (queryText != null) {
|
|
364
|
-
_queryParams["query_text"] = queryText;
|
|
365
|
-
}
|
|
366
355
|
if (ascending != null) {
|
|
367
356
|
_queryParams["ascending"] = ascending.toString();
|
|
368
357
|
}
|
|
369
|
-
if (tags != null) {
|
|
370
|
-
if (Array.isArray(tags)) {
|
|
371
|
-
_queryParams["tags"] = tags.map((item) => item);
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
_queryParams["tags"] = tags;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
if (matchAllTags != null) {
|
|
378
|
-
_queryParams["match_all_tags"] = matchAllTags.toString();
|
|
379
|
-
}
|
|
380
358
|
if (role != null) {
|
|
381
359
|
_queryParams["role"] = role;
|
|
382
360
|
}
|
|
383
|
-
if (toolName != null) {
|
|
384
|
-
_queryParams["tool_name"] = toolName;
|
|
385
|
-
}
|
|
386
361
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
387
362
|
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/runs/${encodeURIComponent(runId)}/messages`),
|
|
388
363
|
method: "GET",
|
|
389
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
364
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
390
365
|
contentType: "application/json",
|
|
391
366
|
queryParameters: _queryParams,
|
|
392
367
|
requestType: "json",
|
|
@@ -452,7 +427,7 @@ class Runs {
|
|
|
452
427
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
453
428
|
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/runs/${encodeURIComponent(runId)}/usage`),
|
|
454
429
|
method: "GET",
|
|
455
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
430
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
456
431
|
contentType: "application/json",
|
|
457
432
|
requestType: "json",
|
|
458
433
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -11,40 +11,16 @@ export interface GetRunMessagesRequest {
|
|
|
11
11
|
* Cursor for pagination
|
|
12
12
|
*/
|
|
13
13
|
cursor?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Filter messages after this date
|
|
16
|
-
*/
|
|
17
|
-
startDate?: Date;
|
|
18
|
-
/**
|
|
19
|
-
* Filter messages before this date
|
|
20
|
-
*/
|
|
21
|
-
endDate?: Date;
|
|
22
14
|
/**
|
|
23
15
|
* Maximum number of messages to return
|
|
24
16
|
*/
|
|
25
17
|
limit?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Search text in message content
|
|
28
|
-
*/
|
|
29
|
-
queryText?: string;
|
|
30
18
|
/**
|
|
31
19
|
* Sort order by creation time
|
|
32
20
|
*/
|
|
33
21
|
ascending?: boolean;
|
|
34
22
|
/**
|
|
35
|
-
* Filter by
|
|
36
|
-
*/
|
|
37
|
-
tags?: string | string[];
|
|
38
|
-
/**
|
|
39
|
-
* If true, match all tags. If false, match any tag
|
|
40
|
-
*/
|
|
41
|
-
matchAllTags?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Filter by message role
|
|
23
|
+
* Filter by role
|
|
44
24
|
*/
|
|
45
25
|
role?: Letta.MessageRole;
|
|
46
|
-
/**
|
|
47
|
-
* Filter by tool call name
|
|
48
|
-
*/
|
|
49
|
-
toolName?: string;
|
|
50
26
|
}
|