@letta-ai/letta-client 0.1.9 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/agents/client/Client.d.ts +1 -4
- package/api/resources/agents/client/Client.js +21 -23
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/api/resources/agents/resources/index.d.ts +0 -1
- package/api/resources/agents/resources/index.js +1 -2
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/api/resources/agents/resources/messages/types/index.js +0 -1
- package/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/api/resources/agents/types/index.d.ts +1 -0
- package/api/resources/agents/types/index.js +1 -0
- package/api/resources/blocks/client/Client.js +7 -7
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.d.ts +11 -11
- package/api/resources/providers/client/Client.js +32 -32
- package/api/resources/providers/client/requests/index.d.ts +1 -1
- package/api/resources/runs/client/Client.d.ts +6 -8
- package/api/resources/runs/client/Client.js +12 -37
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/api/resources/sources/client/Client.js +8 -8
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/tools/client/Client.d.ts +0 -12
- package/api/resources/tools/client/Client.js +11 -76
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{dist/api/types/LettaResponseMessagesItem.d.ts → api/types/LettaMessageUnion.d.ts} +2 -2
- package/api/types/LettaRequest.d.ts +2 -6
- package/api/types/LettaRequestConfig.d.ts +11 -0
- package/api/types/LettaResponse.d.ts +1 -1
- package/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/api/types/LlmConfigModelEndpointType.js +1 -0
- package/api/types/Run.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -3
- package/api/types/index.js +2 -3
- package/dist/api/resources/agents/client/Client.d.ts +1 -4
- package/dist/api/resources/agents/client/Client.js +21 -23
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/dist/api/resources/agents/resources/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/index.js +1 -2
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/dist/api/resources/agents/types/index.d.ts +1 -0
- package/dist/api/resources/agents/types/index.js +1 -0
- package/dist/api/resources/blocks/client/Client.js +7 -7
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.d.ts +11 -11
- package/dist/api/resources/providers/client/Client.js +32 -32
- package/dist/api/resources/providers/client/requests/index.d.ts +1 -1
- package/dist/api/resources/runs/client/Client.d.ts +6 -8
- package/dist/api/resources/runs/client/Client.js +12 -37
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/dist/api/resources/sources/client/Client.js +8 -8
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.d.ts +0 -12
- package/dist/api/resources/tools/client/Client.js +11 -76
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{api/types/LettaResponseMessagesItem.d.ts → dist/api/types/LettaMessageUnion.d.ts} +2 -2
- package/dist/api/types/LettaRequest.d.ts +2 -6
- package/dist/api/types/LettaRequestConfig.d.ts +11 -0
- package/dist/api/types/LettaResponse.d.ts +1 -1
- package/dist/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/dist/api/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/api/types/Run.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -3
- package/dist/api/types/index.js +2 -3
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{serialization/resources/tools/client/getByName.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/dist/serialization/resources/agents/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/types/index.js +1 -0
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/dist/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/dist/serialization/resources/tools/client/index.d.ts +0 -1
- package/dist/serialization/resources/tools/client/index.js +1 -2
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/dist/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/dist/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/dist/serialization/types/LettaRequest.d.ts +2 -3
- package/dist/serialization/types/LettaRequest.js +2 -3
- package/dist/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/dist/serialization/types/{RecallMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/dist/serialization/types/LettaResponse.d.ts +2 -2
- package/dist/serialization/types/LettaResponse.js +2 -2
- package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/dist/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/serialization/types/Run.d.ts +2 -0
- package/dist/serialization/types/Run.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -3
- package/dist/serialization/types/index.js +2 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +24 -280
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{dist/serialization/resources/tools/client/getByName.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/serialization/resources/agents/types/index.d.ts +1 -0
- package/serialization/resources/agents/types/index.js +1 -0
- package/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/serialization/resources/tools/client/index.d.ts +0 -1
- package/serialization/resources/tools/client/index.js +1 -2
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/serialization/types/LettaRequest.d.ts +2 -3
- package/serialization/types/LettaRequest.js +2 -3
- package/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/serialization/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/serialization/types/LettaResponse.d.ts +2 -2
- package/serialization/types/LettaResponse.js +2 -2
- package/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/serialization/types/Run.d.ts +2 -0
- package/serialization/types/Run.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/serialization/types/index.d.ts +2 -3
- package/serialization/types/index.js +2 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/dist/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/dist/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/dist/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/dist/api/types/LettaResponseMessagesItem.js +0 -5
- package/dist/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/types/RecallMemorySummary.js +0 -5
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/dist/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/dist/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/dist/serialization/types/ArchivalMemorySummary.js +0 -43
- package/dist/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.js +0 -43
- /package/api/resources/agents/{resources/messages/types/MessagesListResponseItem.js → types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/api/types/{ArchivalMemorySummary.js → LettaMessageUnion.js} +0 -0
- /package/api/types/{LettaResponseMessagesItem.js → LettaRequestConfig.js} +0 -0
- /package/{api/types/RecallMemorySummary.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/dist/api/{resources/agents/resources/messages/types/MessagesListResponseItem.js → types/LettaMessageUnion.js} +0 -0
- /package/dist/api/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +0 -0
- /package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
- /package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
|
@@ -38,5 +38,5 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Response = void 0;
|
|
40
40
|
const core = __importStar(require("../../../../core"));
|
|
41
|
-
const
|
|
42
|
-
exports.Response = core.serialization.list(
|
|
41
|
+
const LettaMessageUnion_1 = require("../../../types/LettaMessageUnion");
|
|
42
|
+
exports.Response = core.serialization.list(LettaMessageUnion_1.LettaMessageUnion);
|
|
@@ -36,8 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.listComposioActionsByApp = exports.listComposioApps = exports.addBaseTool = exports.list =
|
|
40
|
-
exports.getByName = __importStar(require("./getByName"));
|
|
39
|
+
exports.listComposioActionsByApp = exports.listComposioApps = exports.addBaseTool = exports.list = void 0;
|
|
41
40
|
exports.list = __importStar(require("./list"));
|
|
42
41
|
exports.addBaseTool = __importStar(require("./addBaseTool"));
|
|
43
42
|
exports.listComposioApps = __importStar(require("./listComposioApps"));
|
|
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
|
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
export declare const EmbeddingConfigEmbeddingEndpointType: core.serialization.Schema<serializers.EmbeddingConfigEmbeddingEndpointType.Raw, Letta.EmbeddingConfigEmbeddingEndpointType>;
|
|
8
8
|
export declare namespace EmbeddingConfigEmbeddingEndpointType {
|
|
9
|
-
type Raw = "openai" | "anthropic" | "cohere" | "google_ai" | "azure" | "groq" | "ollama" | "webui" | "webui-legacy" | "lmstudio" | "lmstudio-legacy" | "llamacpp" | "koboldcpp" | "vllm" | "hugging-face" | "mistral" | "together";
|
|
9
|
+
type Raw = "openai" | "anthropic" | "bedrock" | "cohere" | "google_ai" | "azure" | "groq" | "ollama" | "webui" | "webui-legacy" | "lmstudio" | "lmstudio-legacy" | "llamacpp" | "koboldcpp" | "vllm" | "hugging-face" | "mistral" | "together";
|
|
10
10
|
}
|
|
@@ -10,9 +10,9 @@ import { ReasoningMessage } from "./ReasoningMessage";
|
|
|
10
10
|
import { ToolCallMessage } from "./ToolCallMessage";
|
|
11
11
|
import { ToolReturnMessage } from "./ToolReturnMessage";
|
|
12
12
|
import { AssistantMessageOutput } from "./AssistantMessageOutput";
|
|
13
|
-
export declare const
|
|
14
|
-
export declare namespace
|
|
15
|
-
type Raw =
|
|
13
|
+
export declare const LettaMessageUnion: core.serialization.Schema<serializers.LettaMessageUnion.Raw, Letta.LettaMessageUnion>;
|
|
14
|
+
export declare namespace LettaMessageUnion {
|
|
15
|
+
type Raw = LettaMessageUnion.SystemMessage | LettaMessageUnion.UserMessage | LettaMessageUnion.ReasoningMessage | LettaMessageUnion.ToolCallMessage | LettaMessageUnion.ToolReturnMessage | LettaMessageUnion.AssistantMessage;
|
|
16
16
|
interface SystemMessage extends SystemMessageOutput.Raw {
|
|
17
17
|
message_type: "system_message";
|
|
18
18
|
}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.LettaMessageUnion = void 0;
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
41
|
const SystemMessageOutput_1 = require("./SystemMessageOutput");
|
|
42
42
|
const UserMessageOutput_1 = require("./UserMessageOutput");
|
|
@@ -44,7 +44,7 @@ const ReasoningMessage_1 = require("./ReasoningMessage");
|
|
|
44
44
|
const ToolCallMessage_1 = require("./ToolCallMessage");
|
|
45
45
|
const ToolReturnMessage_1 = require("./ToolReturnMessage");
|
|
46
46
|
const AssistantMessageOutput_1 = require("./AssistantMessageOutput");
|
|
47
|
-
exports.
|
|
47
|
+
exports.LettaMessageUnion = core.serialization
|
|
48
48
|
.union(core.serialization.discriminant("messageType", "message_type"), {
|
|
49
49
|
system_message: SystemMessageOutput_1.SystemMessageOutput,
|
|
50
50
|
user_message: UserMessageOutput_1.UserMessageOutput,
|
|
@@ -5,12 +5,11 @@ import * as serializers from "../index";
|
|
|
5
5
|
import * as Letta from "../../api/index";
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
import { MessageCreate } from "./MessageCreate";
|
|
8
|
+
import { LettaRequestConfig } from "./LettaRequestConfig";
|
|
8
9
|
export declare const LettaRequest: core.serialization.ObjectSchema<serializers.LettaRequest.Raw, Letta.LettaRequest>;
|
|
9
10
|
export declare namespace LettaRequest {
|
|
10
11
|
interface Raw {
|
|
11
12
|
messages: MessageCreate.Raw[];
|
|
12
|
-
|
|
13
|
-
assistant_message_tool_name?: string | null;
|
|
14
|
-
assistant_message_tool_kwarg?: string | null;
|
|
13
|
+
config?: LettaRequestConfig.Raw | null;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -39,9 +39,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.LettaRequest = void 0;
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
41
|
const MessageCreate_1 = require("./MessageCreate");
|
|
42
|
+
const LettaRequestConfig_1 = require("./LettaRequestConfig");
|
|
42
43
|
exports.LettaRequest = core.serialization.object({
|
|
43
44
|
messages: core.serialization.list(MessageCreate_1.MessageCreate),
|
|
44
|
-
|
|
45
|
-
assistantMessageToolName: core.serialization.property("assistant_message_tool_name", core.serialization.string().optional()),
|
|
46
|
-
assistantMessageToolKwarg: core.serialization.property("assistant_message_tool_kwarg", core.serialization.string().optional()),
|
|
45
|
+
config: LettaRequestConfig_1.LettaRequestConfig.optional(),
|
|
47
46
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Letta from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const LettaRequestConfig: core.serialization.ObjectSchema<serializers.LettaRequestConfig.Raw, Letta.LettaRequestConfig>;
|
|
8
|
+
export declare namespace LettaRequestConfig {
|
|
9
|
+
interface Raw {
|
|
10
|
+
use_assistant_message?: boolean | null;
|
|
11
|
+
assistant_message_tool_name?: string | null;
|
|
12
|
+
assistant_message_tool_kwarg?: string | null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -36,8 +36,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.LettaRequestConfig = void 0;
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
|
-
exports.
|
|
42
|
-
|
|
41
|
+
exports.LettaRequestConfig = core.serialization.object({
|
|
42
|
+
useAssistantMessage: core.serialization.property("use_assistant_message", core.serialization.boolean().optional()),
|
|
43
|
+
assistantMessageToolName: core.serialization.property("assistant_message_tool_name", core.serialization.string().optional()),
|
|
44
|
+
assistantMessageToolKwarg: core.serialization.property("assistant_message_tool_kwarg", core.serialization.string().optional()),
|
|
43
45
|
});
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import * as serializers from "../index";
|
|
5
5
|
import * as Letta from "../../api/index";
|
|
6
6
|
import * as core from "../../core";
|
|
7
|
-
import {
|
|
7
|
+
import { LettaMessageUnion } from "./LettaMessageUnion";
|
|
8
8
|
import { LettaUsageStatistics } from "./LettaUsageStatistics";
|
|
9
9
|
export declare const LettaResponse: core.serialization.ObjectSchema<serializers.LettaResponse.Raw, Letta.LettaResponse>;
|
|
10
10
|
export declare namespace LettaResponse {
|
|
11
11
|
interface Raw {
|
|
12
|
-
messages:
|
|
12
|
+
messages: LettaMessageUnion.Raw[];
|
|
13
13
|
usage: LettaUsageStatistics.Raw;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -38,9 +38,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.LettaResponse = void 0;
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
|
-
const
|
|
41
|
+
const LettaMessageUnion_1 = require("./LettaMessageUnion");
|
|
42
42
|
const LettaUsageStatistics_1 = require("./LettaUsageStatistics");
|
|
43
43
|
exports.LettaResponse = core.serialization.object({
|
|
44
|
-
messages: core.serialization.list(
|
|
44
|
+
messages: core.serialization.list(LettaMessageUnion_1.LettaMessageUnion),
|
|
45
45
|
usage: LettaUsageStatistics_1.LettaUsageStatistics,
|
|
46
46
|
});
|
|
@@ -53,4 +53,5 @@ exports.LettaSchemasMessageMessage = core.serialization.object({
|
|
|
53
53
|
name: core.serialization.string().optional(),
|
|
54
54
|
toolCalls: core.serialization.property("tool_calls", core.serialization.list(LettaSchemasOpenaiChatCompletionsToolCallOutput_1.LettaSchemasOpenaiChatCompletionsToolCallOutput).optional()),
|
|
55
55
|
toolCallId: core.serialization.property("tool_call_id", core.serialization.string().optional()),
|
|
56
|
+
stepId: core.serialization.property("step_id", core.serialization.string().optional()),
|
|
56
57
|
});
|
|
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
|
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
export declare const LlmConfigModelEndpointType: core.serialization.Schema<serializers.LlmConfigModelEndpointType.Raw, Letta.LlmConfigModelEndpointType>;
|
|
8
8
|
export declare namespace LlmConfigModelEndpointType {
|
|
9
|
-
type Raw = "openai" | "anthropic" | "cohere" | "google_ai" | "azure" | "groq" | "ollama" | "webui" | "webui-legacy" | "lmstudio" | "lmstudio-legacy" | "llamacpp" | "koboldcpp" | "vllm" | "hugging-face" | "mistral" | "together";
|
|
9
|
+
type Raw = "openai" | "anthropic" | "cohere" | "google_ai" | "azure" | "groq" | "ollama" | "webui" | "webui-legacy" | "lmstudio" | "lmstudio-legacy" | "llamacpp" | "koboldcpp" | "vllm" | "hugging-face" | "mistral" | "together" | "bedrock";
|
|
10
10
|
}
|
|
@@ -6,6 +6,7 @@ import * as Letta from "../../api/index";
|
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
import { JobStatus } from "./JobStatus";
|
|
8
8
|
import { JobType } from "./JobType";
|
|
9
|
+
import { LettaRequestConfig } from "./LettaRequestConfig";
|
|
9
10
|
export declare const Run: core.serialization.ObjectSchema<serializers.Run.Raw, Letta.Run>;
|
|
10
11
|
export declare namespace Run {
|
|
11
12
|
interface Raw {
|
|
@@ -18,5 +19,6 @@ export declare namespace Run {
|
|
|
18
19
|
metadata_?: Record<string, unknown> | null;
|
|
19
20
|
job_type?: JobType.Raw | null;
|
|
20
21
|
id?: string | null;
|
|
22
|
+
request_config?: LettaRequestConfig.Raw | null;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -40,6 +40,7 @@ exports.Run = void 0;
|
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
41
|
const JobStatus_1 = require("./JobStatus");
|
|
42
42
|
const JobType_1 = require("./JobType");
|
|
43
|
+
const LettaRequestConfig_1 = require("./LettaRequestConfig");
|
|
43
44
|
exports.Run = core.serialization.object({
|
|
44
45
|
createdById: core.serialization.property("created_by_id", core.serialization.string().optional()),
|
|
45
46
|
lastUpdatedById: core.serialization.property("last_updated_by_id", core.serialization.string().optional()),
|
|
@@ -50,4 +51,5 @@ exports.Run = core.serialization.object({
|
|
|
50
51
|
metadata: core.serialization.property("metadata_", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
51
52
|
jobType: core.serialization.property("job_type", JobType_1.JobType.optional()),
|
|
52
53
|
id: core.serialization.string().optional(),
|
|
54
|
+
requestConfig: core.serialization.property("request_config", LettaRequestConfig_1.LettaRequestConfig.optional()),
|
|
53
55
|
});
|
|
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
|
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
export declare const ToolType: core.serialization.Schema<serializers.ToolType.Raw, Letta.ToolType>;
|
|
8
8
|
export declare namespace ToolType {
|
|
9
|
-
type Raw = "custom" | "letta_core" | "letta_memory_core";
|
|
9
|
+
type Raw = "custom" | "letta_core" | "letta_memory_core" | "letta_multi_agent_core";
|
|
10
10
|
}
|
|
@@ -12,7 +12,6 @@ export * from "./AgentType";
|
|
|
12
12
|
export * from "./AppAuthSchemeAuthMode";
|
|
13
13
|
export * from "./AppAuthScheme";
|
|
14
14
|
export * from "./AppModel";
|
|
15
|
-
export * from "./ArchivalMemorySummary";
|
|
16
15
|
export * from "./AssistantFile";
|
|
17
16
|
export * from "./AssistantMessageInput";
|
|
18
17
|
export * from "./AssistantMessageOutput";
|
|
@@ -52,7 +51,7 @@ export * from "./JobType";
|
|
|
52
51
|
export * from "./LlmConfigModelEndpointType";
|
|
53
52
|
export * from "./LlmConfig";
|
|
54
53
|
export * from "./LettaRequest";
|
|
55
|
-
export * from "./
|
|
54
|
+
export * from "./LettaRequestConfig";
|
|
56
55
|
export * from "./LettaResponse";
|
|
57
56
|
export * from "./LettaUsageStatistics";
|
|
58
57
|
export * from "./LocalSandboxConfig";
|
|
@@ -68,7 +67,6 @@ export * from "./OrganizationCreate";
|
|
|
68
67
|
export * from "./Passage";
|
|
69
68
|
export * from "./Provider";
|
|
70
69
|
export * from "./ReasoningMessage";
|
|
71
|
-
export * from "./RecallMemorySummary";
|
|
72
70
|
export * from "./ResponseFormat";
|
|
73
71
|
export * from "./Run";
|
|
74
72
|
export * from "./SandboxConfig";
|
|
@@ -116,3 +114,4 @@ export * from "./LettaSchemasOpenaiChatCompletionsToolCallInput";
|
|
|
116
114
|
export * from "./LettaSchemasOpenaiChatCompletionsToolCallOutput";
|
|
117
115
|
export * from "./LettaSchemasOpenaiChatCompletionsToolCallFunction";
|
|
118
116
|
export * from "./LettaSchemasToolTool";
|
|
117
|
+
export * from "./LettaMessageUnion";
|
|
@@ -28,7 +28,6 @@ __exportStar(require("./AgentType"), exports);
|
|
|
28
28
|
__exportStar(require("./AppAuthSchemeAuthMode"), exports);
|
|
29
29
|
__exportStar(require("./AppAuthScheme"), exports);
|
|
30
30
|
__exportStar(require("./AppModel"), exports);
|
|
31
|
-
__exportStar(require("./ArchivalMemorySummary"), exports);
|
|
32
31
|
__exportStar(require("./AssistantFile"), exports);
|
|
33
32
|
__exportStar(require("./AssistantMessageInput"), exports);
|
|
34
33
|
__exportStar(require("./AssistantMessageOutput"), exports);
|
|
@@ -68,7 +67,7 @@ __exportStar(require("./JobType"), exports);
|
|
|
68
67
|
__exportStar(require("./LlmConfigModelEndpointType"), exports);
|
|
69
68
|
__exportStar(require("./LlmConfig"), exports);
|
|
70
69
|
__exportStar(require("./LettaRequest"), exports);
|
|
71
|
-
__exportStar(require("./
|
|
70
|
+
__exportStar(require("./LettaRequestConfig"), exports);
|
|
72
71
|
__exportStar(require("./LettaResponse"), exports);
|
|
73
72
|
__exportStar(require("./LettaUsageStatistics"), exports);
|
|
74
73
|
__exportStar(require("./LocalSandboxConfig"), exports);
|
|
@@ -84,7 +83,6 @@ __exportStar(require("./OrganizationCreate"), exports);
|
|
|
84
83
|
__exportStar(require("./Passage"), exports);
|
|
85
84
|
__exportStar(require("./Provider"), exports);
|
|
86
85
|
__exportStar(require("./ReasoningMessage"), exports);
|
|
87
|
-
__exportStar(require("./RecallMemorySummary"), exports);
|
|
88
86
|
__exportStar(require("./ResponseFormat"), exports);
|
|
89
87
|
__exportStar(require("./Run"), exports);
|
|
90
88
|
__exportStar(require("./SandboxConfig"), exports);
|
|
@@ -132,3 +130,4 @@ __exportStar(require("./LettaSchemasOpenaiChatCompletionsToolCallInput"), export
|
|
|
132
130
|
__exportStar(require("./LettaSchemasOpenaiChatCompletionsToolCallOutput"), exports);
|
|
133
131
|
__exportStar(require("./LettaSchemasOpenaiChatCompletionsToolCallFunction"), exports);
|
|
134
132
|
__exportStar(require("./LettaSchemasToolTool"), exports);
|
|
133
|
+
__exportStar(require("./LettaMessageUnion"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.12";
|
package/version.js
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Letta from "../../../../../index";
|
|
5
|
-
export type MessagesListResponseItem = Letta.agents.MessagesListResponseItem.SystemMessage | Letta.agents.MessagesListResponseItem.UserMessage | Letta.agents.MessagesListResponseItem.ReasoningMessage | Letta.agents.MessagesListResponseItem.ToolCallMessage | Letta.agents.MessagesListResponseItem.ToolReturnMessage | Letta.agents.MessagesListResponseItem.AssistantMessage;
|
|
6
|
-
export declare namespace MessagesListResponseItem {
|
|
7
|
-
interface SystemMessage extends Letta.SystemMessageOutput {
|
|
8
|
-
messageType: "system_message";
|
|
9
|
-
}
|
|
10
|
-
interface UserMessage extends Letta.UserMessageOutput {
|
|
11
|
-
messageType: "user_message";
|
|
12
|
-
}
|
|
13
|
-
interface ReasoningMessage extends Letta.ReasoningMessage {
|
|
14
|
-
messageType: "reasoning_message";
|
|
15
|
-
}
|
|
16
|
-
interface ToolCallMessage extends Letta.ToolCallMessage {
|
|
17
|
-
messageType: "tool_call_message";
|
|
18
|
-
}
|
|
19
|
-
interface ToolReturnMessage extends Letta.ToolReturnMessage {
|
|
20
|
-
messageType: "tool_return_message";
|
|
21
|
-
}
|
|
22
|
-
interface AssistantMessage extends Letta.AssistantMessageOutput {
|
|
23
|
-
messageType: "assistant_message";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../../../environments";
|
|
5
|
-
import * as core from "../../../../../../core";
|
|
6
|
-
import * as Letta from "../../../../../index";
|
|
7
|
-
export declare namespace RecallMemory {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token?: core.Supplier<string | undefined>;
|
|
13
|
-
fetcher?: core.FetchFunction;
|
|
14
|
-
}
|
|
15
|
-
interface RequestOptions {
|
|
16
|
-
/** The maximum time to wait for a response in seconds. */
|
|
17
|
-
timeoutInSeconds?: number;
|
|
18
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
19
|
-
maxRetries?: number;
|
|
20
|
-
/** A hook to abort the request. */
|
|
21
|
-
abortSignal?: AbortSignal;
|
|
22
|
-
/** Additional headers to include in the request. */
|
|
23
|
-
headers?: Record<string, string>;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export declare class RecallMemory {
|
|
27
|
-
protected readonly _options: RecallMemory.Options;
|
|
28
|
-
constructor(_options?: RecallMemory.Options);
|
|
29
|
-
/**
|
|
30
|
-
* Retrieve the summary of the recall memory of a specific agent.
|
|
31
|
-
*
|
|
32
|
-
* @param {string} agentId
|
|
33
|
-
* @param {RecallMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
-
*
|
|
35
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* await client.agents.recallMemory.getSummary("agent_id")
|
|
39
|
-
*/
|
|
40
|
-
getSummary(agentId: string, requestOptions?: RecallMemory.RequestOptions): Promise<Letta.RecallMemorySummary>;
|
|
41
|
-
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
42
|
-
Authorization: string;
|
|
43
|
-
}>;
|
|
44
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.RecallMemory = void 0;
|
|
52
|
-
const environments = __importStar(require("../../../../../../environments"));
|
|
53
|
-
const core = __importStar(require("../../../../../../core"));
|
|
54
|
-
const Letta = __importStar(require("../../../../../index"));
|
|
55
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
-
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
57
|
-
const errors = __importStar(require("../../../../../../errors/index"));
|
|
58
|
-
class RecallMemory {
|
|
59
|
-
constructor(_options = {}) {
|
|
60
|
-
this._options = _options;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve the summary of the recall memory of a specific agent.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} agentId
|
|
66
|
-
* @param {RecallMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
-
*
|
|
68
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.agents.recallMemory.getSummary("agent_id")
|
|
72
|
-
*/
|
|
73
|
-
getSummary(agentId, requestOptions) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}/memory/recall`),
|
|
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.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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
|
-
contentType: "application/json",
|
|
81
|
-
requestType: "json",
|
|
82
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
83
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
84
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
-
});
|
|
86
|
-
if (_response.ok) {
|
|
87
|
-
return serializers.RecallMemorySummary.parseOrThrow(_response.body, {
|
|
88
|
-
unrecognizedObjectKeys: "passthrough",
|
|
89
|
-
allowUnrecognizedUnionMembers: true,
|
|
90
|
-
allowUnrecognizedEnumValues: true,
|
|
91
|
-
skipValidation: true,
|
|
92
|
-
breadcrumbsPrefix: ["response"],
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
if (_response.error.reason === "status-code") {
|
|
96
|
-
switch (_response.error.statusCode) {
|
|
97
|
-
case 422:
|
|
98
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
99
|
-
unrecognizedObjectKeys: "passthrough",
|
|
100
|
-
allowUnrecognizedUnionMembers: true,
|
|
101
|
-
allowUnrecognizedEnumValues: true,
|
|
102
|
-
skipValidation: true,
|
|
103
|
-
breadcrumbsPrefix: ["response"],
|
|
104
|
-
}));
|
|
105
|
-
default:
|
|
106
|
-
throw new errors.LettaError({
|
|
107
|
-
statusCode: _response.error.statusCode,
|
|
108
|
-
body: _response.error.body,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
switch (_response.error.reason) {
|
|
113
|
-
case "non-json":
|
|
114
|
-
throw new errors.LettaError({
|
|
115
|
-
statusCode: _response.error.statusCode,
|
|
116
|
-
body: _response.error.rawBody,
|
|
117
|
-
});
|
|
118
|
-
case "timeout":
|
|
119
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/recall.");
|
|
120
|
-
case "unknown":
|
|
121
|
-
throw new errors.LettaError({
|
|
122
|
-
message: _response.error.errorMessage,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
_getCustomAuthorizationHeaders() {
|
|
128
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
130
|
-
return { Authorization: `Bearer ${tokenValue}` };
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.RecallMemory = RecallMemory;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client"), exports);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Letta from "../../../../../index";
|
|
5
|
-
export type MessagesListResponseItem = Letta.agents.MessagesListResponseItem.SystemMessage | Letta.agents.MessagesListResponseItem.UserMessage | Letta.agents.MessagesListResponseItem.ReasoningMessage | Letta.agents.MessagesListResponseItem.ToolCallMessage | Letta.agents.MessagesListResponseItem.ToolReturnMessage | Letta.agents.MessagesListResponseItem.AssistantMessage;
|
|
6
|
-
export declare namespace MessagesListResponseItem {
|
|
7
|
-
interface SystemMessage extends Letta.SystemMessageOutput {
|
|
8
|
-
messageType: "system_message";
|
|
9
|
-
}
|
|
10
|
-
interface UserMessage extends Letta.UserMessageOutput {
|
|
11
|
-
messageType: "user_message";
|
|
12
|
-
}
|
|
13
|
-
interface ReasoningMessage extends Letta.ReasoningMessage {
|
|
14
|
-
messageType: "reasoning_message";
|
|
15
|
-
}
|
|
16
|
-
interface ToolCallMessage extends Letta.ToolCallMessage {
|
|
17
|
-
messageType: "tool_call_message";
|
|
18
|
-
}
|
|
19
|
-
interface ToolReturnMessage extends Letta.ToolReturnMessage {
|
|
20
|
-
messageType: "tool_return_message";
|
|
21
|
-
}
|
|
22
|
-
interface AssistantMessage extends Letta.AssistantMessageOutput {
|
|
23
|
-
messageType: "assistant_message";
|
|
24
|
-
}
|
|
25
|
-
}
|