@letta-ai/letta-client 0.1.104 → 0.1.106
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/Client.d.ts +6 -3
- package/Client.js +14 -9
- package/api/resources/agents/client/Client.js +9 -9
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +6 -6
- package/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/blocks/client/Client.js +5 -5
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/api/resources/embeddingModels/client/Client.d.ts +39 -0
- package/api/resources/embeddingModels/client/Client.js +117 -0
- package/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/api/resources/embeddingModels/client/index.js +2 -0
- package/api/resources/embeddings/client/Client.d.ts +2 -3
- package/api/resources/embeddings/client/Client.js +6 -13
- package/api/resources/groups/client/Client.js +5 -5
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +3 -2
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +4 -4
- package/api/resources/runs/client/Client.js +4 -4
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.d.ts +11 -11
- package/api/resources/sources/client/Client.js +67 -67
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.js +3 -3
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/tools/client/Client.d.ts +12 -11
- package/api/resources/tools/client/Client.js +63 -56
- package/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
- package/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
- package/api/resources/tools/client/requests/index.d.ts +1 -0
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/LocalSandboxConfig.d.ts +2 -2
- package/dist/Client.d.ts +6 -3
- package/dist/Client.js +14 -9
- package/dist/api/resources/agents/client/Client.js +9 -9
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/dist/api/resources/embeddingModels/client/Client.d.ts +39 -0
- package/dist/api/resources/embeddingModels/client/Client.js +117 -0
- package/dist/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/dist/api/resources/embeddingModels/client/index.js +2 -0
- package/dist/api/resources/embeddings/client/Client.d.ts +2 -3
- package/dist/api/resources/embeddings/client/Client.js +6 -13
- package/dist/api/resources/groups/client/Client.js +5 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +4 -4
- package/dist/api/resources/runs/client/Client.js +4 -4
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.d.ts +11 -11
- package/dist/api/resources/sources/client/Client.js +67 -67
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.js +3 -3
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.d.ts +12 -11
- package/dist/api/resources/tools/client/Client.js +63 -56
- package/dist/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
- package/dist/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
- package/dist/api/resources/tools/client/requests/index.d.ts +1 -0
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/LocalSandboxConfig.d.ts +2 -2
- package/{serialization/resources/embeddings → dist/serialization/resources/embeddingModels}/client/list.d.ts +1 -1
- package/dist/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/dist/serialization/resources/embeddingModels/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +2 -2
- package/dist/serialization/resources/sources/client/index.d.ts +1 -1
- package/dist/serialization/resources/sources/client/index.js +2 -2
- package/dist/serialization/resources/tools/client/index.d.ts +1 -1
- package/dist/serialization/resources/tools/client/index.js +2 -2
- package/dist/serialization/types/LocalSandboxConfig.d.ts +1 -1
- package/dist/serialization/types/LocalSandboxConfig.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +118 -68
- package/{dist/serialization/resources/embeddings → serialization/resources/embeddingModels}/client/list.d.ts +1 -1
- package/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/serialization/resources/embeddingModels/index.js +17 -0
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +2 -2
- package/serialization/resources/sources/client/index.d.ts +1 -1
- package/serialization/resources/sources/client/index.js +2 -2
- package/serialization/resources/tools/client/index.d.ts +1 -1
- package/serialization/resources/tools/client/index.js +2 -2
- package/serialization/types/LocalSandboxConfig.d.ts +1 -1
- package/serialization/types/LocalSandboxConfig.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/{dist/serialization/resources/embeddings → api/resources/embeddingModels}/index.d.ts +0 -0
- /package/{dist/serialization/resources/embeddings → api/resources/embeddingModels}/index.js +0 -0
- /package/{serialization/resources/embeddings → dist/api/resources/embeddingModels}/index.d.ts +0 -0
- /package/{serialization/resources/embeddings → dist/api/resources/embeddingModels}/index.js +0 -0
- /package/dist/serialization/resources/{embeddings → embeddingModels}/client/index.d.ts +0 -0
- /package/dist/serialization/resources/{embeddings → embeddingModels}/client/index.js +0 -0
- /package/dist/serialization/resources/{embeddings → embeddingModels}/client/list.js +0 -0
- /package/serialization/resources/{embeddings → embeddingModels}/client/index.d.ts +0 -0
- /package/serialization/resources/{embeddings → embeddingModels}/client/index.js +0 -0
- /package/serialization/resources/{embeddings → embeddingModels}/client/list.js +0 -0
|
@@ -80,7 +80,7 @@ class Files {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
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/sources/${encodeURIComponent(sourceId)}/upload`),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
83
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
requestType: "file",
|
|
85
85
|
duplex: _maybeEncodedRequest.duplex,
|
|
86
86
|
body: _maybeEncodedRequest.body,
|
|
@@ -155,7 +155,7 @@ class Files {
|
|
|
155
155
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
156
156
|
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/sources/${encodeURIComponent(sourceId)}/files`),
|
|
157
157
|
method: "GET",
|
|
158
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
158
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
159
159
|
contentType: "application/json",
|
|
160
160
|
queryParameters: _queryParams,
|
|
161
161
|
requestType: "json",
|
|
@@ -222,7 +222,7 @@ class Files {
|
|
|
222
222
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
223
223
|
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/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
|
|
224
224
|
method: "DELETE",
|
|
225
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
225
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
226
226
|
contentType: "application/json",
|
|
227
227
|
requestType: "json",
|
|
228
228
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -76,7 +76,7 @@ class Passages {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
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/sources/${encodeURIComponent(sourceId)}/passages`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -103,7 +103,7 @@ class Steps {
|
|
|
103
103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
104
104
|
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/steps"),
|
|
105
105
|
method: "GET",
|
|
106
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
106
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
107
107
|
contentType: "application/json",
|
|
108
108
|
queryParameters: _queryParams,
|
|
109
109
|
requestType: "json",
|
|
@@ -169,7 +169,7 @@ class Steps {
|
|
|
169
169
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
170
170
|
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/steps/${encodeURIComponent(stepId)}`),
|
|
171
171
|
method: "GET",
|
|
172
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
172
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
173
173
|
contentType: "application/json",
|
|
174
174
|
requestType: "json",
|
|
175
175
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -229,7 +229,7 @@ class Steps {
|
|
|
229
229
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
230
230
|
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/steps/"),
|
|
231
231
|
method: "GET",
|
|
232
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
232
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
233
233
|
contentType: "application/json",
|
|
234
234
|
requestType: "json",
|
|
235
235
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -87,7 +87,7 @@ class Tags {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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/tags/"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
queryParameters: _queryParams,
|
|
93
93
|
requestType: "json",
|
|
@@ -92,7 +92,7 @@ class Templates {
|
|
|
92
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
93
|
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/templates"),
|
|
94
94
|
method: "GET",
|
|
95
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
95
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
96
96
|
contentType: "application/json",
|
|
97
97
|
queryParameters: _queryParams,
|
|
98
98
|
requestType: "json",
|
|
@@ -75,7 +75,7 @@ class Agents {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
|
|
77
77
|
method: "POST",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
body: serializers.templates.AgentsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -63,6 +63,18 @@ export declare class Tools {
|
|
|
63
63
|
* await client.tools.modify("tool_id")
|
|
64
64
|
*/
|
|
65
65
|
modify(toolId: string, request?: Letta.ToolUpdate, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool>;
|
|
66
|
+
/**
|
|
67
|
+
* Get a count of all tools available to agents belonging to the org of the user.
|
|
68
|
+
*
|
|
69
|
+
* @param {Letta.ToolsCountRequest} request
|
|
70
|
+
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.tools.count()
|
|
76
|
+
*/
|
|
77
|
+
count(request?: Letta.ToolsCountRequest, requestOptions?: Tools.RequestOptions): Promise<number>;
|
|
66
78
|
/**
|
|
67
79
|
* Get a list of all tools available to agents belonging to the org of the user
|
|
68
80
|
*
|
|
@@ -103,17 +115,6 @@ export declare class Tools {
|
|
|
103
115
|
* })
|
|
104
116
|
*/
|
|
105
117
|
upsert(request: Letta.ToolCreate, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool>;
|
|
106
|
-
/**
|
|
107
|
-
* Get a count of all tools available to agents belonging to the org of the user
|
|
108
|
-
*
|
|
109
|
-
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
|
-
*
|
|
111
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* await client.tools.count()
|
|
115
|
-
*/
|
|
116
|
-
count(requestOptions?: Tools.RequestOptions): Promise<number>;
|
|
117
118
|
/**
|
|
118
119
|
* Upsert base tools
|
|
119
120
|
*
|
|
@@ -76,7 +76,7 @@ class Tools {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -141,7 +141,7 @@ class Tools {
|
|
|
141
141
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
142
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
143
143
|
method: "DELETE",
|
|
144
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
144
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
145
145
|
contentType: "application/json",
|
|
146
146
|
requestType: "json",
|
|
147
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,7 +201,7 @@ class Tools {
|
|
|
201
201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
202
202
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
203
203
|
method: "PATCH",
|
|
204
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
204
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
205
205
|
contentType: "application/json",
|
|
206
206
|
requestType: "json",
|
|
207
207
|
body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -251,34 +251,28 @@ class Tools {
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
|
-
* Get a
|
|
254
|
+
* Get a count of all tools available to agents belonging to the org of the user.
|
|
255
255
|
*
|
|
256
|
-
* @param {Letta.
|
|
256
|
+
* @param {Letta.ToolsCountRequest} request
|
|
257
257
|
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
258
258
|
*
|
|
259
259
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
260
260
|
*
|
|
261
261
|
* @example
|
|
262
|
-
* await client.tools.
|
|
262
|
+
* await client.tools.count()
|
|
263
263
|
*/
|
|
264
|
-
|
|
264
|
+
count() {
|
|
265
265
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
266
266
|
var _a, _b, _c;
|
|
267
|
-
const {
|
|
267
|
+
const { includeBaseTools } = request;
|
|
268
268
|
const _queryParams = {};
|
|
269
|
-
if (
|
|
270
|
-
_queryParams["
|
|
271
|
-
}
|
|
272
|
-
if (limit != null) {
|
|
273
|
-
_queryParams["limit"] = limit.toString();
|
|
274
|
-
}
|
|
275
|
-
if (name != null) {
|
|
276
|
-
_queryParams["name"] = name;
|
|
269
|
+
if (includeBaseTools != null) {
|
|
270
|
+
_queryParams["include_base_tools"] = includeBaseTools.toString();
|
|
277
271
|
}
|
|
278
272
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
279
|
-
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/tools/"),
|
|
273
|
+
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/tools/count"),
|
|
280
274
|
method: "GET",
|
|
281
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
275
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
282
276
|
contentType: "application/json",
|
|
283
277
|
queryParameters: _queryParams,
|
|
284
278
|
requestType: "json",
|
|
@@ -287,7 +281,7 @@ class Tools {
|
|
|
287
281
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
288
282
|
});
|
|
289
283
|
if (_response.ok) {
|
|
290
|
-
return serializers.tools.
|
|
284
|
+
return serializers.tools.count.Response.parseOrThrow(_response.body, {
|
|
291
285
|
unrecognizedObjectKeys: "passthrough",
|
|
292
286
|
allowUnrecognizedUnionMembers: true,
|
|
293
287
|
allowUnrecognizedEnumValues: true,
|
|
@@ -319,7 +313,7 @@ class Tools {
|
|
|
319
313
|
body: _response.error.rawBody,
|
|
320
314
|
});
|
|
321
315
|
case "timeout":
|
|
322
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools
|
|
316
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/count.");
|
|
323
317
|
case "unknown":
|
|
324
318
|
throw new errors.LettaError({
|
|
325
319
|
message: _response.error.errorMessage,
|
|
@@ -328,34 +322,43 @@ class Tools {
|
|
|
328
322
|
});
|
|
329
323
|
}
|
|
330
324
|
/**
|
|
331
|
-
*
|
|
325
|
+
* Get a list of all tools available to agents belonging to the org of the user
|
|
332
326
|
*
|
|
333
|
-
* @param {Letta.
|
|
327
|
+
* @param {Letta.ToolsListRequest} request
|
|
334
328
|
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
335
329
|
*
|
|
336
330
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
337
331
|
*
|
|
338
332
|
* @example
|
|
339
|
-
* await client.tools.
|
|
340
|
-
* sourceCode: "source_code"
|
|
341
|
-
* })
|
|
333
|
+
* await client.tools.list()
|
|
342
334
|
*/
|
|
343
|
-
|
|
344
|
-
return __awaiter(this,
|
|
335
|
+
list() {
|
|
336
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
345
337
|
var _a, _b, _c;
|
|
338
|
+
const { after, limit, name } = request;
|
|
339
|
+
const _queryParams = {};
|
|
340
|
+
if (after != null) {
|
|
341
|
+
_queryParams["after"] = after;
|
|
342
|
+
}
|
|
343
|
+
if (limit != null) {
|
|
344
|
+
_queryParams["limit"] = limit.toString();
|
|
345
|
+
}
|
|
346
|
+
if (name != null) {
|
|
347
|
+
_queryParams["name"] = name;
|
|
348
|
+
}
|
|
346
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
347
350
|
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/tools/"),
|
|
348
|
-
method: "
|
|
349
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
351
|
+
method: "GET",
|
|
352
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
350
353
|
contentType: "application/json",
|
|
354
|
+
queryParameters: _queryParams,
|
|
351
355
|
requestType: "json",
|
|
352
|
-
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
353
356
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
354
357
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
355
358
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
359
|
});
|
|
357
360
|
if (_response.ok) {
|
|
358
|
-
return serializers.
|
|
361
|
+
return serializers.tools.list.Response.parseOrThrow(_response.body, {
|
|
359
362
|
unrecognizedObjectKeys: "passthrough",
|
|
360
363
|
allowUnrecognizedUnionMembers: true,
|
|
361
364
|
allowUnrecognizedEnumValues: true,
|
|
@@ -387,7 +390,7 @@ class Tools {
|
|
|
387
390
|
body: _response.error.rawBody,
|
|
388
391
|
});
|
|
389
392
|
case "timeout":
|
|
390
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling
|
|
393
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/.");
|
|
391
394
|
case "unknown":
|
|
392
395
|
throw new errors.LettaError({
|
|
393
396
|
message: _response.error.errorMessage,
|
|
@@ -396,7 +399,7 @@ class Tools {
|
|
|
396
399
|
});
|
|
397
400
|
}
|
|
398
401
|
/**
|
|
399
|
-
* Create
|
|
402
|
+
* Create a new tool
|
|
400
403
|
*
|
|
401
404
|
* @param {Letta.ToolCreate} request
|
|
402
405
|
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -404,17 +407,17 @@ class Tools {
|
|
|
404
407
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
405
408
|
*
|
|
406
409
|
* @example
|
|
407
|
-
* await client.tools.
|
|
410
|
+
* await client.tools.create({
|
|
408
411
|
* sourceCode: "source_code"
|
|
409
412
|
* })
|
|
410
413
|
*/
|
|
411
|
-
|
|
414
|
+
create(request, requestOptions) {
|
|
412
415
|
return __awaiter(this, void 0, void 0, function* () {
|
|
413
416
|
var _a, _b, _c;
|
|
414
417
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
418
|
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/tools/"),
|
|
416
|
-
method: "
|
|
417
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
419
|
+
method: "POST",
|
|
420
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
418
421
|
contentType: "application/json",
|
|
419
422
|
requestType: "json",
|
|
420
423
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -455,7 +458,7 @@ class Tools {
|
|
|
455
458
|
body: _response.error.rawBody,
|
|
456
459
|
});
|
|
457
460
|
case "timeout":
|
|
458
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling
|
|
461
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/tools/.");
|
|
459
462
|
case "unknown":
|
|
460
463
|
throw new errors.LettaError({
|
|
461
464
|
message: _response.error.errorMessage,
|
|
@@ -464,30 +467,34 @@ class Tools {
|
|
|
464
467
|
});
|
|
465
468
|
}
|
|
466
469
|
/**
|
|
467
|
-
*
|
|
470
|
+
* Create or update a tool
|
|
468
471
|
*
|
|
472
|
+
* @param {Letta.ToolCreate} request
|
|
469
473
|
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
470
474
|
*
|
|
471
475
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
472
476
|
*
|
|
473
477
|
* @example
|
|
474
|
-
* await client.tools.
|
|
478
|
+
* await client.tools.upsert({
|
|
479
|
+
* sourceCode: "source_code"
|
|
480
|
+
* })
|
|
475
481
|
*/
|
|
476
|
-
|
|
482
|
+
upsert(request, requestOptions) {
|
|
477
483
|
return __awaiter(this, void 0, void 0, function* () {
|
|
478
484
|
var _a, _b, _c;
|
|
479
485
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
|
-
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/tools/
|
|
481
|
-
method: "
|
|
482
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
486
|
+
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/tools/"),
|
|
487
|
+
method: "PUT",
|
|
488
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
483
489
|
contentType: "application/json",
|
|
484
490
|
requestType: "json",
|
|
491
|
+
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
485
492
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
486
493
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
487
494
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
488
495
|
});
|
|
489
496
|
if (_response.ok) {
|
|
490
|
-
return serializers.
|
|
497
|
+
return serializers.Tool.parseOrThrow(_response.body, {
|
|
491
498
|
unrecognizedObjectKeys: "passthrough",
|
|
492
499
|
allowUnrecognizedUnionMembers: true,
|
|
493
500
|
allowUnrecognizedEnumValues: true,
|
|
@@ -519,7 +526,7 @@ class Tools {
|
|
|
519
526
|
body: _response.error.rawBody,
|
|
520
527
|
});
|
|
521
528
|
case "timeout":
|
|
522
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling
|
|
529
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/tools/.");
|
|
523
530
|
case "unknown":
|
|
524
531
|
throw new errors.LettaError({
|
|
525
532
|
message: _response.error.errorMessage,
|
|
@@ -543,7 +550,7 @@ class Tools {
|
|
|
543
550
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
544
551
|
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/tools/add-base-tools"),
|
|
545
552
|
method: "POST",
|
|
546
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
553
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
547
554
|
contentType: "application/json",
|
|
548
555
|
requestType: "json",
|
|
549
556
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -613,7 +620,7 @@ class Tools {
|
|
|
613
620
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
614
621
|
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/tools/run"),
|
|
615
622
|
method: "POST",
|
|
616
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
623
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
617
624
|
contentType: "application/json",
|
|
618
625
|
requestType: "json",
|
|
619
626
|
body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -680,7 +687,7 @@ class Tools {
|
|
|
680
687
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
681
688
|
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/tools/composio/apps"),
|
|
682
689
|
method: "GET",
|
|
683
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
690
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
684
691
|
contentType: "application/json",
|
|
685
692
|
requestType: "json",
|
|
686
693
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -745,7 +752,7 @@ class Tools {
|
|
|
745
752
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
746
753
|
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/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
|
|
747
754
|
method: "GET",
|
|
748
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
755
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
749
756
|
contentType: "application/json",
|
|
750
757
|
requestType: "json",
|
|
751
758
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -810,7 +817,7 @@ class Tools {
|
|
|
810
817
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
811
818
|
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/tools/composio/${encodeURIComponent(composioActionName)}`),
|
|
812
819
|
method: "POST",
|
|
813
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
820
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
814
821
|
contentType: "application/json",
|
|
815
822
|
requestType: "json",
|
|
816
823
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -876,7 +883,7 @@ class Tools {
|
|
|
876
883
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
877
884
|
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/tools/mcp/servers"),
|
|
878
885
|
method: "GET",
|
|
879
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
886
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
880
887
|
contentType: "application/json",
|
|
881
888
|
requestType: "json",
|
|
882
889
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -945,7 +952,7 @@ class Tools {
|
|
|
945
952
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
946
953
|
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/tools/mcp/servers"),
|
|
947
954
|
method: "PUT",
|
|
948
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
955
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
949
956
|
contentType: "application/json",
|
|
950
957
|
requestType: "json",
|
|
951
958
|
body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1011,7 +1018,7 @@ class Tools {
|
|
|
1011
1018
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1012
1019
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/tools`),
|
|
1013
1020
|
method: "GET",
|
|
1014
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1021
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
1015
1022
|
contentType: "application/json",
|
|
1016
1023
|
requestType: "json",
|
|
1017
1024
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1077,7 +1084,7 @@ class Tools {
|
|
|
1077
1084
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1078
1085
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
|
|
1079
1086
|
method: "POST",
|
|
1080
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1087
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
1081
1088
|
contentType: "application/json",
|
|
1082
1089
|
requestType: "json",
|
|
1083
1090
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1142,7 +1149,7 @@ class Tools {
|
|
|
1142
1149
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1143
1150
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}`),
|
|
1144
1151
|
method: "DELETE",
|
|
1145
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1152
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "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),
|
|
1146
1153
|
contentType: "application/json",
|
|
1147
1154
|
requestType: "json",
|
|
1148
1155
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type ToolUpdate } from "./ToolUpdate";
|
|
2
|
+
export { type ToolsCountRequest } from "./ToolsCountRequest";
|
|
2
3
|
export { type ToolsListRequest } from "./ToolsListRequest";
|
|
3
4
|
export { type ToolRunFromSource } from "./ToolRunFromSource";
|
|
4
5
|
export { type ListComposioAppsRequest } from "./ListComposioAppsRequest";
|
|
@@ -84,7 +84,7 @@ class Voice {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/voice-beta/${encodeURIComponent(agentId)}/chat/completions`),
|
|
86
86
|
method: "POST",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.106", "User-Agent": "@letta-ai/letta-client/0.1.106", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
requestType: "json",
|
|
90
90
|
body: serializers.CreateVoiceChatCompletionsRequestBody.jsonOrThrow(_body, {
|
|
@@ -6,9 +6,9 @@ export interface LocalSandboxConfig {
|
|
|
6
6
|
/** Directory for the sandbox environment. */
|
|
7
7
|
sandboxDir?: string;
|
|
8
8
|
/** Whether or not to use the venv, or run directly in the same run loop. */
|
|
9
|
-
|
|
9
|
+
forceCreateVenv?: boolean;
|
|
10
10
|
/** The name for the venv in the sandbox directory. We first search for an existing venv with this name, otherwise, we make it from the requirements.txt. */
|
|
11
11
|
venvName?: string;
|
|
12
|
-
/** List of pip packages to install with mandatory name and optional version following semantic versioning. This only is considered when
|
|
12
|
+
/** List of pip packages to install with mandatory name and optional version following semantic versioning. This only is considered when force_create_venv is True. */
|
|
13
13
|
pipRequirements?: Letta.PipRequirement[];
|
|
14
14
|
}
|