@letta-ai/letta-client 0.1.142 → 0.1.144
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 +4 -0
- package/README.md +1 -1
- package/api/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/agents/client/Client.js +31 -23
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
- package/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/blocks/client/Client.js +15 -5
- package/api/resources/agents/resources/context/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/context/client/Client.js +3 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
- package/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/groups/client/Client.js +3 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
- package/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/messages/client/Client.js +18 -6
- package/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/passages/client/Client.js +12 -4
- package/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/sources/client/Client.js +9 -3
- package/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/templates/client/Client.js +9 -3
- package/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
- package/api/resources/agents/resources/tools/client/Client.js +9 -3
- package/api/resources/batches/client/Client.d.ts +4 -0
- package/api/resources/batches/client/Client.js +12 -4
- package/api/resources/blocks/client/Client.d.ts +4 -0
- package/api/resources/blocks/client/Client.js +18 -6
- package/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/blocks/resources/agents/client/Client.js +3 -1
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
- package/api/resources/clientSideAccessTokens/client/Client.js +6 -2
- package/api/resources/embeddingModels/client/Client.d.ts +4 -0
- package/api/resources/embeddingModels/client/Client.js +3 -1
- package/api/resources/groups/client/Client.d.ts +4 -0
- package/api/resources/groups/client/Client.js +20 -21
- package/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
- package/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
- package/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/groups/resources/messages/client/Client.js +15 -5
- package/api/resources/health/client/Client.d.ts +4 -0
- package/api/resources/health/client/Client.js +3 -1
- package/api/resources/identities/client/Client.d.ts +4 -0
- package/api/resources/identities/client/Client.js +23 -22
- package/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
- package/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
- package/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
- package/api/resources/identities/resources/properties/client/Client.js +3 -1
- package/api/resources/jobs/client/Client.d.ts +4 -0
- package/api/resources/jobs/client/Client.js +12 -4
- package/api/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/messages/client/Client.js +3 -1
- package/api/resources/models/client/Client.d.ts +4 -0
- package/api/resources/models/client/Client.js +3 -1
- package/api/resources/projects/client/Client.d.ts +4 -0
- package/api/resources/projects/client/Client.js +3 -1
- package/api/resources/providers/client/Client.d.ts +4 -0
- package/api/resources/providers/client/Client.js +15 -5
- package/api/resources/runs/client/Client.d.ts +4 -0
- package/api/resources/runs/client/Client.js +12 -4
- package/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/messages/client/Client.js +3 -1
- package/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/steps/client/Client.js +3 -1
- package/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
- package/api/resources/runs/resources/usage/client/Client.js +3 -1
- package/api/resources/sources/client/Client.d.ts +4 -0
- package/api/resources/sources/client/Client.js +24 -8
- package/api/resources/sources/resources/files/client/Client.d.ts +4 -0
- package/api/resources/sources/resources/files/client/Client.js +9 -3
- package/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
- package/api/resources/sources/resources/passages/client/Client.js +3 -1
- package/api/resources/steps/client/Client.d.ts +4 -13
- package/api/resources/steps/client/Client.js +10 -75
- package/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
- package/api/resources/steps/client/requests/index.d.ts +0 -1
- package/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
- package/api/resources/steps/resources/feedback/client/Client.js +43 -11
- package/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
- package/api/resources/steps/resources/feedback/client/index.js +15 -0
- package/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
- package/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
- package/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
- package/api/resources/steps/resources/index.d.ts +1 -0
- package/api/resources/steps/resources/index.js +4 -0
- package/api/resources/tags/client/Client.d.ts +4 -0
- package/api/resources/tags/client/Client.js +3 -1
- package/api/resources/telemetry/client/Client.d.ts +4 -0
- package/api/resources/telemetry/client/Client.js +3 -1
- package/api/resources/templates/client/Client.d.ts +4 -0
- package/api/resources/templates/client/Client.js +3 -1
- package/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
- package/api/resources/templates/resources/agents/client/Client.js +3 -1
- package/api/resources/tools/client/Client.d.ts +4 -0
- package/api/resources/tools/client/Client.js +57 -19
- package/api/resources/voice/client/Client.d.ts +4 -0
- package/api/resources/voice/client/Client.js +3 -1
- package/dist/Client.d.ts +4 -0
- package/dist/api/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/client/Client.js +31 -23
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.js +15 -5
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/groups/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/messages/client/Client.js +18 -6
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/passages/client/Client.js +12 -4
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +9 -3
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/templates/client/Client.js +9 -3
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +9 -3
- package/dist/api/resources/batches/client/Client.d.ts +4 -0
- package/dist/api/resources/batches/client/Client.js +12 -4
- package/dist/api/resources/blocks/client/Client.d.ts +4 -0
- package/dist/api/resources/blocks/client/Client.js +18 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +6 -2
- package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -0
- package/dist/api/resources/embeddingModels/client/Client.js +3 -1
- package/dist/api/resources/groups/client/Client.d.ts +4 -0
- package/dist/api/resources/groups/client/Client.js +20 -21
- package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
- package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/groups/resources/messages/client/Client.js +15 -5
- package/dist/api/resources/health/client/Client.d.ts +4 -0
- package/dist/api/resources/health/client/Client.js +3 -1
- package/dist/api/resources/identities/client/Client.d.ts +4 -0
- package/dist/api/resources/identities/client/Client.js +23 -22
- package/dist/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
- package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
- package/dist/api/resources/identities/resources/properties/client/Client.js +3 -1
- package/dist/api/resources/jobs/client/Client.d.ts +4 -0
- package/dist/api/resources/jobs/client/Client.js +12 -4
- package/dist/api/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/messages/client/Client.js +3 -1
- package/dist/api/resources/models/client/Client.d.ts +4 -0
- package/dist/api/resources/models/client/Client.js +3 -1
- package/dist/api/resources/projects/client/Client.d.ts +4 -0
- package/dist/api/resources/projects/client/Client.js +3 -1
- package/dist/api/resources/providers/client/Client.d.ts +4 -0
- package/dist/api/resources/providers/client/Client.js +15 -5
- package/dist/api/resources/runs/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/client/Client.js +12 -4
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/messages/client/Client.js +3 -1
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/steps/client/Client.js +3 -1
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
- package/dist/api/resources/runs/resources/usage/client/Client.js +3 -1
- package/dist/api/resources/sources/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/client/Client.js +24 -8
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/resources/files/client/Client.js +9 -3
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +3 -1
- package/dist/api/resources/steps/client/Client.d.ts +4 -13
- package/dist/api/resources/steps/client/Client.js +10 -75
- package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
- package/dist/api/resources/steps/client/requests/index.d.ts +0 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
- package/dist/api/resources/steps/resources/feedback/client/Client.js +43 -11
- package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
- package/dist/api/resources/steps/resources/feedback/client/index.js +15 -0
- package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
- package/dist/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
- package/dist/api/resources/steps/resources/index.d.ts +1 -0
- package/dist/api/resources/steps/resources/index.js +4 -0
- package/dist/api/resources/tags/client/Client.d.ts +4 -0
- package/dist/api/resources/tags/client/Client.js +3 -1
- package/dist/api/resources/telemetry/client/Client.d.ts +4 -0
- package/dist/api/resources/telemetry/client/Client.js +3 -1
- package/dist/api/resources/templates/client/Client.d.ts +4 -0
- package/dist/api/resources/templates/client/Client.js +3 -1
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
- package/dist/api/resources/templates/resources/agents/client/Client.js +3 -1
- package/dist/api/resources/tools/client/Client.d.ts +4 -0
- package/dist/api/resources/tools/client/Client.js +57 -19
- package/dist/api/resources/voice/client/Client.d.ts +4 -0
- package/dist/api/resources/voice/client/Client.js +3 -1
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
- package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
- package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
- package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
- package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +25 -73
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
- package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
- package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
- package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
- package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
- /package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
|
@@ -76,7 +76,9 @@ class Context {
|
|
|
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/agents/${encodeURIComponent(agentId)}/context`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
80
|
+
? yield core.Supplier.get(this._options.project)
|
|
81
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
82
|
contentType: "application/json",
|
|
81
83
|
requestType: "json",
|
|
82
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace CoreMemory {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace CoreMemory {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -77,7 +77,9 @@ class CoreMemory {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
|
+
? yield core.Supplier.get(this._options.project)
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
83
|
contentType: "application/json",
|
|
82
84
|
requestType: "json",
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Groups {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Groups {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -82,7 +82,9 @@ class Groups {
|
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
83
83
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/groups`),
|
|
84
84
|
method: "GET",
|
|
85
|
-
headers: Object.assign(Object.assign({ "X-
|
|
85
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
86
|
+
? yield core.Supplier.get(this._options.project)
|
|
87
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
86
88
|
contentType: "application/json",
|
|
87
89
|
queryParameters: _queryParams,
|
|
88
90
|
requestType: "json",
|
|
@@ -10,6 +10,8 @@ export declare namespace MemoryVariables {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace MemoryVariables {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -78,7 +78,9 @@ class MemoryVariables {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/variables`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign(Object.assign({ "X-
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
82
|
+
? yield core.Supplier.get(this._options.project)
|
|
83
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
84
|
contentType: "application/json",
|
|
83
85
|
requestType: "json",
|
|
84
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Messages {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Messages {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -100,7 +100,9 @@ class Messages {
|
|
|
100
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
101
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
102
102
|
method: "GET",
|
|
103
|
-
headers: Object.assign(Object.assign({ "X-
|
|
103
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
104
|
+
? yield core.Supplier.get(this._options.project)
|
|
105
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
104
106
|
contentType: "application/json",
|
|
105
107
|
queryParameters: _queryParams,
|
|
106
108
|
requestType: "json",
|
|
@@ -176,7 +178,9 @@ class Messages {
|
|
|
176
178
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
177
179
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
178
180
|
method: "POST",
|
|
179
|
-
headers: Object.assign(Object.assign({ "X-
|
|
181
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
182
|
+
? yield core.Supplier.get(this._options.project)
|
|
183
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
180
184
|
contentType: "application/json",
|
|
181
185
|
requestType: "json",
|
|
182
186
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -246,7 +250,9 @@ class Messages {
|
|
|
246
250
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
251
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
|
|
248
252
|
method: "PATCH",
|
|
249
|
-
headers: Object.assign(Object.assign({ "X-
|
|
253
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
254
|
+
? yield core.Supplier.get(this._options.project)
|
|
255
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
250
256
|
contentType: "application/json",
|
|
251
257
|
requestType: "json",
|
|
252
258
|
body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +312,9 @@ class Messages {
|
|
|
306
312
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
313
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
|
|
308
314
|
method: "POST",
|
|
309
|
-
headers: Object.assign(Object.assign({ "X-
|
|
315
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
316
|
+
? yield core.Supplier.get(this._options.project)
|
|
317
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
310
318
|
contentType: "application/json",
|
|
311
319
|
requestType: "json",
|
|
312
320
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -393,7 +401,9 @@ class Messages {
|
|
|
393
401
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
394
402
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
|
|
395
403
|
method: "POST",
|
|
396
|
-
headers: Object.assign(Object.assign({ "X-
|
|
404
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
405
|
+
? yield core.Supplier.get(this._options.project)
|
|
406
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
397
407
|
contentType: "application/json",
|
|
398
408
|
requestType: "json",
|
|
399
409
|
body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -465,7 +475,9 @@ class Messages {
|
|
|
465
475
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
466
476
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
|
|
467
477
|
method: "PATCH",
|
|
468
|
-
headers: Object.assign(Object.assign({ "X-
|
|
478
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
479
|
+
? yield core.Supplier.get(this._options.project)
|
|
480
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
469
481
|
contentType: "application/json",
|
|
470
482
|
queryParameters: _queryParams,
|
|
471
483
|
requestType: "json",
|
|
@@ -10,6 +10,8 @@ export declare namespace Passages {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Passages {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -94,7 +94,9 @@ class Passages {
|
|
|
94
94
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
95
95
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
|
|
96
96
|
method: "GET",
|
|
97
|
-
headers: Object.assign(Object.assign({ "X-
|
|
97
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
98
|
+
? yield core.Supplier.get(this._options.project)
|
|
99
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
98
100
|
contentType: "application/json",
|
|
99
101
|
queryParameters: _queryParams,
|
|
100
102
|
requestType: "json",
|
|
@@ -163,7 +165,9 @@ class Passages {
|
|
|
163
165
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
166
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
|
|
165
167
|
method: "POST",
|
|
166
|
-
headers: Object.assign(Object.assign({ "X-
|
|
168
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
|
+
? yield core.Supplier.get(this._options.project)
|
|
170
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
167
171
|
contentType: "application/json",
|
|
168
172
|
requestType: "json",
|
|
169
173
|
body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -230,7 +234,9 @@ class Passages {
|
|
|
230
234
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
231
235
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
|
|
232
236
|
method: "DELETE",
|
|
233
|
-
headers: Object.assign(Object.assign({ "X-
|
|
237
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
238
|
+
? yield core.Supplier.get(this._options.project)
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
234
240
|
contentType: "application/json",
|
|
235
241
|
requestType: "json",
|
|
236
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -293,7 +299,9 @@ class Passages {
|
|
|
293
299
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
294
300
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
|
|
295
301
|
method: "PATCH",
|
|
296
|
-
headers: Object.assign(Object.assign({ "X-
|
|
302
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
303
|
+
? yield core.Supplier.get(this._options.project)
|
|
304
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
297
305
|
contentType: "application/json",
|
|
298
306
|
requestType: "json",
|
|
299
307
|
body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -10,6 +10,8 @@ export declare namespace Sources {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Sources {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -77,7 +77,9 @@ class Sources {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
|
|
79
79
|
method: "PATCH",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
|
+
? yield core.Supplier.get(this._options.project)
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
83
|
contentType: "application/json",
|
|
82
84
|
requestType: "json",
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -143,7 +145,9 @@ class Sources {
|
|
|
143
145
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
144
146
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
|
|
145
147
|
method: "PATCH",
|
|
146
|
-
headers: Object.assign(Object.assign({ "X-
|
|
148
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
149
|
+
? yield core.Supplier.get(this._options.project)
|
|
150
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
147
151
|
contentType: "application/json",
|
|
148
152
|
requestType: "json",
|
|
149
153
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -208,7 +212,9 @@ class Sources {
|
|
|
208
212
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
209
213
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
|
|
210
214
|
method: "GET",
|
|
211
|
-
headers: Object.assign(Object.assign({ "X-
|
|
215
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
216
|
+
? yield core.Supplier.get(this._options.project)
|
|
217
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
212
218
|
contentType: "application/json",
|
|
213
219
|
requestType: "json",
|
|
214
220
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Templates {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Templates {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -96,7 +96,9 @@ class Templates {
|
|
|
96
96
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
97
97
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
|
|
98
98
|
method: "POST",
|
|
99
|
-
headers: Object.assign(Object.assign({ "X-
|
|
99
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
100
|
+
? yield core.Supplier.get(this._options.project)
|
|
101
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
100
102
|
contentType: "application/json",
|
|
101
103
|
queryParameters: _queryParams,
|
|
102
104
|
requestType: "json",
|
|
@@ -163,7 +165,9 @@ class Templates {
|
|
|
163
165
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
166
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
|
|
165
167
|
method: "POST",
|
|
166
|
-
headers: Object.assign(Object.assign({ "X-
|
|
168
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
|
+
? yield core.Supplier.get(this._options.project)
|
|
170
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
167
171
|
contentType: "application/json",
|
|
168
172
|
requestType: "json",
|
|
169
173
|
body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -236,7 +240,9 @@ class Templates {
|
|
|
236
240
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
237
241
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
|
|
238
242
|
method: "POST",
|
|
239
|
-
headers: Object.assign(Object.assign({ "X-
|
|
243
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
244
|
+
? yield core.Supplier.get(this._options.project)
|
|
245
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
246
|
contentType: "application/json",
|
|
241
247
|
requestType: "json",
|
|
242
248
|
body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -10,6 +10,8 @@ export declare namespace Tools {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Tools {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -76,7 +76,9 @@ 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/agents/${encodeURIComponent(agentId)}/tools`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
80
|
+
? yield core.Supplier.get(this._options.project)
|
|
81
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
82
|
contentType: "application/json",
|
|
81
83
|
requestType: "json",
|
|
82
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -142,7 +144,9 @@ class Tools {
|
|
|
142
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
143
145
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools/attach/${encodeURIComponent(toolId)}`),
|
|
144
146
|
method: "PATCH",
|
|
145
|
-
headers: Object.assign(Object.assign({ "X-
|
|
147
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
148
|
+
? yield core.Supplier.get(this._options.project)
|
|
149
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
146
150
|
contentType: "application/json",
|
|
147
151
|
requestType: "json",
|
|
148
152
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -208,7 +212,9 @@ class Tools {
|
|
|
208
212
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
209
213
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools/detach/${encodeURIComponent(toolId)}`),
|
|
210
214
|
method: "PATCH",
|
|
211
|
-
headers: Object.assign(Object.assign({ "X-
|
|
215
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
216
|
+
? yield core.Supplier.get(this._options.project)
|
|
217
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
212
218
|
contentType: "application/json",
|
|
213
219
|
requestType: "json",
|
|
214
220
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,6 +10,8 @@ export declare namespace Batches {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Override the X-Project header */
|
|
14
|
+
project?: core.Supplier<string | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -19,6 +21,8 @@ export declare namespace Batches {
|
|
|
19
21
|
maxRetries?: number;
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Override the X-Project header */
|
|
25
|
+
project?: string | undefined;
|
|
22
26
|
/** Additional headers to include in the request. */
|
|
23
27
|
headers?: Record<string, string>;
|
|
24
28
|
}
|
|
@@ -75,7 +75,9 @@ class Batches {
|
|
|
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/messages/batches"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
79
|
+
? yield core.Supplier.get(this._options.project)
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
81
|
contentType: "application/json",
|
|
80
82
|
requestType: "json",
|
|
81
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -152,7 +154,9 @@ class Batches {
|
|
|
152
154
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
153
155
|
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/messages/batches"),
|
|
154
156
|
method: "POST",
|
|
155
|
-
headers: Object.assign(Object.assign({ "X-
|
|
157
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
158
|
+
? yield core.Supplier.get(this._options.project)
|
|
159
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
156
160
|
contentType: "application/json",
|
|
157
161
|
requestType: "json",
|
|
158
162
|
body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -218,7 +222,9 @@ class Batches {
|
|
|
218
222
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
219
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/messages/batches/${encodeURIComponent(batchId)}`),
|
|
220
224
|
method: "GET",
|
|
221
|
-
headers: Object.assign(Object.assign({ "X-
|
|
225
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
226
|
+
? yield core.Supplier.get(this._options.project)
|
|
227
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
222
228
|
contentType: "application/json",
|
|
223
229
|
requestType: "json",
|
|
224
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -283,7 +289,9 @@ class Batches {
|
|
|
283
289
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
284
290
|
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/messages/batches/${encodeURIComponent(batchId)}/cancel`),
|
|
285
291
|
method: "PATCH",
|
|
286
|
-
headers: Object.assign(Object.assign({ "X-
|
|
292
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
293
|
+
? yield core.Supplier.get(this._options.project)
|
|
294
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
|
|
287
295
|
contentType: "application/json",
|
|
288
296
|
requestType: "json",
|
|
289
297
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -11,6 +11,8 @@ export declare namespace Blocks {
|
|
|
11
11
|
/** Specify a custom URL to connect the client to. */
|
|
12
12
|
baseUrl?: core.Supplier<string>;
|
|
13
13
|
token?: core.Supplier<string | undefined>;
|
|
14
|
+
/** Override the X-Project header */
|
|
15
|
+
project?: core.Supplier<string | undefined>;
|
|
14
16
|
fetcher?: core.FetchFunction;
|
|
15
17
|
}
|
|
16
18
|
interface RequestOptions {
|
|
@@ -20,6 +22,8 @@ export declare namespace Blocks {
|
|
|
20
22
|
maxRetries?: number;
|
|
21
23
|
/** A hook to abort the request. */
|
|
22
24
|
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Project header */
|
|
26
|
+
project?: string | undefined;
|
|
23
27
|
/** Additional headers to include in the request. */
|
|
24
28
|
headers?: Record<string, string>;
|
|
25
29
|
}
|