@letta-ai/letta-client 0.1.12 → 0.1.13
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 +129 -10
- package/api/resources/agents/client/Client.js +630 -26
- package/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → client/requests/ListArchivalMemoryRequest.d.ts} +1 -1
- package/api/resources/agents/client/requests/index.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +4 -21
- package/api/resources/agents/resources/archivalMemory/client/Client.js +22 -98
- package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
- package/api/resources/agents/resources/archivalMemory/client/index.js +0 -15
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -2
- package/api/resources/agents/resources/context/client/Client.js +3 -3
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +16 -46
- package/api/resources/agents/resources/coreMemory/client/Client.js +64 -199
- package/api/resources/agents/resources/index.d.ts +0 -1
- package/api/resources/agents/resources/index.js +0 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -2
- package/api/resources/agents/resources/memoryVariables/client/Client.js +4 -4
- package/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.d.ts → MemoryVariablesListResponse.d.ts} +1 -1
- package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
- package/api/resources/agents/resources/memoryVariables/types/index.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -24
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/sources/client/Client.d.ts +28 -2
- package/api/resources/agents/resources/sources/client/Client.js +136 -4
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.d.ts +7 -7
- package/api/resources/agents/resources/tools/client/Client.js +13 -13
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -15
- package/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +8 -0
- package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js → api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
- package/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +8 -0
- package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js → api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
- package/api/resources/agents/types/{AgentsSearchRequestSearchItemName.d.ts → AgentsSearchRequestSearchItemOne.d.ts} +3 -2
- package/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.d.ts → AgentsSearchRequestSearchItemOneOperator.d.ts} +2 -2
- package/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
- package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts → api/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts} +2 -1
- package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts → api/resources/agents/types/AgentsSearchRequestSearchItemZero.d.ts} +2 -1
- package/api/resources/agents/types/index.d.ts +7 -7
- package/api/resources/agents/types/index.js +7 -7
- package/api/resources/blocks/client/Client.d.ts +4 -34
- package/api/resources/blocks/client/Client.js +9 -141
- package/api/resources/blocks/client/requests/index.d.ts +0 -2
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.d.ts +2 -2
- package/api/resources/jobs/client/Client.js +6 -6
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.d.ts +2 -2
- package/api/resources/providers/client/Client.js +6 -6
- package/api/resources/runs/client/Client.d.ts +7 -7
- package/api/resources/runs/client/Client.js +14 -14
- package/api/resources/runs/client/requests/{GetRunMessagesRequest.d.ts → ListRunMessagesRequest.d.ts} +1 -1
- package/api/resources/runs/client/requests/index.d.ts +1 -1
- package/api/resources/sources/client/Client.d.ts +4 -34
- package/api/resources/sources/client/Client.js +10 -154
- package/api/resources/sources/client/requests/index.d.ts +0 -2
- 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 +9 -9
- package/api/resources/tools/client/Client.js +20 -20
- package/api/types/AgentState.d.ts +1 -1
- package/{dist/api/types/AssistantMessageOutput.d.ts → api/types/AssistantMessage.d.ts} +2 -1
- package/api/types/Block.d.ts +1 -1
- package/api/types/ChatCompletionMessageToolCall.d.ts +11 -0
- package/api/types/ContextWindowOverview.d.ts +2 -2
- package/api/types/{LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts → Function.d.ts} +4 -2
- package/{dist/api/types/FunctionSchema.d.ts → api/types/FunctionDefinition.d.ts} +4 -1
- package/api/types/FunctionTool.d.ts +10 -0
- package/api/types/LettaMessageUnion.d.ts +1 -21
- package/api/types/LettaUsageStatistics.d.ts +1 -0
- package/api/types/{LettaSchemasMessageMessage.d.ts → Message.d.ts} +3 -3
- package/api/types/ReasoningMessage.d.ts +1 -0
- package/api/types/Source.d.ts +1 -1
- package/api/types/{SystemMessageOutput.d.ts → SystemMessage.d.ts} +2 -1
- package/{dist/api/types/LettaSchemasToolTool.d.ts → api/types/Tool.d.ts} +1 -1
- package/{dist/api/types/LettaSchemasLettaMessageToolCall.d.ts → api/types/ToolCall.d.ts} +1 -1
- package/api/types/ToolCallMessage.d.ts +1 -0
- package/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/api/types/ToolReturnMessage.d.ts +1 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +2 -1
- package/api/types/index.d.ts +10 -41
- package/api/types/index.js +10 -41
- package/dist/api/resources/agents/client/Client.d.ts +129 -10
- package/dist/api/resources/agents/client/Client.js +630 -26
- package/dist/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → client/requests/ListArchivalMemoryRequest.d.ts} +1 -1
- package/dist/api/resources/agents/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +4 -21
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +22 -98
- package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
- package/dist/api/resources/agents/resources/archivalMemory/client/index.js +0 -15
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/resources/context/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +16 -46
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +64 -199
- package/dist/api/resources/agents/resources/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/index.js +0 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.d.ts → MemoryVariablesListResponse.d.ts} +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/types/index.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -24
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +28 -2
- package/dist/api/resources/agents/resources/sources/client/Client.js +136 -4
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +7 -7
- package/dist/api/resources/agents/resources/tools/client/Client.js +13 -13
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -15
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +8 -0
- package/{api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +8 -0
- package/{api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
- package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemName.d.ts → AgentsSearchRequestSearchItemOne.d.ts} +3 -2
- package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.d.ts → AgentsSearchRequestSearchItemOneOperator.d.ts} +2 -2
- package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
- package/{api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts} +2 -1
- package/{api/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts → dist/api/resources/agents/types/AgentsSearchRequestSearchItemZero.d.ts} +2 -1
- package/dist/api/resources/agents/types/index.d.ts +7 -7
- package/dist/api/resources/agents/types/index.js +7 -7
- package/dist/api/resources/blocks/client/Client.d.ts +4 -34
- package/dist/api/resources/blocks/client/Client.js +9 -141
- package/dist/api/resources/blocks/client/requests/index.d.ts +0 -2
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.d.ts +2 -2
- package/dist/api/resources/jobs/client/Client.js +6 -6
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.d.ts +2 -2
- package/dist/api/resources/providers/client/Client.js +6 -6
- package/dist/api/resources/runs/client/Client.d.ts +7 -7
- package/dist/api/resources/runs/client/Client.js +14 -14
- package/dist/api/resources/runs/client/requests/{GetRunMessagesRequest.d.ts → ListRunMessagesRequest.d.ts} +1 -1
- package/dist/api/resources/runs/client/requests/index.d.ts +1 -1
- package/dist/api/resources/sources/client/Client.d.ts +4 -34
- package/dist/api/resources/sources/client/Client.js +10 -154
- package/dist/api/resources/sources/client/requests/index.d.ts +0 -2
- 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 +9 -9
- package/dist/api/resources/tools/client/Client.js +20 -20
- package/dist/api/types/AgentState.d.ts +1 -1
- package/{api/types/AssistantMessageOutput.d.ts → dist/api/types/AssistantMessage.d.ts} +2 -1
- package/dist/api/types/Block.d.ts +1 -1
- package/dist/api/types/ChatCompletionMessageToolCall.d.ts +11 -0
- package/dist/api/types/ContextWindowOverview.d.ts +2 -2
- package/{api/types/FunctionCallOutput.d.ts → dist/api/types/Function.d.ts} +3 -1
- package/{api/types/FunctionSchema.d.ts → dist/api/types/FunctionDefinition.d.ts} +4 -1
- package/dist/api/types/FunctionTool.d.ts +10 -0
- package/dist/api/types/LettaMessageUnion.d.ts +1 -21
- package/dist/api/types/LettaUsageStatistics.d.ts +1 -0
- package/dist/api/types/{LettaSchemasMessageMessage.d.ts → Message.d.ts} +3 -3
- package/dist/api/types/ReasoningMessage.d.ts +1 -0
- package/dist/api/types/Source.d.ts +1 -1
- package/dist/api/types/{SystemMessageOutput.d.ts → SystemMessage.d.ts} +2 -1
- package/{api/types/LettaSchemasToolTool.d.ts → dist/api/types/Tool.d.ts} +1 -1
- package/{api/types/LettaSchemasLettaMessageToolCall.d.ts → dist/api/types/ToolCall.d.ts} +1 -1
- package/dist/api/types/ToolCallMessage.d.ts +1 -0
- package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/dist/api/types/ToolReturnMessage.d.ts +1 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +2 -1
- package/dist/api/types/index.d.ts +10 -41
- package/dist/api/types/index.js +10 -41
- package/dist/serialization/resources/agents/client/createArchivalMemory.d.ts +11 -0
- package/dist/serialization/resources/agents/{resources/archivalMemory/client/list.js → client/createArchivalMemory.js} +2 -2
- package/dist/serialization/resources/agents/client/index.d.ts +3 -0
- package/dist/serialization/resources/agents/client/index.js +4 -1
- package/dist/serialization/resources/agents/client/listArchivalMemory.d.ts +11 -0
- package/dist/serialization/resources/agents/{resources/archivalMemory/client/create.js → client/listArchivalMemory.js} +2 -2
- package/dist/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +11 -0
- package/{serialization/resources/agents/resources/coreMemory/client/list.js → dist/serialization/resources/agents/client/listCoreMemoryBlocks.js} +2 -2
- 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/agents/client/requests/CreateArchivalMemory.d.ts +12 -0
- package/{serialization/resources/agents/resources/archivalMemory → dist/serialization/resources/agents}/client/requests/CreateArchivalMemory.js +1 -1
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -1
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -1
- package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/index.js +3 -1
- package/dist/serialization/resources/agents/resources/index.d.ts +0 -3
- package/dist/serialization/resources/agents/resources/index.js +1 -4
- package/{serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts → dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.d.ts} +2 -2
- package/{serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js → dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +2 -2
- package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +1 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +4 -25
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +12 -17
- 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/sources/client/index.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/sources/client/index.js +2 -2
- package/{serialization/resources/agents/resources/sources/client/get.d.ts → dist/serialization/resources/agents/resources/sources/client/list.d.ts} +1 -1
- package/dist/serialization/resources/agents/resources/tools/client/list.d.ts +3 -3
- package/dist/serialization/resources/agents/resources/tools/client/list.js +2 -2
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -17
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +10 -15
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +16 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemDirection.js} +7 -6
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +10 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +10 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByValue.js → AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOne.d.ts +15 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemOne.js} +5 -4
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOneOperator.d.ts +10 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByDirection.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts +14 -0
- package/{serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +3 -2
- package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemTags.d.ts → AgentsSearchRequestSearchItemZero.d.ts} +4 -4
- package/{serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +3 -2
- package/dist/serialization/resources/agents/types/index.d.ts +7 -7
- package/dist/serialization/resources/agents/types/index.js +7 -7
- package/dist/serialization/resources/runs/client/index.d.ts +1 -1
- package/dist/serialization/resources/runs/client/index.js +2 -2
- package/dist/serialization/resources/runs/client/{getRunMessages.d.ts → listRunMessages.d.ts} +1 -1
- package/dist/serialization/resources/sources/client/requests/SourceCreate.d.ts +1 -1
- package/dist/serialization/resources/sources/client/requests/SourceCreate.js +1 -1
- package/dist/serialization/resources/sources/client/requests/SourceUpdate.d.ts +1 -1
- package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +1 -1
- package/dist/serialization/resources/tools/client/addBaseTool.d.ts +3 -3
- package/dist/serialization/resources/tools/client/addBaseTool.js +2 -2
- package/dist/serialization/resources/tools/client/list.d.ts +3 -3
- package/dist/serialization/resources/tools/client/list.js +2 -2
- package/dist/serialization/types/AgentState.d.ts +3 -3
- package/dist/serialization/types/AgentState.js +3 -3
- package/{serialization/types/AssistantMessageOutput.d.ts → dist/serialization/types/AssistantMessage.d.ts} +3 -2
- package/dist/serialization/types/{AssistantMessageOutput.js → AssistantMessage.js} +3 -2
- package/dist/serialization/types/Block.d.ts +1 -1
- package/dist/serialization/types/Block.js +1 -1
- package/dist/serialization/types/BlockUpdate.d.ts +1 -1
- package/dist/serialization/types/BlockUpdate.js +1 -1
- package/dist/serialization/types/ChatCompletionMessageToolCall.d.ts +16 -0
- package/dist/serialization/types/{DeleteAssistantFileResponse.js → ChatCompletionMessageToolCall.js} +8 -5
- package/dist/serialization/types/ContextWindowOverview.d.ts +4 -4
- package/dist/serialization/types/ContextWindowOverview.js +4 -4
- package/dist/serialization/types/CreateBlock.d.ts +1 -1
- package/dist/serialization/types/CreateBlock.js +1 -1
- package/dist/serialization/types/{FunctionCallOutput.d.ts → Function.d.ts} +3 -2
- package/{serialization/types/FunctionCallOutput.js → dist/serialization/types/Function.js} +5 -3
- package/{serialization/types/FunctionSchema.d.ts → dist/serialization/types/FunctionDefinition.d.ts} +4 -2
- package/{serialization/types/FunctionSchema.js → dist/serialization/types/FunctionDefinition.js} +6 -3
- package/dist/serialization/types/FunctionTool.d.ts +15 -0
- package/dist/serialization/types/{ChatCompletionRequestStop.js → FunctionTool.js} +8 -5
- package/dist/serialization/types/Job.d.ts +1 -1
- package/dist/serialization/types/Job.js +1 -1
- package/dist/serialization/types/LettaMessageUnion.d.ts +4 -22
- package/dist/serialization/types/LettaMessageUnion.js +11 -16
- package/dist/serialization/types/LettaUsageStatistics.d.ts +1 -0
- package/dist/serialization/types/LettaUsageStatistics.js +1 -0
- package/{serialization/types/LettaSchemasMessageMessage.d.ts → dist/serialization/types/Message.d.ts} +4 -4
- package/{serialization/types/LettaSchemasMessageMessage.js → dist/serialization/types/Message.js} +4 -4
- package/dist/serialization/types/Passage.d.ts +1 -1
- package/dist/serialization/types/Passage.js +1 -1
- package/dist/serialization/types/ReasoningMessage.d.ts +1 -0
- package/dist/serialization/types/ReasoningMessage.js +1 -0
- package/dist/serialization/types/Run.d.ts +1 -1
- package/dist/serialization/types/Run.js +1 -1
- package/dist/serialization/types/Source.d.ts +1 -1
- package/dist/serialization/types/Source.js +1 -1
- package/{serialization/types/SystemMessageOutput.d.ts → dist/serialization/types/SystemMessage.d.ts} +3 -2
- package/dist/serialization/types/{UserMessageOutput.js → SystemMessage.js} +3 -2
- package/dist/serialization/types/{LettaSchemasToolTool.d.ts → Tool.d.ts} +2 -2
- package/dist/serialization/types/{LettaSchemasToolTool.js → Tool.js} +2 -2
- package/{serialization/types/FunctionCallOutput.d.ts → dist/serialization/types/ToolCall.d.ts} +4 -3
- package/{serialization/types/LettaSchemasLettaMessageToolCall.js → dist/serialization/types/ToolCall.js} +2 -2
- package/dist/serialization/types/ToolCallMessage.d.ts +1 -0
- package/dist/serialization/types/ToolCallMessage.js +1 -0
- package/dist/serialization/types/ToolCallMessageToolCall.d.ts +2 -2
- package/dist/serialization/types/ToolCallMessageToolCall.js +2 -2
- package/dist/serialization/types/ToolReturnMessage.d.ts +1 -0
- package/dist/serialization/types/ToolReturnMessage.js +1 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +3 -2
- package/dist/serialization/types/{SystemMessageOutput.js → UserMessage.js} +3 -2
- package/dist/serialization/types/index.d.ts +10 -41
- package/dist/serialization/types/index.js +10 -41
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +887 -568
- package/serialization/resources/agents/client/createArchivalMemory.d.ts +11 -0
- package/serialization/resources/agents/{resources/archivalMemory/client/create.js → client/createArchivalMemory.js} +2 -2
- package/serialization/resources/agents/client/index.d.ts +3 -0
- package/serialization/resources/agents/client/index.js +4 -1
- package/serialization/resources/agents/client/listArchivalMemory.d.ts +11 -0
- package/serialization/resources/agents/{resources/archivalMemory/client/list.js → client/listArchivalMemory.js} +2 -2
- package/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +11 -0
- package/{dist/serialization/resources/agents/resources/coreMemory/client/list.js → serialization/resources/agents/client/listCoreMemoryBlocks.js} +2 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
- package/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +12 -0
- package/{dist/serialization/resources/agents/resources/archivalMemory → serialization/resources/agents}/client/requests/CreateArchivalMemory.js +1 -1
- package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -1
- package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -1
- package/serialization/resources/agents/client/requests/index.d.ts +1 -0
- package/serialization/resources/agents/client/requests/index.js +3 -1
- package/serialization/resources/agents/resources/index.d.ts +0 -3
- package/serialization/resources/agents/resources/index.js +1 -4
- package/{dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts → serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.d.ts} +2 -2
- package/{dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js → serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +2 -2
- package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
- package/serialization/resources/agents/resources/memoryVariables/types/index.js +1 -1
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -2
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +4 -25
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +12 -17
- 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/sources/client/index.d.ts +1 -1
- package/serialization/resources/agents/resources/sources/client/index.js +2 -2
- package/{dist/serialization/resources/agents/resources/sources/client/get.d.ts → serialization/resources/agents/resources/sources/client/list.d.ts} +1 -1
- package/serialization/resources/agents/resources/tools/client/list.d.ts +3 -3
- package/serialization/resources/agents/resources/tools/client/list.js +2 -2
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -17
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +10 -15
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +16 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.js +47 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +10 -0
- package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +10 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js +41 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOne.d.ts +15 -0
- package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemOne.js} +5 -4
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOneOperator.d.ts +10 -0
- package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByDirection.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts +14 -0
- package/{dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +3 -2
- package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemTags.d.ts → AgentsSearchRequestSearchItemZero.d.ts} +4 -4
- package/{dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +3 -2
- package/serialization/resources/agents/types/index.d.ts +7 -7
- package/serialization/resources/agents/types/index.js +7 -7
- package/serialization/resources/runs/client/index.d.ts +1 -1
- package/serialization/resources/runs/client/index.js +2 -2
- package/serialization/resources/runs/client/{getRunMessages.d.ts → listRunMessages.d.ts} +1 -1
- package/serialization/resources/sources/client/requests/SourceCreate.d.ts +1 -1
- package/serialization/resources/sources/client/requests/SourceCreate.js +1 -1
- package/serialization/resources/sources/client/requests/SourceUpdate.d.ts +1 -1
- package/serialization/resources/sources/client/requests/SourceUpdate.js +1 -1
- package/serialization/resources/tools/client/addBaseTool.d.ts +3 -3
- package/serialization/resources/tools/client/addBaseTool.js +2 -2
- package/serialization/resources/tools/client/list.d.ts +3 -3
- package/serialization/resources/tools/client/list.js +2 -2
- package/serialization/types/AgentState.d.ts +3 -3
- package/serialization/types/AgentState.js +3 -3
- package/{dist/serialization/types/AssistantMessageOutput.d.ts → serialization/types/AssistantMessage.d.ts} +3 -2
- package/serialization/types/{AssistantMessageOutput.js → AssistantMessage.js} +3 -2
- package/serialization/types/Block.d.ts +1 -1
- package/serialization/types/Block.js +1 -1
- package/serialization/types/BlockUpdate.d.ts +1 -1
- package/serialization/types/BlockUpdate.js +1 -1
- package/serialization/types/ChatCompletionMessageToolCall.d.ts +16 -0
- package/{dist/serialization/types/DeleteAssistantResponse.js → serialization/types/ChatCompletionMessageToolCall.js} +8 -5
- package/serialization/types/ContextWindowOverview.d.ts +4 -4
- package/serialization/types/ContextWindowOverview.js +4 -4
- package/serialization/types/CreateBlock.d.ts +1 -1
- package/serialization/types/CreateBlock.js +1 -1
- package/serialization/types/{ToolCallFunctionOutput.d.ts → Function.d.ts} +4 -3
- package/{dist/serialization/types/FunctionCallOutput.js → serialization/types/Function.js} +5 -3
- package/{dist/serialization/types/FunctionSchema.d.ts → serialization/types/FunctionDefinition.d.ts} +4 -2
- package/{dist/serialization/types/FunctionSchema.js → serialization/types/FunctionDefinition.js} +6 -3
- package/serialization/types/FunctionTool.d.ts +15 -0
- package/{dist/serialization/types/CreateAssistantFileRequest.js → serialization/types/FunctionTool.js} +8 -4
- package/serialization/types/Job.d.ts +1 -1
- package/serialization/types/Job.js +1 -1
- package/serialization/types/LettaMessageUnion.d.ts +4 -22
- package/serialization/types/LettaMessageUnion.js +11 -16
- package/serialization/types/LettaUsageStatistics.d.ts +1 -0
- package/serialization/types/LettaUsageStatistics.js +1 -0
- package/{dist/serialization/types/LettaSchemasMessageMessage.d.ts → serialization/types/Message.d.ts} +4 -4
- package/{dist/serialization/types/LettaSchemasMessageMessage.js → serialization/types/Message.js} +4 -4
- package/serialization/types/Passage.d.ts +1 -1
- package/serialization/types/Passage.js +1 -1
- package/serialization/types/ReasoningMessage.d.ts +1 -0
- package/serialization/types/ReasoningMessage.js +1 -0
- package/serialization/types/Run.d.ts +1 -1
- package/serialization/types/Run.js +1 -1
- package/serialization/types/Source.d.ts +1 -1
- package/serialization/types/Source.js +1 -1
- package/serialization/types/{UserMessageOutput.d.ts → SystemMessage.d.ts} +3 -2
- package/serialization/types/{UserMessageOutput.js → SystemMessage.js} +3 -2
- package/serialization/types/{LettaSchemasToolTool.d.ts → Tool.d.ts} +2 -2
- package/serialization/types/{LettaSchemasToolTool.js → Tool.js} +2 -2
- package/{dist/serialization/types/ToolCallFunctionOutput.d.ts → serialization/types/ToolCall.d.ts} +3 -2
- package/{dist/serialization/types/LettaSchemasLettaMessageToolCall.js → serialization/types/ToolCall.js} +2 -2
- package/serialization/types/ToolCallMessage.d.ts +1 -0
- package/serialization/types/ToolCallMessage.js +1 -0
- package/serialization/types/ToolCallMessageToolCall.d.ts +2 -2
- package/serialization/types/ToolCallMessageToolCall.js +2 -2
- package/serialization/types/ToolReturnMessage.d.ts +1 -0
- package/serialization/types/ToolReturnMessage.js +1 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/{dist/serialization/types/SystemMessageOutput.d.ts → serialization/types/UserMessage.d.ts} +3 -2
- package/serialization/types/{SystemMessageOutput.js → UserMessage.js} +3 -2
- package/serialization/types/index.d.ts +10 -41
- package/serialization/types/index.js +10 -41
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
- package/api/resources/agents/resources/archivalMemory/client/requests/index.js +0 -2
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -8
- package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +0 -15
- package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +0 -15
- package/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +0 -15
- package/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +0 -15
- package/api/types/AssistantFile.d.ts +0 -12
- package/api/types/AssistantMessageInput.d.ts +0 -10
- package/api/types/ChatCompletionRequest.d.ts +0 -29
- package/api/types/ChatCompletionRequestFunctionCall.d.ts +0 -5
- package/api/types/ChatCompletionRequestMessagesItem.d.ts +0 -5
- package/api/types/ChatCompletionRequestStop.d.ts +0 -4
- package/api/types/ChatCompletionRequestToolChoice.d.ts +0 -5
- package/api/types/ChatCompletionResponse.d.ts +0 -16
- package/api/types/Choice.d.ts +0 -11
- package/api/types/CreateAssistantFileRequest.d.ts +0 -7
- package/api/types/CreateAssistantRequest.d.ts +0 -21
- package/api/types/DeleteAssistantFileResponse.d.ts +0 -10
- package/api/types/DeleteAssistantResponse.d.ts +0 -10
- package/api/types/FunctionCallInput.d.ts +0 -6
- package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -8
- package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -9
- package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -10
- package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -9
- package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -5
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -9
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -5
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -11
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -5
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -11
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -5
- package/api/types/LettaSchemasToolTool.js +0 -5
- package/api/types/LogProbToken.d.ts +0 -8
- package/api/types/LogProbToken.js +0 -5
- package/api/types/MessageContentLogProb.d.ts +0 -10
- package/api/types/MessageContentLogProb.js +0 -5
- package/api/types/OpenAiAssistant.d.ts +0 -27
- package/api/types/OpenAiAssistant.js +0 -5
- package/api/types/ResponseFormat.d.ts +0 -6
- package/api/types/ResponseFormat.js +0 -5
- package/api/types/SystemMessageInput.d.ts +0 -8
- package/api/types/SystemMessageInput.js +0 -5
- package/api/types/SystemMessageOutput.js +0 -5
- package/api/types/ToolCallFunctionOutput.d.ts +0 -9
- package/api/types/ToolCallFunctionOutput.js +0 -5
- package/api/types/ToolFunctionChoice.d.ts +0 -8
- package/api/types/ToolFunctionChoice.js +0 -5
- package/api/types/ToolInput.d.ts +0 -8
- package/api/types/ToolInput.js +0 -5
- package/api/types/ToolMessage.d.ts +0 -8
- package/api/types/ToolMessage.js +0 -5
- package/api/types/UserMessageInput.d.ts +0 -9
- package/api/types/UserMessageInput.js +0 -5
- package/api/types/UserMessageInputContent.d.ts +0 -4
- package/api/types/UserMessageInputContent.js +0 -5
- package/api/types/UserMessageOutput.js +0 -5
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +0 -5
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +0 -2
- package/dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +0 -5
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +0 -5
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +0 -5
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js +0 -5
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +0 -5
- package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +0 -15
- package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +0 -5
- package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +0 -15
- package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +0 -5
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +0 -5
- package/dist/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +0 -15
- package/dist/api/resources/sources/client/requests/SourcesAttachRequest.js +0 -5
- package/dist/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +0 -15
- package/dist/api/resources/sources/client/requests/SourcesDetachRequest.js +0 -5
- package/dist/api/types/AssistantFile.d.ts +0 -12
- package/dist/api/types/AssistantFile.js +0 -5
- package/dist/api/types/AssistantMessageInput.d.ts +0 -10
- package/dist/api/types/AssistantMessageInput.js +0 -5
- package/dist/api/types/AssistantMessageOutput.js +0 -5
- package/dist/api/types/ChatCompletionRequest.d.ts +0 -29
- package/dist/api/types/ChatCompletionRequest.js +0 -5
- package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +0 -5
- package/dist/api/types/ChatCompletionRequestFunctionCall.js +0 -5
- package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +0 -5
- package/dist/api/types/ChatCompletionRequestMessagesItem.js +0 -5
- package/dist/api/types/ChatCompletionRequestStop.d.ts +0 -4
- package/dist/api/types/ChatCompletionRequestStop.js +0 -5
- package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +0 -5
- package/dist/api/types/ChatCompletionRequestToolChoice.js +0 -5
- package/dist/api/types/ChatCompletionResponse.d.ts +0 -16
- package/dist/api/types/ChatCompletionResponse.js +0 -5
- package/dist/api/types/Choice.d.ts +0 -11
- package/dist/api/types/Choice.js +0 -5
- package/dist/api/types/CreateAssistantFileRequest.d.ts +0 -7
- package/dist/api/types/CreateAssistantFileRequest.js +0 -5
- package/dist/api/types/CreateAssistantRequest.d.ts +0 -21
- package/dist/api/types/CreateAssistantRequest.js +0 -5
- package/dist/api/types/DeleteAssistantFileResponse.d.ts +0 -10
- package/dist/api/types/DeleteAssistantFileResponse.js +0 -5
- package/dist/api/types/DeleteAssistantResponse.d.ts +0 -10
- package/dist/api/types/DeleteAssistantResponse.js +0 -5
- package/dist/api/types/FunctionCallInput.d.ts +0 -6
- package/dist/api/types/FunctionCallInput.js +0 -5
- package/dist/api/types/FunctionCallOutput.d.ts +0 -7
- package/dist/api/types/FunctionCallOutput.js +0 -5
- package/dist/api/types/FunctionSchema.js +0 -5
- package/dist/api/types/LettaSchemasLettaMessageToolCall.js +0 -5
- package/dist/api/types/LettaSchemasMessageMessage.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -8
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -9
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -7
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -10
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -9
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -9
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -11
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -5
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -11
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -5
- package/dist/api/types/LettaSchemasToolTool.js +0 -5
- package/dist/api/types/LogProbToken.d.ts +0 -8
- package/dist/api/types/LogProbToken.js +0 -5
- package/dist/api/types/MessageContentLogProb.d.ts +0 -10
- package/dist/api/types/MessageContentLogProb.js +0 -5
- package/dist/api/types/OpenAiAssistant.d.ts +0 -27
- package/dist/api/types/OpenAiAssistant.js +0 -5
- package/dist/api/types/ResponseFormat.d.ts +0 -6
- package/dist/api/types/ResponseFormat.js +0 -5
- package/dist/api/types/SystemMessageInput.d.ts +0 -8
- package/dist/api/types/SystemMessageInput.js +0 -5
- package/dist/api/types/SystemMessageOutput.js +0 -5
- package/dist/api/types/ToolCallFunctionOutput.d.ts +0 -9
- package/dist/api/types/ToolCallFunctionOutput.js +0 -5
- package/dist/api/types/ToolFunctionChoice.d.ts +0 -8
- package/dist/api/types/ToolFunctionChoice.js +0 -5
- package/dist/api/types/ToolInput.d.ts +0 -8
- package/dist/api/types/ToolInput.js +0 -5
- package/dist/api/types/ToolMessage.d.ts +0 -8
- package/dist/api/types/ToolMessage.js +0 -5
- package/dist/api/types/UserMessageInput.d.ts +0 -9
- package/dist/api/types/UserMessageInput.js +0 -5
- package/dist/api/types/UserMessageInputContent.d.ts +0 -4
- package/dist/api/types/UserMessageInputContent.js +0 -5
- package/dist/api/types/UserMessageOutput.js +0 -5
- package/dist/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +0 -3
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +0 -42
- package/dist/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +0 -12
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +0 -5
- package/dist/serialization/resources/agents/resources/archivalMemory/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/archivalMemory/index.js +0 -17
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +0 -37
- package/dist/serialization/resources/agents/resources/coreMemory/client/list.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/coreMemory/index.js +0 -17
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +0 -14
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -15
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +0 -12
- package/dist/serialization/types/AssistantFile.d.ts +0 -15
- package/dist/serialization/types/AssistantFile.js +0 -46
- package/dist/serialization/types/AssistantMessageInput.d.ts +0 -16
- package/dist/serialization/types/AssistantMessageInput.js +0 -47
- package/dist/serialization/types/ChatCompletionRequest.d.ts +0 -38
- package/dist/serialization/types/ChatCompletionRequest.js +0 -69
- package/dist/serialization/types/ChatCompletionRequestFunctionCall.d.ts +0 -11
- package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +0 -46
- package/dist/serialization/types/ChatCompletionRequestMessagesItem.d.ts +0 -14
- package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +0 -45
- package/dist/serialization/types/ChatCompletionRequestStop.d.ts +0 -10
- package/dist/serialization/types/ChatCompletionRequestToolChoice.d.ts +0 -11
- package/dist/serialization/types/ChatCompletionRequestToolChoice.js +0 -47
- package/dist/serialization/types/ChatCompletionResponse.d.ts +0 -20
- package/dist/serialization/types/ChatCompletionResponse.js +0 -51
- package/dist/serialization/types/Choice.d.ts +0 -18
- package/dist/serialization/types/Choice.js +0 -51
- package/dist/serialization/types/CreateAssistantFileRequest.d.ts +0 -12
- package/dist/serialization/types/CreateAssistantRequest.d.ts +0 -19
- package/dist/serialization/types/CreateAssistantRequest.js +0 -50
- package/dist/serialization/types/DeleteAssistantFileResponse.d.ts +0 -14
- package/dist/serialization/types/DeleteAssistantResponse.d.ts +0 -14
- package/dist/serialization/types/FunctionCallInput.d.ts +0 -12
- package/dist/serialization/types/FunctionCallInput.js +0 -43
- package/dist/serialization/types/LettaSchemasLettaMessageToolCall.d.ts +0 -14
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -14
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -45
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -15
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -46
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -13
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -44
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -17
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -48
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -15
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -46
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -13
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -44
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -15
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -46
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -15
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -46
- package/dist/serialization/types/LogProbToken.d.ts +0 -14
- package/dist/serialization/types/LogProbToken.js +0 -45
- package/dist/serialization/types/MessageContentLogProb.d.ts +0 -16
- package/dist/serialization/types/MessageContentLogProb.js +0 -47
- package/dist/serialization/types/OpenAiAssistant.d.ts +0 -21
- package/dist/serialization/types/OpenAiAssistant.js +0 -52
- package/dist/serialization/types/ResponseFormat.d.ts +0 -12
- package/dist/serialization/types/ResponseFormat.js +0 -43
- package/dist/serialization/types/SystemMessageInput.d.ts +0 -14
- package/dist/serialization/types/SystemMessageInput.js +0 -45
- package/dist/serialization/types/ToolCallFunctionOutput.js +0 -44
- package/dist/serialization/types/ToolFunctionChoice.d.ts +0 -14
- package/dist/serialization/types/ToolFunctionChoice.js +0 -45
- package/dist/serialization/types/ToolInput.d.ts +0 -14
- package/dist/serialization/types/ToolInput.js +0 -45
- package/dist/serialization/types/ToolMessage.d.ts +0 -14
- package/dist/serialization/types/ToolMessage.js +0 -45
- package/dist/serialization/types/UserMessageInput.d.ts +0 -15
- package/dist/serialization/types/UserMessageInput.js +0 -46
- package/dist/serialization/types/UserMessageInputContent.d.ts +0 -10
- package/dist/serialization/types/UserMessageInputContent.js +0 -44
- package/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +0 -11
- package/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +0 -3
- package/serialization/resources/agents/resources/archivalMemory/client/index.js +0 -42
- package/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +0 -11
- package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +0 -12
- package/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -1
- package/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +0 -5
- package/serialization/resources/agents/resources/archivalMemory/index.d.ts +0 -1
- package/serialization/resources/agents/resources/archivalMemory/index.js +0 -17
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
- package/serialization/resources/agents/resources/coreMemory/client/index.js +0 -37
- package/serialization/resources/agents/resources/coreMemory/client/list.d.ts +0 -11
- package/serialization/resources/agents/resources/coreMemory/index.d.ts +0 -1
- package/serialization/resources/agents/resources/coreMemory/index.js +0 -17
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +0 -14
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -15
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +0 -46
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +0 -41
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +0 -12
- package/serialization/types/AssistantFile.d.ts +0 -15
- package/serialization/types/AssistantFile.js +0 -46
- package/serialization/types/AssistantMessageInput.d.ts +0 -16
- package/serialization/types/AssistantMessageInput.js +0 -47
- package/serialization/types/ChatCompletionRequest.d.ts +0 -38
- package/serialization/types/ChatCompletionRequest.js +0 -69
- package/serialization/types/ChatCompletionRequestFunctionCall.d.ts +0 -11
- package/serialization/types/ChatCompletionRequestFunctionCall.js +0 -46
- package/serialization/types/ChatCompletionRequestMessagesItem.d.ts +0 -14
- package/serialization/types/ChatCompletionRequestMessagesItem.js +0 -45
- package/serialization/types/ChatCompletionRequestStop.d.ts +0 -10
- package/serialization/types/ChatCompletionRequestStop.js +0 -44
- package/serialization/types/ChatCompletionRequestToolChoice.d.ts +0 -11
- package/serialization/types/ChatCompletionRequestToolChoice.js +0 -47
- package/serialization/types/ChatCompletionResponse.d.ts +0 -20
- package/serialization/types/ChatCompletionResponse.js +0 -51
- package/serialization/types/Choice.d.ts +0 -18
- package/serialization/types/Choice.js +0 -51
- package/serialization/types/CreateAssistantFileRequest.d.ts +0 -12
- package/serialization/types/CreateAssistantFileRequest.js +0 -43
- package/serialization/types/CreateAssistantRequest.d.ts +0 -19
- package/serialization/types/CreateAssistantRequest.js +0 -50
- package/serialization/types/DeleteAssistantFileResponse.d.ts +0 -14
- package/serialization/types/DeleteAssistantFileResponse.js +0 -45
- package/serialization/types/DeleteAssistantResponse.d.ts +0 -14
- package/serialization/types/DeleteAssistantResponse.js +0 -45
- package/serialization/types/FunctionCallInput.d.ts +0 -12
- package/serialization/types/FunctionCallInput.js +0 -43
- package/serialization/types/LettaSchemasLettaMessageToolCall.d.ts +0 -14
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -14
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -45
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -15
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -46
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -13
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -44
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -17
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -48
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -15
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -46
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -13
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -44
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -15
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -46
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -15
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -46
- package/serialization/types/LogProbToken.d.ts +0 -14
- package/serialization/types/LogProbToken.js +0 -45
- package/serialization/types/MessageContentLogProb.d.ts +0 -16
- package/serialization/types/MessageContentLogProb.js +0 -47
- package/serialization/types/OpenAiAssistant.d.ts +0 -21
- package/serialization/types/OpenAiAssistant.js +0 -52
- package/serialization/types/ResponseFormat.d.ts +0 -12
- package/serialization/types/ResponseFormat.js +0 -43
- package/serialization/types/SystemMessageInput.d.ts +0 -14
- package/serialization/types/SystemMessageInput.js +0 -45
- package/serialization/types/ToolCallFunctionOutput.js +0 -44
- package/serialization/types/ToolFunctionChoice.d.ts +0 -14
- package/serialization/types/ToolFunctionChoice.js +0 -45
- package/serialization/types/ToolInput.d.ts +0 -14
- package/serialization/types/ToolInput.js +0 -45
- package/serialization/types/ToolMessage.d.ts +0 -14
- package/serialization/types/ToolMessage.js +0 -45
- package/serialization/types/UserMessageInput.d.ts +0 -15
- package/serialization/types/UserMessageInput.js +0 -46
- package/serialization/types/UserMessageInputContent.d.ts +0 -10
- package/serialization/types/UserMessageInputContent.js +0 -44
- /package/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.d.ts +0 -0
- /package/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.js +0 -0
- /package/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js → client/requests/ListArchivalMemoryRequest.js} +0 -0
- /package/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.js → MemoryVariablesListResponse.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemDirection.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemOne.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchRequestSearchItemTags.js → AgentsSearchRequestSearchItemTwo.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchRequestSearchItemVersion.js → AgentsSearchRequestSearchItemZero.js} +0 -0
- /package/api/resources/{blocks/client/requests/LinkAgentMemoryBlockRequest.js → runs/client/requests/ListRunMessagesRequest.js} +0 -0
- /package/api/{resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js → types/AssistantMessage.js} +0 -0
- /package/api/{resources/runs/client/requests/GetRunMessagesRequest.js → types/ChatCompletionMessageToolCall.js} +0 -0
- /package/api/{resources/sources/client/requests/SourcesAttachRequest.js → types/Function.js} +0 -0
- /package/api/{resources/sources/client/requests/SourcesDetachRequest.js → types/FunctionDefinition.js} +0 -0
- /package/api/types/{AssistantFile.js → FunctionTool.js} +0 -0
- /package/api/types/{AssistantMessageInput.js → Message.js} +0 -0
- /package/api/types/{AssistantMessageOutput.js → SystemMessage.js} +0 -0
- /package/api/types/{ChatCompletionRequest.js → Tool.js} +0 -0
- /package/api/types/{ChatCompletionRequestFunctionCall.js → ToolCall.js} +0 -0
- /package/api/types/{ChatCompletionRequestMessagesItem.js → UserMessage.js} +0 -0
- /package/dist/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.d.ts +0 -0
- /package/dist/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.js +0 -0
- /package/{api/types/ChatCompletionRequestStop.js → dist/api/resources/agents/client/requests/ListArchivalMemoryRequest.js} +0 -0
- /package/{api/types/ChatCompletionRequestToolChoice.js → dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +0 -0
- /package/{api/types/ChatCompletionResponse.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.js} +0 -0
- /package/{api/types/Choice.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOne.js} +0 -0
- /package/{api/types/CreateAssistantFileRequest.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +0 -0
- /package/{api/types/CreateAssistantRequest.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +0 -0
- /package/{api/types/DeleteAssistantFileResponse.js → dist/api/resources/runs/client/requests/ListRunMessagesRequest.js} +0 -0
- /package/{api/types/DeleteAssistantResponse.js → dist/api/types/AssistantMessage.js} +0 -0
- /package/{api/types/FunctionCallInput.js → dist/api/types/ChatCompletionMessageToolCall.js} +0 -0
- /package/{api/types/FunctionCallOutput.js → dist/api/types/Function.js} +0 -0
- /package/{api/types/FunctionSchema.js → dist/api/types/FunctionDefinition.js} +0 -0
- /package/{api/types/LettaSchemasLettaMessageToolCall.js → dist/api/types/FunctionTool.js} +0 -0
- /package/{api/types/LettaSchemasMessageMessage.js → dist/api/types/Message.js} +0 -0
- /package/{api/types/LettaSchemasOpenaiChatCompletionRequestTool.js → dist/api/types/SystemMessage.js} +0 -0
- /package/{api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js → dist/api/types/Tool.js} +0 -0
- /package/{api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js → dist/api/types/ToolCall.js} +0 -0
- /package/{api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js → dist/api/types/UserMessage.js} +0 -0
- /package/dist/serialization/resources/agents/resources/sources/client/{get.js → list.js} +0 -0
- /package/dist/serialization/resources/runs/client/{getRunMessages.js → listRunMessages.js} +0 -0
- /package/serialization/resources/agents/resources/sources/client/{get.js → list.js} +0 -0
- /package/serialization/resources/runs/client/{getRunMessages.js → listRunMessages.js} +0 -0
|
@@ -58,11 +58,11 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
58
58
|
const Client_1 = require("../resources/context/client/Client");
|
|
59
59
|
const Client_2 = require("../resources/tools/client/Client");
|
|
60
60
|
const Client_3 = require("../resources/sources/client/Client");
|
|
61
|
-
const Client_4 = require("../resources/
|
|
62
|
-
const Client_5 = require("../resources/
|
|
63
|
-
const Client_6 = require("../resources/
|
|
64
|
-
const Client_7 = require("../resources/
|
|
65
|
-
const Client_8 = require("../resources/
|
|
61
|
+
const Client_4 = require("../resources/messages/client/Client");
|
|
62
|
+
const Client_5 = require("../resources/templates/client/Client");
|
|
63
|
+
const Client_6 = require("../resources/memoryVariables/client/Client");
|
|
64
|
+
const Client_7 = require("../resources/coreMemory/client/Client");
|
|
65
|
+
const Client_8 = require("../resources/archivalMemory/client/Client");
|
|
66
66
|
class Agents {
|
|
67
67
|
constructor(_options = {}) {
|
|
68
68
|
this._options = _options;
|
|
@@ -79,25 +79,25 @@ class Agents {
|
|
|
79
79
|
var _a;
|
|
80
80
|
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_3.Sources(this._options)));
|
|
81
81
|
}
|
|
82
|
-
get
|
|
82
|
+
get messages() {
|
|
83
83
|
var _a;
|
|
84
|
-
return ((_a = this.
|
|
84
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_4.Messages(this._options)));
|
|
85
85
|
}
|
|
86
|
-
get
|
|
86
|
+
get templates() {
|
|
87
87
|
var _a;
|
|
88
|
-
return ((_a = this.
|
|
88
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_5.Templates(this._options)));
|
|
89
89
|
}
|
|
90
|
-
get
|
|
90
|
+
get memoryVariables() {
|
|
91
91
|
var _a;
|
|
92
|
-
return ((_a = this.
|
|
92
|
+
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_6.MemoryVariables(this._options)));
|
|
93
93
|
}
|
|
94
|
-
get
|
|
94
|
+
get coreMemory() {
|
|
95
95
|
var _a;
|
|
96
|
-
return ((_a = this.
|
|
96
|
+
return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_7.CoreMemory(this._options)));
|
|
97
97
|
}
|
|
98
|
-
get
|
|
98
|
+
get archivalMemory() {
|
|
99
99
|
var _a;
|
|
100
|
-
return ((_a = this.
|
|
100
|
+
return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_8.ArchivalMemory(this._options)));
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* List all agents associated with a given user.
|
|
@@ -142,7 +142,7 @@ class Agents {
|
|
|
142
142
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
143
143
|
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/"),
|
|
144
144
|
method: "GET",
|
|
145
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
145
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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
146
|
contentType: "application/json",
|
|
147
147
|
queryParameters: _queryParams,
|
|
148
148
|
requestType: "json",
|
|
@@ -208,7 +208,7 @@ class Agents {
|
|
|
208
208
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
209
209
|
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/"),
|
|
210
210
|
method: "POST",
|
|
211
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
211
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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
212
|
contentType: "application/json",
|
|
213
213
|
requestType: "json",
|
|
214
214
|
body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -266,15 +266,15 @@ class Agents {
|
|
|
266
266
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
267
267
|
*
|
|
268
268
|
* @example
|
|
269
|
-
* await client.agents.
|
|
269
|
+
* await client.agents.retrieve("agent_id")
|
|
270
270
|
*/
|
|
271
|
-
|
|
271
|
+
retrieve(agentId, requestOptions) {
|
|
272
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
273
|
var _a, _b, _c;
|
|
274
274
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
275
275
|
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)}`),
|
|
276
276
|
method: "GET",
|
|
277
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
277
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
278
278
|
contentType: "application/json",
|
|
279
279
|
requestType: "json",
|
|
280
280
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -339,7 +339,7 @@ class Agents {
|
|
|
339
339
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
340
340
|
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)}`),
|
|
341
341
|
method: "DELETE",
|
|
342
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
342
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
343
343
|
contentType: "application/json",
|
|
344
344
|
requestType: "json",
|
|
345
345
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -391,15 +391,15 @@ class Agents {
|
|
|
391
391
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
392
392
|
*
|
|
393
393
|
* @example
|
|
394
|
-
* await client.agents.
|
|
394
|
+
* await client.agents.modify("agent_id")
|
|
395
395
|
*/
|
|
396
|
-
|
|
396
|
+
modify(agentId_1) {
|
|
397
397
|
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
398
398
|
var _a, _b, _c;
|
|
399
399
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
400
400
|
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)}`),
|
|
401
401
|
method: "PATCH",
|
|
402
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
402
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
403
403
|
contentType: "application/json",
|
|
404
404
|
requestType: "json",
|
|
405
405
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -448,6 +448,610 @@ class Agents {
|
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Retrieve the memory state of a specific agent.
|
|
453
|
+
* This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
|
|
454
|
+
*
|
|
455
|
+
* @param {string} agentId
|
|
456
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
457
|
+
*
|
|
458
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* await client.agents.retrieveAgentMemory("agent_id")
|
|
462
|
+
*/
|
|
463
|
+
retrieveAgentMemory(agentId, requestOptions) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
var _a, _b, _c;
|
|
466
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
467
|
+
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`),
|
|
468
|
+
method: "GET",
|
|
469
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
470
|
+
contentType: "application/json",
|
|
471
|
+
requestType: "json",
|
|
472
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
473
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
474
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
475
|
+
});
|
|
476
|
+
if (_response.ok) {
|
|
477
|
+
return serializers.Memory.parseOrThrow(_response.body, {
|
|
478
|
+
unrecognizedObjectKeys: "passthrough",
|
|
479
|
+
allowUnrecognizedUnionMembers: true,
|
|
480
|
+
allowUnrecognizedEnumValues: true,
|
|
481
|
+
skipValidation: true,
|
|
482
|
+
breadcrumbsPrefix: ["response"],
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
if (_response.error.reason === "status-code") {
|
|
486
|
+
switch (_response.error.statusCode) {
|
|
487
|
+
case 422:
|
|
488
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
489
|
+
unrecognizedObjectKeys: "passthrough",
|
|
490
|
+
allowUnrecognizedUnionMembers: true,
|
|
491
|
+
allowUnrecognizedEnumValues: true,
|
|
492
|
+
skipValidation: true,
|
|
493
|
+
breadcrumbsPrefix: ["response"],
|
|
494
|
+
}));
|
|
495
|
+
default:
|
|
496
|
+
throw new errors.LettaError({
|
|
497
|
+
statusCode: _response.error.statusCode,
|
|
498
|
+
body: _response.error.body,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
switch (_response.error.reason) {
|
|
503
|
+
case "non-json":
|
|
504
|
+
throw new errors.LettaError({
|
|
505
|
+
statusCode: _response.error.statusCode,
|
|
506
|
+
body: _response.error.rawBody,
|
|
507
|
+
});
|
|
508
|
+
case "timeout":
|
|
509
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory.");
|
|
510
|
+
case "unknown":
|
|
511
|
+
throw new errors.LettaError({
|
|
512
|
+
message: _response.error.errorMessage,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Retrieve a memory block from an agent.
|
|
519
|
+
*
|
|
520
|
+
* @param {string} agentId
|
|
521
|
+
* @param {string} blockLabel
|
|
522
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
523
|
+
*
|
|
524
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
* await client.agents.retrieveCoreMemoryBlock("agent_id", "block_label")
|
|
528
|
+
*/
|
|
529
|
+
retrieveCoreMemoryBlock(agentId, blockLabel, requestOptions) {
|
|
530
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
531
|
+
var _a, _b, _c;
|
|
532
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
533
|
+
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/blocks/${encodeURIComponent(blockLabel)}`),
|
|
534
|
+
method: "GET",
|
|
535
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
536
|
+
contentType: "application/json",
|
|
537
|
+
requestType: "json",
|
|
538
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
539
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
540
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
541
|
+
});
|
|
542
|
+
if (_response.ok) {
|
|
543
|
+
return serializers.Block.parseOrThrow(_response.body, {
|
|
544
|
+
unrecognizedObjectKeys: "passthrough",
|
|
545
|
+
allowUnrecognizedUnionMembers: true,
|
|
546
|
+
allowUnrecognizedEnumValues: true,
|
|
547
|
+
skipValidation: true,
|
|
548
|
+
breadcrumbsPrefix: ["response"],
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
if (_response.error.reason === "status-code") {
|
|
552
|
+
switch (_response.error.statusCode) {
|
|
553
|
+
case 422:
|
|
554
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
555
|
+
unrecognizedObjectKeys: "passthrough",
|
|
556
|
+
allowUnrecognizedUnionMembers: true,
|
|
557
|
+
allowUnrecognizedEnumValues: true,
|
|
558
|
+
skipValidation: true,
|
|
559
|
+
breadcrumbsPrefix: ["response"],
|
|
560
|
+
}));
|
|
561
|
+
default:
|
|
562
|
+
throw new errors.LettaError({
|
|
563
|
+
statusCode: _response.error.statusCode,
|
|
564
|
+
body: _response.error.body,
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
switch (_response.error.reason) {
|
|
569
|
+
case "non-json":
|
|
570
|
+
throw new errors.LettaError({
|
|
571
|
+
statusCode: _response.error.statusCode,
|
|
572
|
+
body: _response.error.rawBody,
|
|
573
|
+
});
|
|
574
|
+
case "timeout":
|
|
575
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory/blocks/{block_label}.");
|
|
576
|
+
case "unknown":
|
|
577
|
+
throw new errors.LettaError({
|
|
578
|
+
message: _response.error.errorMessage,
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Updates a memory block of an agent.
|
|
585
|
+
*
|
|
586
|
+
* @param {string} agentId
|
|
587
|
+
* @param {string} blockLabel
|
|
588
|
+
* @param {Letta.BlockUpdate} request
|
|
589
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
590
|
+
*
|
|
591
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* await client.agents.modifyCoreMemoryBlock("agent_id", "block_label", {})
|
|
595
|
+
*/
|
|
596
|
+
modifyCoreMemoryBlock(agentId, blockLabel, request, requestOptions) {
|
|
597
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
598
|
+
var _a, _b, _c;
|
|
599
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
600
|
+
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/blocks/${encodeURIComponent(blockLabel)}`),
|
|
601
|
+
method: "PATCH",
|
|
602
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
603
|
+
contentType: "application/json",
|
|
604
|
+
requestType: "json",
|
|
605
|
+
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
606
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
607
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
608
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
609
|
+
});
|
|
610
|
+
if (_response.ok) {
|
|
611
|
+
return serializers.Block.parseOrThrow(_response.body, {
|
|
612
|
+
unrecognizedObjectKeys: "passthrough",
|
|
613
|
+
allowUnrecognizedUnionMembers: true,
|
|
614
|
+
allowUnrecognizedEnumValues: true,
|
|
615
|
+
skipValidation: true,
|
|
616
|
+
breadcrumbsPrefix: ["response"],
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
if (_response.error.reason === "status-code") {
|
|
620
|
+
switch (_response.error.statusCode) {
|
|
621
|
+
case 422:
|
|
622
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
623
|
+
unrecognizedObjectKeys: "passthrough",
|
|
624
|
+
allowUnrecognizedUnionMembers: true,
|
|
625
|
+
allowUnrecognizedEnumValues: true,
|
|
626
|
+
skipValidation: true,
|
|
627
|
+
breadcrumbsPrefix: ["response"],
|
|
628
|
+
}));
|
|
629
|
+
default:
|
|
630
|
+
throw new errors.LettaError({
|
|
631
|
+
statusCode: _response.error.statusCode,
|
|
632
|
+
body: _response.error.body,
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
switch (_response.error.reason) {
|
|
637
|
+
case "non-json":
|
|
638
|
+
throw new errors.LettaError({
|
|
639
|
+
statusCode: _response.error.statusCode,
|
|
640
|
+
body: _response.error.rawBody,
|
|
641
|
+
});
|
|
642
|
+
case "timeout":
|
|
643
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/{block_label}.");
|
|
644
|
+
case "unknown":
|
|
645
|
+
throw new errors.LettaError({
|
|
646
|
+
message: _response.error.errorMessage,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Retrieve the memory blocks of a specific agent.
|
|
653
|
+
*
|
|
654
|
+
* @param {string} agentId
|
|
655
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
656
|
+
*
|
|
657
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* await client.agents.listCoreMemoryBlocks("agent_id")
|
|
661
|
+
*/
|
|
662
|
+
listCoreMemoryBlocks(agentId, requestOptions) {
|
|
663
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
664
|
+
var _a, _b, _c;
|
|
665
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
666
|
+
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/blocks`),
|
|
667
|
+
method: "GET",
|
|
668
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
669
|
+
contentType: "application/json",
|
|
670
|
+
requestType: "json",
|
|
671
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
672
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
673
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
674
|
+
});
|
|
675
|
+
if (_response.ok) {
|
|
676
|
+
return serializers.agents.listCoreMemoryBlocks.Response.parseOrThrow(_response.body, {
|
|
677
|
+
unrecognizedObjectKeys: "passthrough",
|
|
678
|
+
allowUnrecognizedUnionMembers: true,
|
|
679
|
+
allowUnrecognizedEnumValues: true,
|
|
680
|
+
skipValidation: true,
|
|
681
|
+
breadcrumbsPrefix: ["response"],
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
if (_response.error.reason === "status-code") {
|
|
685
|
+
switch (_response.error.statusCode) {
|
|
686
|
+
case 422:
|
|
687
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
688
|
+
unrecognizedObjectKeys: "passthrough",
|
|
689
|
+
allowUnrecognizedUnionMembers: true,
|
|
690
|
+
allowUnrecognizedEnumValues: true,
|
|
691
|
+
skipValidation: true,
|
|
692
|
+
breadcrumbsPrefix: ["response"],
|
|
693
|
+
}));
|
|
694
|
+
default:
|
|
695
|
+
throw new errors.LettaError({
|
|
696
|
+
statusCode: _response.error.statusCode,
|
|
697
|
+
body: _response.error.body,
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
switch (_response.error.reason) {
|
|
702
|
+
case "non-json":
|
|
703
|
+
throw new errors.LettaError({
|
|
704
|
+
statusCode: _response.error.statusCode,
|
|
705
|
+
body: _response.error.rawBody,
|
|
706
|
+
});
|
|
707
|
+
case "timeout":
|
|
708
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory/blocks.");
|
|
709
|
+
case "unknown":
|
|
710
|
+
throw new errors.LettaError({
|
|
711
|
+
message: _response.error.errorMessage,
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Attach a block to an agent.
|
|
718
|
+
*
|
|
719
|
+
* @param {string} agentId
|
|
720
|
+
* @param {string} blockId
|
|
721
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
722
|
+
*
|
|
723
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
724
|
+
*
|
|
725
|
+
* @example
|
|
726
|
+
* await client.agents.attachCoreMemoryBlock("agent_id", "block_id")
|
|
727
|
+
*/
|
|
728
|
+
attachCoreMemoryBlock(agentId, blockId, requestOptions) {
|
|
729
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
730
|
+
var _a, _b, _c;
|
|
731
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
732
|
+
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/blocks/attach/${encodeURIComponent(blockId)}`),
|
|
733
|
+
method: "PATCH",
|
|
734
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
735
|
+
contentType: "application/json",
|
|
736
|
+
requestType: "json",
|
|
737
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
738
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
739
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
740
|
+
});
|
|
741
|
+
if (_response.ok) {
|
|
742
|
+
return serializers.AgentState.parseOrThrow(_response.body, {
|
|
743
|
+
unrecognizedObjectKeys: "passthrough",
|
|
744
|
+
allowUnrecognizedUnionMembers: true,
|
|
745
|
+
allowUnrecognizedEnumValues: true,
|
|
746
|
+
skipValidation: true,
|
|
747
|
+
breadcrumbsPrefix: ["response"],
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
if (_response.error.reason === "status-code") {
|
|
751
|
+
switch (_response.error.statusCode) {
|
|
752
|
+
case 422:
|
|
753
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
754
|
+
unrecognizedObjectKeys: "passthrough",
|
|
755
|
+
allowUnrecognizedUnionMembers: true,
|
|
756
|
+
allowUnrecognizedEnumValues: true,
|
|
757
|
+
skipValidation: true,
|
|
758
|
+
breadcrumbsPrefix: ["response"],
|
|
759
|
+
}));
|
|
760
|
+
default:
|
|
761
|
+
throw new errors.LettaError({
|
|
762
|
+
statusCode: _response.error.statusCode,
|
|
763
|
+
body: _response.error.body,
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
switch (_response.error.reason) {
|
|
768
|
+
case "non-json":
|
|
769
|
+
throw new errors.LettaError({
|
|
770
|
+
statusCode: _response.error.statusCode,
|
|
771
|
+
body: _response.error.rawBody,
|
|
772
|
+
});
|
|
773
|
+
case "timeout":
|
|
774
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}.");
|
|
775
|
+
case "unknown":
|
|
776
|
+
throw new errors.LettaError({
|
|
777
|
+
message: _response.error.errorMessage,
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Detach a block from an agent.
|
|
784
|
+
*
|
|
785
|
+
* @param {string} agentId
|
|
786
|
+
* @param {string} blockId
|
|
787
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
788
|
+
*
|
|
789
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* await client.agents.detachCoreMemoryBlock("agent_id", "block_id")
|
|
793
|
+
*/
|
|
794
|
+
detachCoreMemoryBlock(agentId, blockId, requestOptions) {
|
|
795
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
796
|
+
var _a, _b, _c;
|
|
797
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
798
|
+
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/blocks/detach/${encodeURIComponent(blockId)}`),
|
|
799
|
+
method: "PATCH",
|
|
800
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
801
|
+
contentType: "application/json",
|
|
802
|
+
requestType: "json",
|
|
803
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
804
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
805
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
806
|
+
});
|
|
807
|
+
if (_response.ok) {
|
|
808
|
+
return serializers.AgentState.parseOrThrow(_response.body, {
|
|
809
|
+
unrecognizedObjectKeys: "passthrough",
|
|
810
|
+
allowUnrecognizedUnionMembers: true,
|
|
811
|
+
allowUnrecognizedEnumValues: true,
|
|
812
|
+
skipValidation: true,
|
|
813
|
+
breadcrumbsPrefix: ["response"],
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
if (_response.error.reason === "status-code") {
|
|
817
|
+
switch (_response.error.statusCode) {
|
|
818
|
+
case 422:
|
|
819
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
820
|
+
unrecognizedObjectKeys: "passthrough",
|
|
821
|
+
allowUnrecognizedUnionMembers: true,
|
|
822
|
+
allowUnrecognizedEnumValues: true,
|
|
823
|
+
skipValidation: true,
|
|
824
|
+
breadcrumbsPrefix: ["response"],
|
|
825
|
+
}));
|
|
826
|
+
default:
|
|
827
|
+
throw new errors.LettaError({
|
|
828
|
+
statusCode: _response.error.statusCode,
|
|
829
|
+
body: _response.error.body,
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
switch (_response.error.reason) {
|
|
834
|
+
case "non-json":
|
|
835
|
+
throw new errors.LettaError({
|
|
836
|
+
statusCode: _response.error.statusCode,
|
|
837
|
+
body: _response.error.rawBody,
|
|
838
|
+
});
|
|
839
|
+
case "timeout":
|
|
840
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}.");
|
|
841
|
+
case "unknown":
|
|
842
|
+
throw new errors.LettaError({
|
|
843
|
+
message: _response.error.errorMessage,
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Retrieve the memories in an agent's archival memory store (paginated query).
|
|
850
|
+
*
|
|
851
|
+
* @param {string} agentId
|
|
852
|
+
* @param {Letta.ListArchivalMemoryRequest} request
|
|
853
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
854
|
+
*
|
|
855
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
856
|
+
*
|
|
857
|
+
* @example
|
|
858
|
+
* await client.agents.listArchivalMemory("agent_id")
|
|
859
|
+
*/
|
|
860
|
+
listArchivalMemory(agentId_1) {
|
|
861
|
+
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
862
|
+
var _a, _b, _c;
|
|
863
|
+
const { after, before, limit } = request;
|
|
864
|
+
const _queryParams = {};
|
|
865
|
+
if (after != null) {
|
|
866
|
+
_queryParams["after"] = after.toString();
|
|
867
|
+
}
|
|
868
|
+
if (before != null) {
|
|
869
|
+
_queryParams["before"] = before.toString();
|
|
870
|
+
}
|
|
871
|
+
if (limit != null) {
|
|
872
|
+
_queryParams["limit"] = limit.toString();
|
|
873
|
+
}
|
|
874
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
875
|
+
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`),
|
|
876
|
+
method: "GET",
|
|
877
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
878
|
+
contentType: "application/json",
|
|
879
|
+
queryParameters: _queryParams,
|
|
880
|
+
requestType: "json",
|
|
881
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
882
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
883
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
884
|
+
});
|
|
885
|
+
if (_response.ok) {
|
|
886
|
+
return serializers.agents.listArchivalMemory.Response.parseOrThrow(_response.body, {
|
|
887
|
+
unrecognizedObjectKeys: "passthrough",
|
|
888
|
+
allowUnrecognizedUnionMembers: true,
|
|
889
|
+
allowUnrecognizedEnumValues: true,
|
|
890
|
+
skipValidation: true,
|
|
891
|
+
breadcrumbsPrefix: ["response"],
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
if (_response.error.reason === "status-code") {
|
|
895
|
+
switch (_response.error.statusCode) {
|
|
896
|
+
case 422:
|
|
897
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
898
|
+
unrecognizedObjectKeys: "passthrough",
|
|
899
|
+
allowUnrecognizedUnionMembers: true,
|
|
900
|
+
allowUnrecognizedEnumValues: true,
|
|
901
|
+
skipValidation: true,
|
|
902
|
+
breadcrumbsPrefix: ["response"],
|
|
903
|
+
}));
|
|
904
|
+
default:
|
|
905
|
+
throw new errors.LettaError({
|
|
906
|
+
statusCode: _response.error.statusCode,
|
|
907
|
+
body: _response.error.body,
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
switch (_response.error.reason) {
|
|
912
|
+
case "non-json":
|
|
913
|
+
throw new errors.LettaError({
|
|
914
|
+
statusCode: _response.error.statusCode,
|
|
915
|
+
body: _response.error.rawBody,
|
|
916
|
+
});
|
|
917
|
+
case "timeout":
|
|
918
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival-memory.");
|
|
919
|
+
case "unknown":
|
|
920
|
+
throw new errors.LettaError({
|
|
921
|
+
message: _response.error.errorMessage,
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Insert a memory into an agent's archival memory store.
|
|
928
|
+
*
|
|
929
|
+
* @param {string} agentId
|
|
930
|
+
* @param {Letta.CreateArchivalMemory} request
|
|
931
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
932
|
+
*
|
|
933
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
934
|
+
*
|
|
935
|
+
* @example
|
|
936
|
+
* await client.agents.createArchivalMemory("agent_id", {
|
|
937
|
+
* text: "text"
|
|
938
|
+
* })
|
|
939
|
+
*/
|
|
940
|
+
createArchivalMemory(agentId, request, requestOptions) {
|
|
941
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
942
|
+
var _a, _b, _c;
|
|
943
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
944
|
+
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`),
|
|
945
|
+
method: "POST",
|
|
946
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
947
|
+
contentType: "application/json",
|
|
948
|
+
requestType: "json",
|
|
949
|
+
body: serializers.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
950
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
951
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
952
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
953
|
+
});
|
|
954
|
+
if (_response.ok) {
|
|
955
|
+
return serializers.agents.createArchivalMemory.Response.parseOrThrow(_response.body, {
|
|
956
|
+
unrecognizedObjectKeys: "passthrough",
|
|
957
|
+
allowUnrecognizedUnionMembers: true,
|
|
958
|
+
allowUnrecognizedEnumValues: true,
|
|
959
|
+
skipValidation: true,
|
|
960
|
+
breadcrumbsPrefix: ["response"],
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
if (_response.error.reason === "status-code") {
|
|
964
|
+
switch (_response.error.statusCode) {
|
|
965
|
+
case 422:
|
|
966
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
967
|
+
unrecognizedObjectKeys: "passthrough",
|
|
968
|
+
allowUnrecognizedUnionMembers: true,
|
|
969
|
+
allowUnrecognizedEnumValues: true,
|
|
970
|
+
skipValidation: true,
|
|
971
|
+
breadcrumbsPrefix: ["response"],
|
|
972
|
+
}));
|
|
973
|
+
default:
|
|
974
|
+
throw new errors.LettaError({
|
|
975
|
+
statusCode: _response.error.statusCode,
|
|
976
|
+
body: _response.error.body,
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
switch (_response.error.reason) {
|
|
981
|
+
case "non-json":
|
|
982
|
+
throw new errors.LettaError({
|
|
983
|
+
statusCode: _response.error.statusCode,
|
|
984
|
+
body: _response.error.rawBody,
|
|
985
|
+
});
|
|
986
|
+
case "timeout":
|
|
987
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/archival-memory.");
|
|
988
|
+
case "unknown":
|
|
989
|
+
throw new errors.LettaError({
|
|
990
|
+
message: _response.error.errorMessage,
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Delete a memory from an agent's archival memory store.
|
|
997
|
+
*
|
|
998
|
+
* @param {string} agentId
|
|
999
|
+
* @param {string} memoryId
|
|
1000
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
1001
|
+
*
|
|
1002
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
1003
|
+
*
|
|
1004
|
+
* @example
|
|
1005
|
+
* await client.agents.deleteArchivalMemory("agent_id", "memory_id")
|
|
1006
|
+
*/
|
|
1007
|
+
deleteArchivalMemory(agentId, memoryId, requestOptions) {
|
|
1008
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1009
|
+
var _a, _b, _c;
|
|
1010
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1011
|
+
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)}`),
|
|
1012
|
+
method: "DELETE",
|
|
1013
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
1014
|
+
contentType: "application/json",
|
|
1015
|
+
requestType: "json",
|
|
1016
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1017
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1018
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1019
|
+
});
|
|
1020
|
+
if (_response.ok) {
|
|
1021
|
+
return _response.body;
|
|
1022
|
+
}
|
|
1023
|
+
if (_response.error.reason === "status-code") {
|
|
1024
|
+
switch (_response.error.statusCode) {
|
|
1025
|
+
case 422:
|
|
1026
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
1027
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1028
|
+
allowUnrecognizedUnionMembers: true,
|
|
1029
|
+
allowUnrecognizedEnumValues: true,
|
|
1030
|
+
skipValidation: true,
|
|
1031
|
+
breadcrumbsPrefix: ["response"],
|
|
1032
|
+
}));
|
|
1033
|
+
default:
|
|
1034
|
+
throw new errors.LettaError({
|
|
1035
|
+
statusCode: _response.error.statusCode,
|
|
1036
|
+
body: _response.error.body,
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
switch (_response.error.reason) {
|
|
1041
|
+
case "non-json":
|
|
1042
|
+
throw new errors.LettaError({
|
|
1043
|
+
statusCode: _response.error.statusCode,
|
|
1044
|
+
body: _response.error.rawBody,
|
|
1045
|
+
});
|
|
1046
|
+
case "timeout":
|
|
1047
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival-memory/{memory_id}.");
|
|
1048
|
+
case "unknown":
|
|
1049
|
+
throw new errors.LettaError({
|
|
1050
|
+
message: _response.error.errorMessage,
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
451
1055
|
/**
|
|
452
1056
|
* Resets the messages for an agent
|
|
453
1057
|
*
|
|
@@ -471,7 +1075,7 @@ class Agents {
|
|
|
471
1075
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
472
1076
|
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`),
|
|
473
1077
|
method: "PATCH",
|
|
474
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1078
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
475
1079
|
contentType: "application/json",
|
|
476
1080
|
queryParameters: _queryParams,
|
|
477
1081
|
requestType: "json",
|
|
@@ -537,7 +1141,7 @@ class Agents {
|
|
|
537
1141
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
538
1142
|
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/search"),
|
|
539
1143
|
method: "POST",
|
|
540
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1144
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
|
|
541
1145
|
contentType: "application/json",
|
|
542
1146
|
requestType: "json",
|
|
543
1147
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|