@letta-ai/letta-client 0.1.0 → 0.1.2
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 +38 -2
- package/api/resources/agents/client/Client.js +184 -26
- package/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
- package/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
- package/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
- package/api/resources/agents/client/requests/index.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
- package/api/resources/agents/resources/context/client/Client.js +2 -2
- package/api/resources/agents/resources/memory/client/Client.js +2 -2
- package/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
- package/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
- package/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
- package/api/resources/agents/resources/sources/client/Client.js +2 -2
- package/api/resources/agents/resources/tools/client/Client.js +6 -6
- package/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
- package/api/{types/LettaResponseToolReturnMessageStatus.js → resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js} +4 -4
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
- package/api/resources/agents/types/index.d.ts +9 -1
- package/api/resources/agents/types/index.js +9 -1
- package/api/resources/blocks/client/Client.js +14 -14
- package/api/resources/health/client/Client.js +2 -2
- package/api/resources/jobs/client/Client.js +8 -8
- package/api/resources/models/client/Client.js +4 -4
- package/api/resources/sources/client/Client.js +16 -16
- package/api/resources/sources/resources/files/client/Client.js +6 -6
- package/api/resources/sources/resources/passages/client/Client.js +2 -2
- package/api/resources/tools/client/Client.js +24 -24
- package/api/types/InternalServerErrorBody.d.ts +1 -1
- package/api/types/LettaResponse.d.ts +12 -62
- package/api/types/LettaUsageStatistics.d.ts +1 -0
- package/api/types/NotFoundErrorBody.d.ts +1 -2
- package/api/types/index.d.ts +0 -13
- package/api/types/index.js +0 -13
- package/dist/api/resources/agents/client/Client.d.ts +38 -2
- package/dist/api/resources/agents/client/Client.js +184 -26
- package/dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
- package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
- package/dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/context/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/memory/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/sources/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/tools/client/Client.js +6 -6
- package/dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
- package/dist/api/{types/LettaResponseToolReturnMessageStatus.js → resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js} +4 -4
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
- package/dist/api/resources/agents/types/index.d.ts +9 -1
- package/dist/api/resources/agents/types/index.js +9 -1
- package/dist/api/resources/blocks/client/Client.js +14 -14
- package/dist/api/resources/health/client/Client.js +2 -2
- package/dist/api/resources/jobs/client/Client.js +8 -8
- package/dist/api/resources/models/client/Client.js +4 -4
- package/dist/api/resources/sources/client/Client.js +16 -16
- package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
- package/dist/api/resources/sources/resources/passages/client/Client.js +2 -2
- package/dist/api/resources/tools/client/Client.js +24 -24
- package/dist/api/types/InternalServerErrorBody.d.ts +1 -1
- package/dist/api/types/LettaResponse.d.ts +12 -62
- package/dist/api/types/LettaUsageStatistics.d.ts +1 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +1 -2
- package/dist/api/types/index.d.ts +0 -13
- package/dist/api/types/index.js +0 -13
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +2 -2
- package/environments.js +1 -1
- package/package.json +1 -1
- package/reference.md +199 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
- package/api/types/LettaResponseAssistantMessage.d.ts +0 -9
- package/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -22
- package/api/types/LettaResponseReasoningMessage.d.ts +0 -17
- package/api/types/LettaResponseSystemMessage.d.ts +0 -17
- package/api/types/LettaResponseToolCall.d.ts +0 -8
- package/api/types/LettaResponseToolCallDelta.d.ts +0 -8
- package/api/types/LettaResponseToolCallMessage.d.ts +0 -18
- package/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
- package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
- package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
- package/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
- package/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
- package/api/types/LettaResponseUserMessage.d.ts +0 -17
- package/dist/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
- package/dist/api/types/LettaResponseAssistantMessage.d.ts +0 -9
- package/dist/api/types/LettaResponseAssistantMessage.js +0 -5
- package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -22
- package/dist/api/types/LettaResponseLettaUsageStatistics.js +0 -5
- package/dist/api/types/LettaResponseReasoningMessage.d.ts +0 -17
- package/dist/api/types/LettaResponseReasoningMessage.js +0 -5
- package/dist/api/types/LettaResponseSystemMessage.d.ts +0 -17
- package/dist/api/types/LettaResponseSystemMessage.js +0 -5
- package/dist/api/types/LettaResponseToolCall.d.ts +0 -8
- package/dist/api/types/LettaResponseToolCall.js +0 -5
- package/dist/api/types/LettaResponseToolCallDelta.d.ts +0 -8
- package/dist/api/types/LettaResponseToolCallDelta.js +0 -5
- package/dist/api/types/LettaResponseToolCallMessage.d.ts +0 -18
- package/dist/api/types/LettaResponseToolCallMessage.js +0 -5
- package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
- package/dist/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
- package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
- package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
- package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
- package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
- package/dist/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
- package/dist/api/types/LettaResponseToolReturnMessage.js +0 -5
- package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
- package/dist/api/types/LettaResponseUserMessage.d.ts +0 -17
- package/dist/api/types/LettaResponseUserMessage.js +0 -5
- /package/api/resources/agents/{types/AgentsCreateVersionResponse.js → client/requests/AgentsCreateTemplateFromAgentRequest.js} +0 -0
- /package/api/{types/LettaResponseAssistantMessage.js → resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js} +0 -0
- /package/api/{types/LettaResponseLettaUsageStatistics.js → resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
- /package/api/{types/LettaResponseReasoningMessage.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js} +0 -0
- /package/api/{types/LettaResponseSystemMessage.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js} +0 -0
- /package/api/{types/LettaResponseToolCall.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js} +0 -0
- /package/api/{types/LettaResponseToolCallDelta.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.js} +0 -0
- /package/{api/types/LettaResponseToolCallMessage.js → dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js} +0 -0
- /package/{api/types/LettaResponseToolCallMessageToolCall.js → dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js} +0 -0
- /package/{api/types/LettaResponseToolCallMessageToolCallOne.js → dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
- /package/{api/types/LettaResponseToolCallMessageToolCallZero.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js} +0 -0
- /package/{api/types/LettaResponseToolReturnMessage.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js} +0 -0
- /package/{api/types/LettaResponseUserMessage.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js} +0 -0
- /package/dist/api/resources/agents/types/{AgentsCreateVersionResponse.js → AgentsSearchDeployedAgentsRequestSearchItemZero.js} +0 -0
|
@@ -73,9 +73,9 @@ class Sources {
|
|
|
73
73
|
var _a, _b;
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
76
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, 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,
|
|
@@ -126,9 +126,9 @@ class Sources {
|
|
|
126
126
|
var _a, _b;
|
|
127
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
128
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
129
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
129
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
130
130
|
method: "DELETE",
|
|
131
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
131
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
132
132
|
contentType: "application/json",
|
|
133
133
|
requestType: "json",
|
|
134
134
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -180,9 +180,9 @@ class Sources {
|
|
|
180
180
|
var _a, _b;
|
|
181
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
182
182
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
183
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
183
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
|
|
184
184
|
method: "PATCH",
|
|
185
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
185
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
186
186
|
contentType: "application/json",
|
|
187
187
|
requestType: "json",
|
|
188
188
|
body: request,
|
|
@@ -234,9 +234,9 @@ class Sources {
|
|
|
234
234
|
var _a, _b;
|
|
235
235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
236
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
237
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
237
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
|
|
238
238
|
method: "GET",
|
|
239
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
239
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
240
|
contentType: "application/json",
|
|
241
241
|
requestType: "json",
|
|
242
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -286,9 +286,9 @@ class Sources {
|
|
|
286
286
|
var _a, _b;
|
|
287
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
288
288
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
289
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
289
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
290
290
|
method: "GET",
|
|
291
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
291
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
292
292
|
contentType: "application/json",
|
|
293
293
|
requestType: "json",
|
|
294
294
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -341,9 +341,9 @@ class Sources {
|
|
|
341
341
|
var _a, _b;
|
|
342
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
343
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
344
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
344
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
|
|
345
345
|
method: "POST",
|
|
346
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
346
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
347
347
|
contentType: "application/json",
|
|
348
348
|
requestType: "json",
|
|
349
349
|
body: request,
|
|
@@ -401,9 +401,9 @@ class Sources {
|
|
|
401
401
|
const _queryParams = {};
|
|
402
402
|
_queryParams["agent_id"] = agentId;
|
|
403
403
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
404
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
404
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/attach`),
|
|
405
405
|
method: "POST",
|
|
406
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
406
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
407
407
|
contentType: "application/json",
|
|
408
408
|
queryParameters: _queryParams,
|
|
409
409
|
requestType: "json",
|
|
@@ -461,9 +461,9 @@ class Sources {
|
|
|
461
461
|
const _queryParams = {};
|
|
462
462
|
_queryParams["agent_id"] = agentId;
|
|
463
463
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
464
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
464
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/detach`),
|
|
465
465
|
method: "POST",
|
|
466
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
466
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
467
467
|
contentType: "application/json",
|
|
468
468
|
queryParameters: _queryParams,
|
|
469
469
|
requestType: "json",
|
|
@@ -67,9 +67,9 @@ class Files {
|
|
|
67
67
|
yield _request.appendFile("file", file);
|
|
68
68
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
70
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
|
|
71
71
|
method: "POST",
|
|
72
|
-
headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
72
|
+
headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
73
73
|
requestType: "file",
|
|
74
74
|
duplex: _maybeEncodedRequest.duplex,
|
|
75
75
|
body: _maybeEncodedRequest.body,
|
|
@@ -130,9 +130,9 @@ class Files {
|
|
|
130
130
|
_queryParams["cursor"] = cursor;
|
|
131
131
|
}
|
|
132
132
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
133
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
133
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
|
|
134
134
|
method: "GET",
|
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
queryParameters: _queryParams,
|
|
138
138
|
requestType: "json",
|
|
@@ -185,9 +185,9 @@ class Files {
|
|
|
185
185
|
var _a, _b;
|
|
186
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
187
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
188
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
188
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
|
|
189
189
|
method: "DELETE",
|
|
190
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
191
191
|
contentType: "application/json",
|
|
192
192
|
requestType: "json",
|
|
193
193
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -63,9 +63,9 @@ class Passages {
|
|
|
63
63
|
var _a, _b;
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
66
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -63,9 +63,9 @@ class Tools {
|
|
|
63
63
|
var _a, _b;
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
66
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -116,9 +116,9 @@ class Tools {
|
|
|
116
116
|
var _a, _b;
|
|
117
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
118
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
119
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
119
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
|
|
120
120
|
method: "DELETE",
|
|
121
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
121
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
122
122
|
contentType: "application/json",
|
|
123
123
|
requestType: "json",
|
|
124
124
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -170,9 +170,9 @@ class Tools {
|
|
|
170
170
|
var _a, _b;
|
|
171
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
173
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
173
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
|
|
174
174
|
method: "PATCH",
|
|
175
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
175
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
176
176
|
contentType: "application/json",
|
|
177
177
|
requestType: "json",
|
|
178
178
|
body: request,
|
|
@@ -224,9 +224,9 @@ class Tools {
|
|
|
224
224
|
var _a, _b;
|
|
225
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
226
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
227
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/name/${encodeURIComponent(toolName)}`),
|
|
228
228
|
method: "GET",
|
|
229
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
229
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
230
230
|
contentType: "application/json",
|
|
231
231
|
requestType: "json",
|
|
232
232
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -285,9 +285,9 @@ class Tools {
|
|
|
285
285
|
_queryParams["limit"] = limit.toString();
|
|
286
286
|
}
|
|
287
287
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
288
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
288
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
|
|
289
289
|
method: "GET",
|
|
290
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
290
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
291
291
|
contentType: "application/json",
|
|
292
292
|
queryParameters: _queryParams,
|
|
293
293
|
requestType: "json",
|
|
@@ -341,9 +341,9 @@ class Tools {
|
|
|
341
341
|
var _a, _b;
|
|
342
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
343
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
344
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
344
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
|
|
345
345
|
method: "POST",
|
|
346
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
346
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
347
347
|
contentType: "application/json",
|
|
348
348
|
requestType: "json",
|
|
349
349
|
body: request,
|
|
@@ -397,9 +397,9 @@ class Tools {
|
|
|
397
397
|
var _a, _b;
|
|
398
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
399
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
400
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
400
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
|
|
401
401
|
method: "PUT",
|
|
402
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
402
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
403
403
|
contentType: "application/json",
|
|
404
404
|
requestType: "json",
|
|
405
405
|
body: request,
|
|
@@ -450,9 +450,9 @@ class Tools {
|
|
|
450
450
|
var _a, _b;
|
|
451
451
|
return __awaiter(this, void 0, void 0, function* () {
|
|
452
452
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
453
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
453
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/add-base-tools"),
|
|
454
454
|
method: "POST",
|
|
455
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
455
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
456
456
|
contentType: "application/json",
|
|
457
457
|
requestType: "json",
|
|
458
458
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -506,9 +506,9 @@ class Tools {
|
|
|
506
506
|
var _a, _b;
|
|
507
507
|
return __awaiter(this, void 0, void 0, function* () {
|
|
508
508
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
509
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
509
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/run"),
|
|
510
510
|
method: "POST",
|
|
511
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
511
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
512
512
|
contentType: "application/json",
|
|
513
513
|
requestType: "json",
|
|
514
514
|
body: request,
|
|
@@ -559,9 +559,9 @@ class Tools {
|
|
|
559
559
|
var _a, _b;
|
|
560
560
|
return __awaiter(this, void 0, void 0, function* () {
|
|
561
561
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
562
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
562
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/composio/apps"),
|
|
563
563
|
method: "GET",
|
|
564
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
564
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
565
565
|
contentType: "application/json",
|
|
566
566
|
requestType: "json",
|
|
567
567
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -612,9 +612,9 @@ class Tools {
|
|
|
612
612
|
var _a, _b;
|
|
613
613
|
return __awaiter(this, void 0, void 0, function* () {
|
|
614
614
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
615
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
615
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
|
|
616
616
|
method: "GET",
|
|
617
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
617
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
618
618
|
contentType: "application/json",
|
|
619
619
|
requestType: "json",
|
|
620
620
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -665,9 +665,9 @@ class Tools {
|
|
|
665
665
|
var _a, _b;
|
|
666
666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
667
667
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
668
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.
|
|
668
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/${encodeURIComponent(composioActionName)}`),
|
|
669
669
|
method: "POST",
|
|
670
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
670
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
671
671
|
contentType: "application/json",
|
|
672
672
|
requestType: "json",
|
|
673
673
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2,67 +2,17 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* Response object from an agent interaction, consisting of the new messages generated by the agent and usage statistics.
|
|
7
|
+
* The type of the returned messages can be either `Message` or `LettaMessage`, depending on what was specified in the request.
|
|
8
|
+
*
|
|
9
|
+
* Attributes:
|
|
10
|
+
* messages (List[Union[Message, LettaMessage]]): The messages returned by the agent.
|
|
11
|
+
* usage (LettaUsageStatistics): The usage statistics
|
|
12
|
+
*/
|
|
5
13
|
export interface LettaResponse {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Attributes:
|
|
11
|
-
* completion_tokens (int): The number of tokens generated by the agent.
|
|
12
|
-
* prompt_tokens (int): The number of tokens in the prompt.
|
|
13
|
-
* total_tokens (int): The total number of tokens processed by the agent.
|
|
14
|
-
* step_count (int): The number of steps taken by the agent.
|
|
15
|
-
*/
|
|
16
|
-
LettaUsageStatistics?: Letta.LettaResponseLettaUsageStatistics;
|
|
17
|
-
/**
|
|
18
|
-
* Representation of an agent's internal reasoning.
|
|
19
|
-
*
|
|
20
|
-
* Attributes:
|
|
21
|
-
* reasoning (str): The internal reasoning of the agent
|
|
22
|
-
* id (str): The ID of the message
|
|
23
|
-
* date (datetime): The date the message was created in ISO format
|
|
24
|
-
*/
|
|
25
|
-
ReasoningMessage?: Letta.LettaResponseReasoningMessage;
|
|
26
|
-
/**
|
|
27
|
-
* A message generated by the system. Never streamed back on a response, only used for cursor pagination.
|
|
28
|
-
*
|
|
29
|
-
* Attributes:
|
|
30
|
-
* message (str): The message sent by the system
|
|
31
|
-
* id (str): The ID of the message
|
|
32
|
-
* date (datetime): The date the message was created in ISO format
|
|
33
|
-
*/
|
|
34
|
-
SystemMessage?: Letta.LettaResponseSystemMessage;
|
|
35
|
-
ToolCall?: Letta.LettaResponseToolCall;
|
|
36
|
-
ToolCallDelta?: Letta.LettaResponseToolCallDelta;
|
|
37
|
-
/**
|
|
38
|
-
* A message representing a request to call a tool (generated by the LLM to trigger tool execution).
|
|
39
|
-
*
|
|
40
|
-
* Attributes:
|
|
41
|
-
* tool_call (Union[ToolCall, ToolCallDelta]): The tool call
|
|
42
|
-
* id (str): The ID of the message
|
|
43
|
-
* date (datetime): The date the message was created in ISO format
|
|
44
|
-
*/
|
|
45
|
-
ToolCallMessage?: Letta.LettaResponseToolCallMessage;
|
|
46
|
-
/**
|
|
47
|
-
* A message representing the return value of a tool call (generated by Letta executing the requested tool).
|
|
48
|
-
*
|
|
49
|
-
* Attributes:
|
|
50
|
-
* tool_return (str): The return value of the tool
|
|
51
|
-
* status (Literal["success", "error"]): The status of the tool call
|
|
52
|
-
* id (str): The ID of the message
|
|
53
|
-
* date (datetime): The date the message was created in ISO format
|
|
54
|
-
* tool_call_id (str): A unique identifier for the tool call that generated this message
|
|
55
|
-
* stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation
|
|
56
|
-
* stderr (Optional[List(str)]): Captured stderr from the tool invocation
|
|
57
|
-
*/
|
|
58
|
-
ToolReturnMessage?: Letta.LettaResponseToolReturnMessage;
|
|
59
|
-
/**
|
|
60
|
-
* A message sent by the user. Never streamed back on a response, only used for cursor pagination.
|
|
61
|
-
*
|
|
62
|
-
* Attributes:
|
|
63
|
-
* message (str): The message sent by the user
|
|
64
|
-
* id (str): The ID of the message
|
|
65
|
-
* date (datetime): The date the message was created in ISO format
|
|
66
|
-
*/
|
|
67
|
-
UserMessage?: Letta.LettaResponseUserMessage;
|
|
14
|
+
/** The messages returned by the agent. */
|
|
15
|
+
messages: unknown[];
|
|
16
|
+
/** The usage statistics of the agent. */
|
|
17
|
+
usage: Letta.LettaUsageStatistics;
|
|
68
18
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* step_count (int): The number of steps taken by the agent.
|
|
12
12
|
*/
|
|
13
13
|
export interface LettaUsageStatistics {
|
|
14
|
+
message_type?: "usage_statistics";
|
|
14
15
|
/** The number of tokens generated by the agent. */
|
|
15
16
|
completion_tokens?: number;
|
|
16
17
|
/** The number of tokens in the prompt. */
|
package/api/types/index.d.ts
CHANGED
|
@@ -50,19 +50,6 @@ export * from "./JobStatus";
|
|
|
50
50
|
export * from "./LlmConfigModelEndpointType";
|
|
51
51
|
export * from "./LlmConfig";
|
|
52
52
|
export * from "./LettaRequest";
|
|
53
|
-
export * from "./LettaResponseAssistantMessage";
|
|
54
|
-
export * from "./LettaResponseLettaUsageStatistics";
|
|
55
|
-
export * from "./LettaResponseReasoningMessage";
|
|
56
|
-
export * from "./LettaResponseSystemMessage";
|
|
57
|
-
export * from "./LettaResponseToolCall";
|
|
58
|
-
export * from "./LettaResponseToolCallDelta";
|
|
59
|
-
export * from "./LettaResponseToolCallMessageToolCallZero";
|
|
60
|
-
export * from "./LettaResponseToolCallMessageToolCallOne";
|
|
61
|
-
export * from "./LettaResponseToolCallMessageToolCall";
|
|
62
|
-
export * from "./LettaResponseToolCallMessage";
|
|
63
|
-
export * from "./LettaResponseToolReturnMessageStatus";
|
|
64
|
-
export * from "./LettaResponseToolReturnMessage";
|
|
65
|
-
export * from "./LettaResponseUserMessage";
|
|
66
53
|
export * from "./LettaResponse";
|
|
67
54
|
export * from "./LettaUsageStatistics";
|
|
68
55
|
export * from "./LocalSandboxConfig";
|
package/api/types/index.js
CHANGED
|
@@ -66,19 +66,6 @@ __exportStar(require("./JobStatus"), exports);
|
|
|
66
66
|
__exportStar(require("./LlmConfigModelEndpointType"), exports);
|
|
67
67
|
__exportStar(require("./LlmConfig"), exports);
|
|
68
68
|
__exportStar(require("./LettaRequest"), exports);
|
|
69
|
-
__exportStar(require("./LettaResponseAssistantMessage"), exports);
|
|
70
|
-
__exportStar(require("./LettaResponseLettaUsageStatistics"), exports);
|
|
71
|
-
__exportStar(require("./LettaResponseReasoningMessage"), exports);
|
|
72
|
-
__exportStar(require("./LettaResponseSystemMessage"), exports);
|
|
73
|
-
__exportStar(require("./LettaResponseToolCall"), exports);
|
|
74
|
-
__exportStar(require("./LettaResponseToolCallDelta"), exports);
|
|
75
|
-
__exportStar(require("./LettaResponseToolCallMessageToolCallZero"), exports);
|
|
76
|
-
__exportStar(require("./LettaResponseToolCallMessageToolCallOne"), exports);
|
|
77
|
-
__exportStar(require("./LettaResponseToolCallMessageToolCall"), exports);
|
|
78
|
-
__exportStar(require("./LettaResponseToolCallMessage"), exports);
|
|
79
|
-
__exportStar(require("./LettaResponseToolReturnMessageStatus"), exports);
|
|
80
|
-
__exportStar(require("./LettaResponseToolReturnMessage"), exports);
|
|
81
|
-
__exportStar(require("./LettaResponseUserMessage"), exports);
|
|
82
69
|
__exportStar(require("./LettaResponse"), exports);
|
|
83
70
|
__exportStar(require("./LettaUsageStatistics"), exports);
|
|
84
71
|
__exportStar(require("./LocalSandboxConfig"), exports);
|
|
@@ -101,7 +101,7 @@ export declare class Agents {
|
|
|
101
101
|
* @example
|
|
102
102
|
* await client.agents.delete("agent_id")
|
|
103
103
|
*/
|
|
104
|
-
delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<
|
|
104
|
+
delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
|
|
105
105
|
/**
|
|
106
106
|
* Update an exsiting agent
|
|
107
107
|
*
|
|
@@ -173,6 +173,16 @@ export declare class Agents {
|
|
|
173
173
|
* })
|
|
174
174
|
*/
|
|
175
175
|
createAgentMessageAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.Job>;
|
|
176
|
+
/**
|
|
177
|
+
* Search deployed agents
|
|
178
|
+
*
|
|
179
|
+
* @param {Letta.AgentsSearchDeployedAgentsRequest} request
|
|
180
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* await client.agents.searchdeployedagents()
|
|
184
|
+
*/
|
|
185
|
+
searchdeployedagents(request?: Letta.AgentsSearchDeployedAgentsRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
176
186
|
/**
|
|
177
187
|
* Creates a versioned version of an agent
|
|
178
188
|
*
|
|
@@ -186,7 +196,7 @@ export declare class Agents {
|
|
|
186
196
|
* @example
|
|
187
197
|
* await client.agents.createVersion("agent_id")
|
|
188
198
|
*/
|
|
189
|
-
createVersion(agentId: string, request?: Letta.AgentsCreateVersionRequest, requestOptions?: Agents.RequestOptions): Promise<
|
|
199
|
+
createVersion(agentId: string, request?: Letta.AgentsCreateVersionRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
190
200
|
/**
|
|
191
201
|
* Migrate an agent to a new versioned agent template
|
|
192
202
|
*
|
|
@@ -205,5 +215,31 @@ export declare class Agents {
|
|
|
205
215
|
* })
|
|
206
216
|
*/
|
|
207
217
|
migrate(agentId: string, request: Letta.AgentsMigrateRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentsMigrateResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* Create a template from an agent
|
|
220
|
+
*
|
|
221
|
+
* @param {string} agentId
|
|
222
|
+
* @param {Letta.AgentsCreateTemplateFromAgentRequest} request
|
|
223
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link Letta.NotFoundError}
|
|
226
|
+
* @throws {@link Letta.InternalServerError}
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* await client.agents.createtemplatefromagent("agent_id")
|
|
230
|
+
*/
|
|
231
|
+
createtemplatefromagent(agentId: string, request?: Letta.AgentsCreateTemplateFromAgentRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* Get the variables associated with an agent
|
|
234
|
+
*
|
|
235
|
+
* @param {string} agentId
|
|
236
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
|
+
*
|
|
238
|
+
* @throws {@link Letta.NotFoundError}
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* await client.agents.getagentvariables("agent_id")
|
|
242
|
+
*/
|
|
243
|
+
getagentvariables(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentsGetAgentVariablesResponse>;
|
|
208
244
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
209
245
|
}
|