@letta-ai/letta-client 0.1.170 → 0.1.172
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/README.md +16 -3
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ConflictError.d.ts +2 -1
- package/api/errors/ConflictError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/PaymentRequiredError.d.ts +2 -1
- package/api/errors/PaymentRequiredError.js +2 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/api/errors/UnprocessableEntityError.js +2 -1
- package/api/resources/agents/client/Client.d.ts +20 -10
- package/api/resources/agents/client/Client.js +166 -82
- package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/context/client/Client.js +18 -9
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/files/client/Client.js +45 -21
- package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/api/resources/batches/client/Client.d.ts +8 -4
- package/api/resources/batches/client/Client.js +63 -30
- package/api/resources/blocks/client/Client.d.ts +12 -6
- package/api/resources/blocks/client/Client.js +100 -49
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/api/resources/embeddingModels/client/Client.js +18 -9
- package/api/resources/folders/client/Client.d.ts +18 -9
- package/api/resources/folders/client/Client.js +154 -76
- package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/api/resources/folders/resources/files/client/Client.js +48 -24
- package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/api/resources/groups/client/Client.d.ts +12 -6
- package/api/resources/groups/client/Client.js +105 -52
- package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/api/resources/health/client/Client.d.ts +2 -1
- package/api/resources/health/client/Client.js +17 -8
- package/api/resources/identities/client/Client.d.ts +14 -7
- package/api/resources/identities/client/Client.js +123 -61
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/api/resources/jobs/client/Client.d.ts +10 -5
- package/api/resources/jobs/client/Client.js +92 -47
- package/api/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/messages/client/Client.js +19 -10
- package/api/resources/models/client/Client.d.ts +2 -1
- package/api/resources/models/client/Client.js +27 -14
- package/api/resources/projects/client/Client.d.ts +2 -1
- package/api/resources/projects/client/Client.js +18 -9
- package/api/resources/providers/client/Client.d.ts +10 -5
- package/api/resources/providers/client/Client.js +77 -36
- package/api/resources/runs/client/Client.d.ts +8 -4
- package/api/resources/runs/client/Client.js +74 -38
- package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/api/resources/sources/client/Client.d.ts +20 -10
- package/api/resources/sources/client/Client.js +173 -86
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/api/resources/sources/resources/files/client/Client.js +48 -24
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/api/resources/steps/client/Client.d.ts +4 -2
- package/api/resources/steps/client/Client.js +41 -21
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/api/resources/tags/client/Client.d.ts +2 -1
- package/api/resources/tags/client/Client.js +19 -10
- package/api/resources/telemetry/client/Client.d.ts +2 -1
- package/api/resources/telemetry/client/Client.js +18 -9
- package/api/resources/templates/client/Client.d.ts +2 -1
- package/api/resources/templates/client/Client.js +18 -9
- package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/api/resources/tools/client/Client.d.ts +40 -20
- package/api/resources/tools/client/Client.js +356 -182
- package/api/resources/voice/client/Client.d.ts +2 -1
- package/api/resources/voice/client/Client.js +9 -3
- package/api/types/LettaStreamingRequest.d.ts +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +11 -3
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/core/form-data-utils/FormDataWrapper.js +53 -10
- package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +3 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +2 -0
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ConflictError.d.ts +2 -1
- package/dist/api/errors/ConflictError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
- package/dist/api/errors/PaymentRequiredError.js +2 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/dist/api/errors/UnprocessableEntityError.js +2 -1
- package/dist/api/resources/agents/client/Client.d.ts +20 -10
- package/dist/api/resources/agents/client/Client.js +166 -82
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/dist/api/resources/batches/client/Client.d.ts +8 -4
- package/dist/api/resources/batches/client/Client.js +63 -30
- package/dist/api/resources/blocks/client/Client.d.ts +12 -6
- package/dist/api/resources/blocks/client/Client.js +100 -49
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/dist/api/resources/embeddingModels/client/Client.js +18 -9
- package/dist/api/resources/folders/client/Client.d.ts +18 -9
- package/dist/api/resources/folders/client/Client.js +154 -76
- package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
- package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/groups/client/Client.d.ts +12 -6
- package/dist/api/resources/groups/client/Client.js +105 -52
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/dist/api/resources/health/client/Client.d.ts +2 -1
- package/dist/api/resources/health/client/Client.js +17 -8
- package/dist/api/resources/identities/client/Client.d.ts +14 -7
- package/dist/api/resources/identities/client/Client.js +123 -61
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/dist/api/resources/jobs/client/Client.d.ts +10 -5
- package/dist/api/resources/jobs/client/Client.js +92 -47
- package/dist/api/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/messages/client/Client.js +19 -10
- package/dist/api/resources/models/client/Client.d.ts +2 -1
- package/dist/api/resources/models/client/Client.js +27 -14
- package/dist/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/api/resources/projects/client/Client.js +18 -9
- package/dist/api/resources/providers/client/Client.d.ts +10 -5
- package/dist/api/resources/providers/client/Client.js +77 -36
- package/dist/api/resources/runs/client/Client.d.ts +8 -4
- package/dist/api/resources/runs/client/Client.js +74 -38
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/dist/api/resources/sources/client/Client.d.ts +20 -10
- package/dist/api/resources/sources/client/Client.js +173 -86
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/steps/client/Client.d.ts +4 -2
- package/dist/api/resources/steps/client/Client.js +41 -21
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/dist/api/resources/tags/client/Client.d.ts +2 -1
- package/dist/api/resources/tags/client/Client.js +19 -10
- package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
- package/dist/api/resources/telemetry/client/Client.js +18 -9
- package/dist/api/resources/templates/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/client/Client.js +18 -9
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/tools/client/Client.d.ts +40 -20
- package/dist/api/resources/tools/client/Client.js +356 -182
- package/dist/api/resources/voice/client/Client.d.ts +2 -1
- package/dist/api/resources/voice/client/Client.js +9 -3
- package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +11 -3
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +3 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +2 -0
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/errors/LettaError.d.ts +4 -1
- package/dist/errors/LettaError.js +6 -8
- package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/dist/serialization/types/LettaStreamingRequest.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/LettaError.d.ts +4 -1
- package/errors/LettaError.js +6 -8
- package/package.json +4 -4
- package/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/serialization/types/LettaStreamingRequest.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -85,20 +85,26 @@ class Templates {
|
|
|
85
85
|
* @example
|
|
86
86
|
* await client.agents.templates.createVersion("agent_id")
|
|
87
87
|
*/
|
|
88
|
-
createVersion(
|
|
88
|
+
createVersion(agentId, request = {}, requestOptions) {
|
|
89
|
+
return core.HttpResponsePromise.fromPromise(this.__createVersion(agentId, request, requestOptions));
|
|
90
|
+
}
|
|
91
|
+
__createVersion(agentId_1) {
|
|
89
92
|
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
90
93
|
var _a, _b, _c;
|
|
91
94
|
const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
|
|
92
95
|
const _queryParams = {};
|
|
93
96
|
if (returnAgentState != null) {
|
|
94
|
-
_queryParams["returnAgentState"] =
|
|
97
|
+
_queryParams["returnAgentState"] =
|
|
98
|
+
serializers.agents.TemplatesCreateVersionRequestReturnAgentState.jsonOrThrow(returnAgentState, {
|
|
99
|
+
unrecognizedObjectKeys: "strip",
|
|
100
|
+
});
|
|
95
101
|
}
|
|
96
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
97
103
|
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)}/version-template`),
|
|
98
104
|
method: "POST",
|
|
99
105
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
100
106
|
? 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.
|
|
107
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
108
|
contentType: "application/json",
|
|
103
109
|
queryParameters: _queryParams,
|
|
104
110
|
requestType: "json",
|
|
@@ -110,18 +116,19 @@ class Templates {
|
|
|
110
116
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
117
|
});
|
|
112
118
|
if (_response.ok) {
|
|
113
|
-
return;
|
|
119
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
114
120
|
}
|
|
115
121
|
if (_response.error.reason === "status-code") {
|
|
116
122
|
switch (_response.error.statusCode) {
|
|
117
123
|
case 404:
|
|
118
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
124
|
+
throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
|
|
119
125
|
case 500:
|
|
120
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
126
|
+
throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
|
|
121
127
|
default:
|
|
122
128
|
throw new errors.LettaError({
|
|
123
129
|
statusCode: _response.error.statusCode,
|
|
124
130
|
body: _response.error.body,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
125
132
|
});
|
|
126
133
|
}
|
|
127
134
|
}
|
|
@@ -130,12 +137,14 @@ class Templates {
|
|
|
130
137
|
throw new errors.LettaError({
|
|
131
138
|
statusCode: _response.error.statusCode,
|
|
132
139
|
body: _response.error.rawBody,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
133
141
|
});
|
|
134
142
|
case "timeout":
|
|
135
143
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template.");
|
|
136
144
|
case "unknown":
|
|
137
145
|
throw new errors.LettaError({
|
|
138
146
|
message: _response.error.errorMessage,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
139
148
|
});
|
|
140
149
|
}
|
|
141
150
|
});
|
|
@@ -160,6 +169,9 @@ class Templates {
|
|
|
160
169
|
* })
|
|
161
170
|
*/
|
|
162
171
|
migrate(agentId, request, requestOptions) {
|
|
172
|
+
return core.HttpResponsePromise.fromPromise(this.__migrate(agentId, request, requestOptions));
|
|
173
|
+
}
|
|
174
|
+
__migrate(agentId, request, requestOptions) {
|
|
163
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
176
|
var _a, _b, _c;
|
|
165
177
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -167,7 +179,7 @@ class Templates {
|
|
|
167
179
|
method: "POST",
|
|
168
180
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
181
|
? 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.
|
|
182
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
183
|
contentType: "application/json",
|
|
172
184
|
requestType: "json",
|
|
173
185
|
body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -176,18 +188,21 @@ class Templates {
|
|
|
176
188
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
177
189
|
});
|
|
178
190
|
if (_response.ok) {
|
|
179
|
-
return
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
191
|
+
return {
|
|
192
|
+
data: serializers.agents.TemplatesMigrateResponse.parseOrThrow(_response.body, {
|
|
193
|
+
unrecognizedObjectKeys: "passthrough",
|
|
194
|
+
allowUnrecognizedUnionMembers: true,
|
|
195
|
+
allowUnrecognizedEnumValues: true,
|
|
196
|
+
skipValidation: true,
|
|
197
|
+
breadcrumbsPrefix: ["response"],
|
|
198
|
+
}),
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
};
|
|
186
201
|
}
|
|
187
202
|
if (_response.error.reason === "status-code") {
|
|
188
203
|
switch (_response.error.statusCode) {
|
|
189
204
|
case 404:
|
|
190
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
205
|
+
throw new Letta.NotFoundError(_response.error.body, _response.rawResponse);
|
|
191
206
|
case 409:
|
|
192
207
|
throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
|
|
193
208
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -195,13 +210,14 @@ class Templates {
|
|
|
195
210
|
allowUnrecognizedEnumValues: true,
|
|
196
211
|
skipValidation: true,
|
|
197
212
|
breadcrumbsPrefix: ["response"],
|
|
198
|
-
}));
|
|
213
|
+
}), _response.rawResponse);
|
|
199
214
|
case 500:
|
|
200
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
215
|
+
throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
|
|
201
216
|
default:
|
|
202
217
|
throw new errors.LettaError({
|
|
203
218
|
statusCode: _response.error.statusCode,
|
|
204
219
|
body: _response.error.body,
|
|
220
|
+
rawResponse: _response.rawResponse,
|
|
205
221
|
});
|
|
206
222
|
}
|
|
207
223
|
}
|
|
@@ -210,12 +226,14 @@ class Templates {
|
|
|
210
226
|
throw new errors.LettaError({
|
|
211
227
|
statusCode: _response.error.statusCode,
|
|
212
228
|
body: _response.error.rawBody,
|
|
229
|
+
rawResponse: _response.rawResponse,
|
|
213
230
|
});
|
|
214
231
|
case "timeout":
|
|
215
232
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate.");
|
|
216
233
|
case "unknown":
|
|
217
234
|
throw new errors.LettaError({
|
|
218
235
|
message: _response.error.errorMessage,
|
|
236
|
+
rawResponse: _response.rawResponse,
|
|
219
237
|
});
|
|
220
238
|
}
|
|
221
239
|
});
|
|
@@ -234,7 +252,10 @@ class Templates {
|
|
|
234
252
|
* @example
|
|
235
253
|
* await client.agents.templates.create("agent_id")
|
|
236
254
|
*/
|
|
237
|
-
create(
|
|
255
|
+
create(agentId, request = {}, requestOptions) {
|
|
256
|
+
return core.HttpResponsePromise.fromPromise(this.__create(agentId, request, requestOptions));
|
|
257
|
+
}
|
|
258
|
+
__create(agentId_1) {
|
|
238
259
|
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
239
260
|
var _a, _b, _c;
|
|
240
261
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -242,7 +263,7 @@ class Templates {
|
|
|
242
263
|
method: "POST",
|
|
243
264
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
244
265
|
? 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.
|
|
266
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
267
|
contentType: "application/json",
|
|
247
268
|
requestType: "json",
|
|
248
269
|
body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -251,22 +272,26 @@ class Templates {
|
|
|
251
272
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
252
273
|
});
|
|
253
274
|
if (_response.ok) {
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
275
|
+
return {
|
|
276
|
+
data: serializers.agents.TemplatesCreateResponse.parseOrThrow(_response.body, {
|
|
277
|
+
unrecognizedObjectKeys: "passthrough",
|
|
278
|
+
allowUnrecognizedUnionMembers: true,
|
|
279
|
+
allowUnrecognizedEnumValues: true,
|
|
280
|
+
skipValidation: true,
|
|
281
|
+
breadcrumbsPrefix: ["response"],
|
|
282
|
+
}),
|
|
283
|
+
rawResponse: _response.rawResponse,
|
|
284
|
+
};
|
|
261
285
|
}
|
|
262
286
|
if (_response.error.reason === "status-code") {
|
|
263
287
|
switch (_response.error.statusCode) {
|
|
264
288
|
case 500:
|
|
265
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
289
|
+
throw new Letta.InternalServerError(_response.error.body, _response.rawResponse);
|
|
266
290
|
default:
|
|
267
291
|
throw new errors.LettaError({
|
|
268
292
|
statusCode: _response.error.statusCode,
|
|
269
293
|
body: _response.error.body,
|
|
294
|
+
rawResponse: _response.rawResponse,
|
|
270
295
|
});
|
|
271
296
|
}
|
|
272
297
|
}
|
|
@@ -275,12 +300,14 @@ class Templates {
|
|
|
275
300
|
throw new errors.LettaError({
|
|
276
301
|
statusCode: _response.error.statusCode,
|
|
277
302
|
body: _response.error.rawBody,
|
|
303
|
+
rawResponse: _response.rawResponse,
|
|
278
304
|
});
|
|
279
305
|
case "timeout":
|
|
280
306
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
|
|
281
307
|
case "unknown":
|
|
282
308
|
throw new errors.LettaError({
|
|
283
309
|
message: _response.error.errorMessage,
|
|
310
|
+
rawResponse: _response.rawResponse,
|
|
284
311
|
});
|
|
285
312
|
}
|
|
286
313
|
});
|
|
@@ -41,7 +41,8 @@ export declare class Tools {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.agents.tools.list("agent_id")
|
|
43
43
|
*/
|
|
44
|
-
list(agentId: string, requestOptions?: Tools.RequestOptions):
|
|
44
|
+
list(agentId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.Tool[]>;
|
|
45
|
+
private __list;
|
|
45
46
|
/**
|
|
46
47
|
* Attach a tool to an agent.
|
|
47
48
|
*
|
|
@@ -54,7 +55,8 @@ export declare class Tools {
|
|
|
54
55
|
* @example
|
|
55
56
|
* await client.agents.tools.attach("agent_id", "tool_id")
|
|
56
57
|
*/
|
|
57
|
-
attach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions):
|
|
58
|
+
attach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
|
|
59
|
+
private __attach;
|
|
58
60
|
/**
|
|
59
61
|
* Detach a tool from an agent.
|
|
60
62
|
*
|
|
@@ -67,7 +69,8 @@ export declare class Tools {
|
|
|
67
69
|
* @example
|
|
68
70
|
* await client.agents.tools.detach("agent_id", "tool_id")
|
|
69
71
|
*/
|
|
70
|
-
detach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions):
|
|
72
|
+
detach(agentId: string, toolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
|
|
73
|
+
private __detach;
|
|
71
74
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
72
75
|
Authorization: string;
|
|
73
76
|
}>;
|
|
@@ -71,6 +71,9 @@ class Tools {
|
|
|
71
71
|
* await client.agents.tools.list("agent_id")
|
|
72
72
|
*/
|
|
73
73
|
list(agentId, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__list(agentId, requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__list(agentId, requestOptions) {
|
|
74
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
78
|
var _a, _b, _c;
|
|
76
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -78,7 +81,7 @@ class Tools {
|
|
|
78
81
|
method: "GET",
|
|
79
82
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
80
83
|
? 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.
|
|
84
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
85
|
contentType: "application/json",
|
|
83
86
|
requestType: "json",
|
|
84
87
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -86,13 +89,16 @@ class Tools {
|
|
|
86
89
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
87
90
|
});
|
|
88
91
|
if (_response.ok) {
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
return {
|
|
93
|
+
data: serializers.agents.tools.list.Response.parseOrThrow(_response.body, {
|
|
94
|
+
unrecognizedObjectKeys: "passthrough",
|
|
95
|
+
allowUnrecognizedUnionMembers: true,
|
|
96
|
+
allowUnrecognizedEnumValues: true,
|
|
97
|
+
skipValidation: true,
|
|
98
|
+
breadcrumbsPrefix: ["response"],
|
|
99
|
+
}),
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
};
|
|
96
102
|
}
|
|
97
103
|
if (_response.error.reason === "status-code") {
|
|
98
104
|
switch (_response.error.statusCode) {
|
|
@@ -103,11 +109,12 @@ class Tools {
|
|
|
103
109
|
allowUnrecognizedEnumValues: true,
|
|
104
110
|
skipValidation: true,
|
|
105
111
|
breadcrumbsPrefix: ["response"],
|
|
106
|
-
}));
|
|
112
|
+
}), _response.rawResponse);
|
|
107
113
|
default:
|
|
108
114
|
throw new errors.LettaError({
|
|
109
115
|
statusCode: _response.error.statusCode,
|
|
110
116
|
body: _response.error.body,
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
111
118
|
});
|
|
112
119
|
}
|
|
113
120
|
}
|
|
@@ -116,12 +123,14 @@ class Tools {
|
|
|
116
123
|
throw new errors.LettaError({
|
|
117
124
|
statusCode: _response.error.statusCode,
|
|
118
125
|
body: _response.error.rawBody,
|
|
126
|
+
rawResponse: _response.rawResponse,
|
|
119
127
|
});
|
|
120
128
|
case "timeout":
|
|
121
129
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/tools.");
|
|
122
130
|
case "unknown":
|
|
123
131
|
throw new errors.LettaError({
|
|
124
132
|
message: _response.error.errorMessage,
|
|
133
|
+
rawResponse: _response.rawResponse,
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
136
|
});
|
|
@@ -139,6 +148,9 @@ class Tools {
|
|
|
139
148
|
* await client.agents.tools.attach("agent_id", "tool_id")
|
|
140
149
|
*/
|
|
141
150
|
attach(agentId, toolId, requestOptions) {
|
|
151
|
+
return core.HttpResponsePromise.fromPromise(this.__attach(agentId, toolId, requestOptions));
|
|
152
|
+
}
|
|
153
|
+
__attach(agentId, toolId, requestOptions) {
|
|
142
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
155
|
var _a, _b, _c;
|
|
144
156
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -146,7 +158,7 @@ class Tools {
|
|
|
146
158
|
method: "PATCH",
|
|
147
159
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
148
160
|
? 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.
|
|
161
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
162
|
contentType: "application/json",
|
|
151
163
|
requestType: "json",
|
|
152
164
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -154,13 +166,16 @@ class Tools {
|
|
|
154
166
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
155
167
|
});
|
|
156
168
|
if (_response.ok) {
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
169
|
+
return {
|
|
170
|
+
data: serializers.AgentState.parseOrThrow(_response.body, {
|
|
171
|
+
unrecognizedObjectKeys: "passthrough",
|
|
172
|
+
allowUnrecognizedUnionMembers: true,
|
|
173
|
+
allowUnrecognizedEnumValues: true,
|
|
174
|
+
skipValidation: true,
|
|
175
|
+
breadcrumbsPrefix: ["response"],
|
|
176
|
+
}),
|
|
177
|
+
rawResponse: _response.rawResponse,
|
|
178
|
+
};
|
|
164
179
|
}
|
|
165
180
|
if (_response.error.reason === "status-code") {
|
|
166
181
|
switch (_response.error.statusCode) {
|
|
@@ -171,11 +186,12 @@ class Tools {
|
|
|
171
186
|
allowUnrecognizedEnumValues: true,
|
|
172
187
|
skipValidation: true,
|
|
173
188
|
breadcrumbsPrefix: ["response"],
|
|
174
|
-
}));
|
|
189
|
+
}), _response.rawResponse);
|
|
175
190
|
default:
|
|
176
191
|
throw new errors.LettaError({
|
|
177
192
|
statusCode: _response.error.statusCode,
|
|
178
193
|
body: _response.error.body,
|
|
194
|
+
rawResponse: _response.rawResponse,
|
|
179
195
|
});
|
|
180
196
|
}
|
|
181
197
|
}
|
|
@@ -184,12 +200,14 @@ class Tools {
|
|
|
184
200
|
throw new errors.LettaError({
|
|
185
201
|
statusCode: _response.error.statusCode,
|
|
186
202
|
body: _response.error.rawBody,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
187
204
|
});
|
|
188
205
|
case "timeout":
|
|
189
206
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/tools/attach/{tool_id}.");
|
|
190
207
|
case "unknown":
|
|
191
208
|
throw new errors.LettaError({
|
|
192
209
|
message: _response.error.errorMessage,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
193
211
|
});
|
|
194
212
|
}
|
|
195
213
|
});
|
|
@@ -207,6 +225,9 @@ class Tools {
|
|
|
207
225
|
* await client.agents.tools.detach("agent_id", "tool_id")
|
|
208
226
|
*/
|
|
209
227
|
detach(agentId, toolId, requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__detach(agentId, toolId, requestOptions));
|
|
229
|
+
}
|
|
230
|
+
__detach(agentId, toolId, requestOptions) {
|
|
210
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
211
232
|
var _a, _b, _c;
|
|
212
233
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -214,7 +235,7 @@ class Tools {
|
|
|
214
235
|
method: "PATCH",
|
|
215
236
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
216
237
|
? 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.
|
|
238
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "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
239
|
contentType: "application/json",
|
|
219
240
|
requestType: "json",
|
|
220
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -222,13 +243,16 @@ class Tools {
|
|
|
222
243
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
223
244
|
});
|
|
224
245
|
if (_response.ok) {
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
246
|
+
return {
|
|
247
|
+
data: serializers.AgentState.parseOrThrow(_response.body, {
|
|
248
|
+
unrecognizedObjectKeys: "passthrough",
|
|
249
|
+
allowUnrecognizedUnionMembers: true,
|
|
250
|
+
allowUnrecognizedEnumValues: true,
|
|
251
|
+
skipValidation: true,
|
|
252
|
+
breadcrumbsPrefix: ["response"],
|
|
253
|
+
}),
|
|
254
|
+
rawResponse: _response.rawResponse,
|
|
255
|
+
};
|
|
232
256
|
}
|
|
233
257
|
if (_response.error.reason === "status-code") {
|
|
234
258
|
switch (_response.error.statusCode) {
|
|
@@ -239,11 +263,12 @@ class Tools {
|
|
|
239
263
|
allowUnrecognizedEnumValues: true,
|
|
240
264
|
skipValidation: true,
|
|
241
265
|
breadcrumbsPrefix: ["response"],
|
|
242
|
-
}));
|
|
266
|
+
}), _response.rawResponse);
|
|
243
267
|
default:
|
|
244
268
|
throw new errors.LettaError({
|
|
245
269
|
statusCode: _response.error.statusCode,
|
|
246
270
|
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
247
272
|
});
|
|
248
273
|
}
|
|
249
274
|
}
|
|
@@ -252,12 +277,14 @@ class Tools {
|
|
|
252
277
|
throw new errors.LettaError({
|
|
253
278
|
statusCode: _response.error.statusCode,
|
|
254
279
|
body: _response.error.rawBody,
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
255
281
|
});
|
|
256
282
|
case "timeout":
|
|
257
283
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/tools/detach/{tool_id}.");
|
|
258
284
|
case "unknown":
|
|
259
285
|
throw new errors.LettaError({
|
|
260
286
|
message: _response.error.errorMessage,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
261
288
|
});
|
|
262
289
|
}
|
|
263
290
|
});
|
|
@@ -40,7 +40,8 @@ export declare class Batches {
|
|
|
40
40
|
* @example
|
|
41
41
|
* await client.batches.list()
|
|
42
42
|
*/
|
|
43
|
-
list(requestOptions?: Batches.RequestOptions):
|
|
43
|
+
list(requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob[]>;
|
|
44
|
+
private __list;
|
|
44
45
|
/**
|
|
45
46
|
* Submit a batch of agent messages for asynchronous processing.
|
|
46
47
|
* Creates a job that will fan out messages to all listed agents and process them in parallel.
|
|
@@ -64,7 +65,8 @@ export declare class Batches {
|
|
|
64
65
|
* }]
|
|
65
66
|
* })
|
|
66
67
|
*/
|
|
67
|
-
create(request: Letta.CreateBatch, requestOptions?: Batches.RequestOptions):
|
|
68
|
+
create(request: Letta.CreateBatch, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob>;
|
|
69
|
+
private __create;
|
|
68
70
|
/**
|
|
69
71
|
* Get the status of a batch run.
|
|
70
72
|
*
|
|
@@ -76,7 +78,8 @@ export declare class Batches {
|
|
|
76
78
|
* @example
|
|
77
79
|
* await client.batches.retrieve("batch_id")
|
|
78
80
|
*/
|
|
79
|
-
retrieve(batchId: string, requestOptions?: Batches.RequestOptions):
|
|
81
|
+
retrieve(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<Letta.BatchJob>;
|
|
82
|
+
private __retrieve;
|
|
80
83
|
/**
|
|
81
84
|
* Cancel a batch run.
|
|
82
85
|
*
|
|
@@ -88,7 +91,8 @@ export declare class Batches {
|
|
|
88
91
|
* @example
|
|
89
92
|
* await client.batches.cancel("batch_id")
|
|
90
93
|
*/
|
|
91
|
-
cancel(batchId: string, requestOptions?: Batches.RequestOptions):
|
|
94
|
+
cancel(batchId: string, requestOptions?: Batches.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
95
|
+
private __cancel;
|
|
92
96
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
93
97
|
Authorization: string;
|
|
94
98
|
}>;
|