@letta-ai/letta-client 1.0.0-alpha.2 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -0
- package/Client.js +37 -32
- package/README.md +320 -88
- package/api/errors/GoneError.d.ts +8 -0
- package/api/errors/GoneError.js +52 -0
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +1 -0
- package/api/resources/agents/client/Client.d.ts +8 -11
- package/api/resources/agents/client/Client.js +19 -24
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/api/resources/agents/resources/blocks/client/Client.d.ts +12 -12
- package/api/resources/agents/resources/blocks/client/Client.js +17 -17
- 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 +2 -2
- package/api/resources/agents/resources/coreMemory/client/Client.js +3 -3
- package/api/resources/agents/resources/files/client/Client.d.ts +10 -10
- package/api/resources/agents/resources/files/client/Client.js +14 -14
- package/api/resources/agents/resources/folders/client/Client.d.ts +8 -8
- package/api/resources/agents/resources/folders/client/Client.js +11 -11
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -2
- package/api/resources/agents/resources/groups/client/Client.js +3 -3
- package/api/resources/agents/resources/index.d.ts +0 -3
- package/api/resources/agents/resources/index.js +1 -4
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.d.ts +17 -17
- package/api/resources/agents/resources/messages/client/Client.js +27 -27
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -8
- package/api/resources/agents/resources/passages/client/Client.js +13 -13
- package/api/resources/agents/resources/sources/client/Client.d.ts +8 -8
- package/api/resources/agents/resources/sources/client/Client.js +11 -11
- package/api/resources/agents/resources/tools/client/Client.d.ts +10 -10
- package/api/resources/agents/resources/tools/client/Client.js +14 -14
- package/api/resources/archives/client/Client.d.ts +2 -2
- package/api/resources/archives/client/Client.js +5 -5
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/batches/resources/messages/client/Client.js +1 -1
- package/api/resources/blocks/client/Client.d.ts +6 -6
- package/api/resources/blocks/client/Client.js +12 -12
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -2
- package/api/resources/blocks/resources/agents/client/Client.js +3 -3
- package/api/resources/chat/client/Client.d.ts +61 -0
- package/api/resources/chat/client/Client.js +158 -0
- package/api/resources/chat/client/requests/ChatCompletionRequest.d.ts +38 -0
- package/api/resources/chat/client/requests/index.d.ts +1 -0
- package/api/resources/chat/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
- package/api/resources/chat/types/ChatCompletionRequestStop.d.ts +7 -0
- package/api/resources/chat/types/index.d.ts +2 -0
- package/api/resources/{agents/resources/templates → chat}/types/index.js +2 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/api/resources/folders/client/Client.js +8 -8
- package/api/resources/folders/resources/agents/client/Client.js +1 -1
- package/api/resources/folders/resources/files/client/Client.js +3 -3
- package/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/api/resources/groups/client/Client.d.ts +6 -6
- package/api/resources/groups/client/Client.js +12 -12
- package/api/resources/groups/resources/messages/client/Client.d.ts +9 -9
- package/api/resources/groups/resources/messages/client/Client.js +14 -14
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.d.ts +6 -6
- package/api/resources/identities/client/Client.js +13 -13
- package/api/resources/identities/resources/agents/client/Client.d.ts +2 -2
- package/api/resources/identities/resources/agents/client/Client.js +3 -3
- package/api/resources/identities/resources/blocks/client/Client.d.ts +2 -2
- package/api/resources/identities/resources/blocks/client/Client.js +3 -3
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -2
- package/api/resources/identities/resources/properties/client/Client.js +3 -3
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/jobs/client/Client.d.ts +6 -6
- package/api/resources/jobs/client/Client.js +11 -11
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/models/resources/embeddings/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.d.ts +8 -8
- package/api/resources/providers/client/Client.js +15 -15
- package/api/resources/runs/client/Client.js +6 -6
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.d.ts +11 -11
- package/api/resources/sources/client/Client.js +21 -21
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -6
- package/api/resources/sources/resources/files/client/Client.js +9 -9
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -2
- package/api/resources/sources/resources/passages/client/Client.js +3 -3
- package/api/resources/steps/client/Client.d.ts +2 -2
- package/api/resources/steps/client/Client.js +4 -4
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -2
- package/api/resources/steps/resources/feedback/client/Client.js +3 -3
- package/api/resources/steps/resources/messages/client/Client.d.ts +2 -2
- package/api/resources/steps/resources/messages/client/Client.js +3 -3
- package/api/resources/steps/resources/metrics/client/Client.d.ts +2 -2
- package/api/resources/steps/resources/metrics/client/Client.js +3 -3
- package/api/resources/steps/resources/trace/client/Client.d.ts +2 -2
- package/api/resources/steps/resources/trace/client/Client.js +3 -3
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.d.ts +1 -1
- package/api/resources/templates/client/Client.js +14 -14
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.d.ts +2 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.d.ts +5 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.d.ts +4 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.d.ts +5 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.d.ts +4 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.d.ts +1 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.d.ts +5 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.d.ts +4 -0
- package/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.js +5 -0
- package/api/resources/templates/types/index.d.ts +6 -0
- package/api/resources/templates/types/index.js +6 -0
- package/api/resources/tools/client/Client.d.ts +6 -6
- package/api/resources/tools/client/Client.js +23 -23
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/api/resources/voice/client/Client.d.ts +8 -0
- package/api/resources/voice/client/Client.js +11 -1
- package/api/types/Annotation.d.ts +10 -0
- package/api/types/Annotation.js +5 -0
- package/api/types/AnnotationUrlCitation.d.ts +11 -0
- package/api/types/AnnotationUrlCitation.js +5 -0
- package/api/types/ApprovalRequestMessage.d.ts +4 -0
- package/api/types/ApprovalRequestMessageAllowedToolCalls.d.ts +8 -0
- package/api/types/ApprovalRequestMessageAllowedToolCalls.js +5 -0
- package/api/types/ApprovalRequestMessageRequestedToolCalls.d.ts +8 -0
- package/api/types/ApprovalRequestMessageRequestedToolCalls.js +5 -0
- package/{dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts → api/types/Audio.d.ts} +2 -2
- package/api/types/Audio.js +5 -0
- package/api/types/ChatCompletion.d.ts +16 -0
- package/api/types/ChatCompletion.js +5 -0
- package/api/types/ChatCompletionAssistantMessageParam.d.ts +13 -0
- package/api/types/ChatCompletionAssistantMessageParam.js +5 -0
- package/api/types/ChatCompletionAssistantMessageParamContent.d.ts +5 -0
- package/api/types/ChatCompletionAssistantMessageParamContent.js +5 -0
- package/api/types/ChatCompletionAssistantMessageParamContentItem.d.ts +5 -0
- package/api/types/ChatCompletionAssistantMessageParamContentItem.js +5 -0
- package/api/types/ChatCompletionAssistantMessageParamToolCallsItem.d.ts +5 -0
- package/api/types/ChatCompletionAssistantMessageParamToolCallsItem.js +5 -0
- package/api/types/ChatCompletionAudio.d.ts +11 -0
- package/api/types/ChatCompletionAudio.js +5 -0
- package/api/types/ChatCompletionContentPartImageParam.d.ts +8 -0
- package/api/types/ChatCompletionContentPartImageParam.js +5 -0
- package/api/types/ChatCompletionContentPartInputAudioParam.d.ts +8 -0
- package/api/types/ChatCompletionContentPartInputAudioParam.js +5 -0
- package/api/types/ChatCompletionContentPartRefusalParam.d.ts +7 -0
- package/api/types/ChatCompletionContentPartRefusalParam.js +5 -0
- package/api/types/ChatCompletionContentPartTextParam.d.ts +7 -0
- package/api/types/ChatCompletionContentPartTextParam.js +5 -0
- package/api/types/ChatCompletionDeveloperMessageParam.d.ts +9 -0
- package/api/types/ChatCompletionDeveloperMessageParam.js +5 -0
- package/api/types/ChatCompletionDeveloperMessageParamContent.d.ts +5 -0
- package/api/types/ChatCompletionDeveloperMessageParamContent.js +5 -0
- package/api/types/ChatCompletionFunctionMessageParam.d.ts +8 -0
- package/api/types/ChatCompletionFunctionMessageParam.js +5 -0
- package/api/types/ChatCompletionMessage.d.ts +15 -0
- package/api/types/ChatCompletionMessage.js +5 -0
- package/api/types/ChatCompletionMessageCustomToolCall.d.ts +11 -0
- package/api/types/ChatCompletionMessageCustomToolCall.js +5 -0
- package/api/types/ChatCompletionMessageCustomToolCallParam.d.ts +9 -0
- package/api/types/ChatCompletionMessageCustomToolCallParam.js +5 -0
- package/api/types/ChatCompletionMessageFunctionToolCallInput.d.ts +11 -0
- package/api/types/ChatCompletionMessageFunctionToolCallInput.js +5 -0
- package/{dist/api/types/ChatCompletionMessageFunctionToolCall.d.ts → api/types/ChatCompletionMessageFunctionToolCallOutput.d.ts} +2 -2
- package/api/types/ChatCompletionMessageFunctionToolCallOutput.js +5 -0
- package/api/types/ChatCompletionMessageFunctionToolCallParam.d.ts +9 -0
- package/api/types/ChatCompletionMessageFunctionToolCallParam.js +5 -0
- package/api/types/ChatCompletionMessageToolCallsItem.d.ts +5 -0
- package/api/types/ChatCompletionMessageToolCallsItem.js +5 -0
- package/api/types/ChatCompletionServiceTier.d.ts +11 -0
- package/api/types/ChatCompletionServiceTier.js +13 -0
- package/api/types/ChatCompletionSystemMessageParam.d.ts +9 -0
- package/api/types/ChatCompletionSystemMessageParam.js +5 -0
- package/api/types/ChatCompletionSystemMessageParamContent.d.ts +5 -0
- package/api/types/ChatCompletionSystemMessageParamContent.js +5 -0
- package/api/types/ChatCompletionTokenLogprob.d.ts +12 -0
- package/api/types/ChatCompletionTokenLogprob.js +5 -0
- package/api/types/ChatCompletionToolMessageParam.d.ts +9 -0
- package/api/types/ChatCompletionToolMessageParam.js +5 -0
- package/api/types/ChatCompletionToolMessageParamContent.d.ts +5 -0
- package/api/types/ChatCompletionToolMessageParamContent.js +5 -0
- package/api/types/ChatCompletionUserMessageParam.d.ts +9 -0
- package/api/types/ChatCompletionUserMessageParam.js +5 -0
- package/api/types/ChatCompletionUserMessageParamContent.d.ts +5 -0
- package/api/types/ChatCompletionUserMessageParamContent.js +5 -0
- package/api/types/ChatCompletionUserMessageParamContentItem.d.ts +5 -0
- package/api/types/ChatCompletionUserMessageParamContentItem.js +5 -0
- package/api/types/Choice.d.ts +12 -0
- package/api/types/Choice.js +5 -0
- package/api/types/ChoiceFinishReason.d.ts +11 -0
- package/api/types/ChoiceFinishReason.js +13 -0
- package/api/types/ChoiceLogprobs.d.ts +10 -0
- package/api/types/ChoiceLogprobs.js +5 -0
- package/api/types/CompletionTokensDetails.d.ts +11 -0
- package/api/types/CompletionTokensDetails.js +5 -0
- package/api/types/CompletionUsage.d.ts +13 -0
- package/api/types/CompletionUsage.js +5 -0
- package/api/types/CustomInput.d.ts +7 -0
- package/api/types/CustomInput.js +5 -0
- package/api/types/CustomOutput.d.ts +9 -0
- package/api/types/CustomOutput.js +5 -0
- package/api/types/FileFile.d.ts +8 -0
- package/api/types/FileFile.js +5 -0
- package/api/types/File_.d.ts +8 -0
- package/api/types/File_.js +5 -0
- package/api/types/FunctionCallInput.d.ts +7 -0
- package/api/types/FunctionCallInput.js +5 -0
- package/api/types/FunctionCallOutput.d.ts +9 -0
- package/api/types/FunctionCallOutput.js +5 -0
- package/api/types/{Function.d.ts → FunctionOutput.d.ts} +1 -1
- package/api/types/FunctionOutput.js +5 -0
- package/api/types/ImageUrl.d.ts +8 -0
- package/api/types/ImageUrl.js +5 -0
- package/api/types/ImageUrlDetail.d.ts +9 -0
- package/api/types/ImageUrlDetail.js +11 -0
- package/api/types/InputAudio.d.ts +8 -0
- package/api/types/InputAudio.js +5 -0
- package/api/types/InputAudioFormat.d.ts +8 -0
- package/api/types/InputAudioFormat.js +10 -0
- package/api/types/InternalTemplateAgentCreate.d.ts +2 -0
- package/api/types/LettaSchemasAgentFileAgentSchema.d.ts +2 -0
- package/api/types/LettaSchemasAgentFileMessageSchema.d.ts +3 -1
- package/api/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.d.ts +5 -0
- package/api/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.js +5 -0
- package/api/types/LettaSchemasAgentFileToolSchema.d.ts +2 -0
- package/api/types/LlmConfig.d.ts +4 -0
- package/api/types/Message.d.ts +1 -1
- package/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.d.ts +9 -0
- package/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.js +5 -0
- package/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.d.ts +7 -0
- package/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.js +5 -0
- package/api/types/PromptTokensDetails.d.ts +9 -0
- package/api/types/PromptTokensDetails.js +5 -0
- package/api/types/RunMetrics.d.ts +2 -0
- package/api/types/Tool.d.ts +2 -0
- package/api/types/ToolCreate.d.ts +2 -0
- package/api/types/TopLogprob.d.ts +10 -0
- package/api/types/TopLogprob.js +5 -0
- package/api/types/index.d.ts +55 -2
- package/api/types/index.js +55 -2
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +37 -32
- package/dist/api/errors/GoneError.d.ts +8 -0
- package/dist/api/errors/GoneError.js +52 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/agents/client/Client.d.ts +8 -11
- package/dist/api/resources/agents/client/Client.js +19 -24
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +12 -12
- package/dist/api/resources/agents/resources/blocks/client/Client.js +17 -17
- 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 +2 -2
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +10 -10
- package/dist/api/resources/agents/resources/files/client/Client.js +14 -14
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +8 -8
- package/dist/api/resources/agents/resources/folders/client/Client.js +11 -11
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/resources/groups/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/index.d.ts +0 -3
- package/dist/api/resources/agents/resources/index.js +1 -4
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +17 -17
- package/dist/api/resources/agents/resources/messages/client/Client.js +27 -27
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -8
- package/dist/api/resources/agents/resources/passages/client/Client.js +13 -13
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +8 -8
- package/dist/api/resources/agents/resources/sources/client/Client.js +11 -11
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +10 -10
- package/dist/api/resources/agents/resources/tools/client/Client.js +14 -14
- package/dist/api/resources/archives/client/Client.d.ts +2 -2
- package/dist/api/resources/archives/client/Client.js +5 -5
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/blocks/client/Client.d.ts +6 -6
- package/dist/api/resources/blocks/client/Client.js +12 -12
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -2
- package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -3
- package/dist/api/resources/chat/client/Client.d.ts +61 -0
- package/dist/api/resources/chat/client/Client.js +158 -0
- package/dist/api/resources/chat/client/requests/ChatCompletionRequest.d.ts +38 -0
- package/dist/api/resources/chat/client/requests/ChatCompletionRequest.js +5 -0
- package/dist/api/resources/chat/client/requests/index.d.ts +1 -0
- package/dist/api/resources/chat/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
- package/dist/api/resources/chat/types/ChatCompletionRequestMessagesItem.js +5 -0
- package/dist/api/resources/chat/types/ChatCompletionRequestStop.d.ts +7 -0
- package/dist/api/resources/chat/types/ChatCompletionRequestStop.js +5 -0
- package/dist/api/resources/chat/types/index.d.ts +2 -0
- package/dist/api/resources/chat/types/index.js +18 -0
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/dist/api/resources/folders/client/Client.js +8 -8
- package/dist/api/resources/folders/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
- package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.d.ts +6 -6
- package/dist/api/resources/groups/client/Client.js +12 -12
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +9 -9
- package/dist/api/resources/groups/resources/messages/client/Client.js +14 -14
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.d.ts +6 -6
- package/dist/api/resources/identities/client/Client.js +13 -13
- package/dist/api/resources/identities/resources/agents/client/Client.d.ts +2 -2
- package/dist/api/resources/identities/resources/agents/client/Client.js +3 -3
- package/dist/api/resources/identities/resources/blocks/client/Client.d.ts +2 -2
- package/dist/api/resources/identities/resources/blocks/client/Client.js +3 -3
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -2
- package/dist/api/resources/identities/resources/properties/client/Client.js +3 -3
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/jobs/client/Client.d.ts +6 -6
- package/dist/api/resources/jobs/client/Client.js +11 -11
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/models/resources/embeddings/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.d.ts +8 -8
- package/dist/api/resources/providers/client/Client.js +15 -15
- package/dist/api/resources/runs/client/Client.js +6 -6
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.d.ts +11 -11
- package/dist/api/resources/sources/client/Client.js +21 -21
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -6
- package/dist/api/resources/sources/resources/files/client/Client.js +9 -9
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -2
- package/dist/api/resources/sources/resources/passages/client/Client.js +3 -3
- package/dist/api/resources/steps/client/Client.d.ts +2 -2
- package/dist/api/resources/steps/client/Client.js +4 -4
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -2
- package/dist/api/resources/steps/resources/feedback/client/Client.js +3 -3
- package/dist/api/resources/steps/resources/messages/client/Client.d.ts +2 -2
- package/dist/api/resources/steps/resources/messages/client/Client.js +3 -3
- package/dist/api/resources/steps/resources/metrics/client/Client.d.ts +2 -2
- package/dist/api/resources/steps/resources/metrics/client/Client.js +3 -3
- package/dist/api/resources/steps/resources/trace/client/Client.d.ts +2 -2
- package/dist/api/resources/steps/resources/trace/client/Client.js +3 -3
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.d.ts +1 -1
- package/dist/api/resources/templates/client/Client.js +14 -14
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.d.ts +2 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.d.ts +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.js +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.d.ts +4 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.d.ts +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.js +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.d.ts +4 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.js +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.d.ts +1 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.d.ts +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.js +5 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.d.ts +4 -0
- package/dist/api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.js +5 -0
- package/dist/api/resources/templates/types/index.d.ts +6 -0
- package/dist/api/resources/templates/types/index.js +6 -0
- package/dist/api/resources/tools/client/Client.d.ts +6 -6
- package/dist/api/resources/tools/client/Client.js +23 -23
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/api/resources/voice/client/Client.d.ts +8 -0
- package/dist/api/resources/voice/client/Client.js +11 -1
- package/dist/api/types/Annotation.d.ts +10 -0
- package/dist/api/types/Annotation.js +5 -0
- package/dist/api/types/AnnotationUrlCitation.d.ts +11 -0
- package/dist/api/types/AnnotationUrlCitation.js +5 -0
- package/dist/api/types/ApprovalRequestMessage.d.ts +4 -0
- package/dist/api/types/ApprovalRequestMessageAllowedToolCalls.d.ts +8 -0
- package/dist/api/types/ApprovalRequestMessageAllowedToolCalls.js +5 -0
- package/dist/api/types/ApprovalRequestMessageRequestedToolCalls.d.ts +8 -0
- package/dist/api/types/ApprovalRequestMessageRequestedToolCalls.js +5 -0
- package/{api/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts → dist/api/types/Audio.d.ts} +2 -2
- package/dist/api/types/Audio.js +5 -0
- package/dist/api/types/ChatCompletion.d.ts +16 -0
- package/dist/api/types/ChatCompletion.js +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParam.d.ts +13 -0
- package/dist/api/types/ChatCompletionAssistantMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamContent.d.ts +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamContent.js +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamContentItem.d.ts +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamContentItem.js +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamToolCallsItem.d.ts +5 -0
- package/dist/api/types/ChatCompletionAssistantMessageParamToolCallsItem.js +5 -0
- package/dist/api/types/ChatCompletionAudio.d.ts +11 -0
- package/dist/api/types/ChatCompletionAudio.js +5 -0
- package/dist/api/types/ChatCompletionContentPartImageParam.d.ts +8 -0
- package/dist/api/types/ChatCompletionContentPartImageParam.js +5 -0
- package/dist/api/types/ChatCompletionContentPartInputAudioParam.d.ts +8 -0
- package/dist/api/types/ChatCompletionContentPartInputAudioParam.js +5 -0
- package/dist/api/types/ChatCompletionContentPartRefusalParam.d.ts +7 -0
- package/dist/api/types/ChatCompletionContentPartRefusalParam.js +5 -0
- package/dist/api/types/ChatCompletionContentPartTextParam.d.ts +7 -0
- package/dist/api/types/ChatCompletionContentPartTextParam.js +5 -0
- package/dist/api/types/ChatCompletionDeveloperMessageParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionDeveloperMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionDeveloperMessageParamContent.d.ts +5 -0
- package/dist/api/types/ChatCompletionDeveloperMessageParamContent.js +5 -0
- package/dist/api/types/ChatCompletionFunctionMessageParam.d.ts +8 -0
- package/dist/api/types/ChatCompletionFunctionMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionMessage.d.ts +15 -0
- package/dist/api/types/ChatCompletionMessage.js +5 -0
- package/dist/api/types/ChatCompletionMessageCustomToolCall.d.ts +11 -0
- package/dist/api/types/ChatCompletionMessageCustomToolCall.js +5 -0
- package/dist/api/types/ChatCompletionMessageCustomToolCallParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionMessageCustomToolCallParam.js +5 -0
- package/dist/api/types/ChatCompletionMessageFunctionToolCallInput.d.ts +11 -0
- package/dist/api/types/ChatCompletionMessageFunctionToolCallInput.js +5 -0
- package/{api/types/ChatCompletionMessageFunctionToolCall.d.ts → dist/api/types/ChatCompletionMessageFunctionToolCallOutput.d.ts} +2 -2
- package/dist/api/types/ChatCompletionMessageFunctionToolCallOutput.js +5 -0
- package/dist/api/types/ChatCompletionMessageFunctionToolCallParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionMessageFunctionToolCallParam.js +5 -0
- package/dist/api/types/ChatCompletionMessageToolCallsItem.d.ts +5 -0
- package/dist/api/types/ChatCompletionMessageToolCallsItem.js +5 -0
- package/dist/api/types/ChatCompletionServiceTier.d.ts +11 -0
- package/dist/api/types/ChatCompletionServiceTier.js +13 -0
- package/dist/api/types/ChatCompletionSystemMessageParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionSystemMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionSystemMessageParamContent.d.ts +5 -0
- package/dist/api/types/ChatCompletionSystemMessageParamContent.js +5 -0
- package/dist/api/types/ChatCompletionTokenLogprob.d.ts +12 -0
- package/dist/api/types/ChatCompletionTokenLogprob.js +5 -0
- package/dist/api/types/ChatCompletionToolMessageParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionToolMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionToolMessageParamContent.d.ts +5 -0
- package/dist/api/types/ChatCompletionToolMessageParamContent.js +5 -0
- package/dist/api/types/ChatCompletionUserMessageParam.d.ts +9 -0
- package/dist/api/types/ChatCompletionUserMessageParam.js +5 -0
- package/dist/api/types/ChatCompletionUserMessageParamContent.d.ts +5 -0
- package/dist/api/types/ChatCompletionUserMessageParamContent.js +5 -0
- package/dist/api/types/ChatCompletionUserMessageParamContentItem.d.ts +5 -0
- package/dist/api/types/ChatCompletionUserMessageParamContentItem.js +5 -0
- package/dist/api/types/Choice.d.ts +12 -0
- package/dist/api/types/Choice.js +5 -0
- package/dist/api/types/ChoiceFinishReason.d.ts +11 -0
- package/dist/api/types/ChoiceFinishReason.js +13 -0
- package/dist/api/types/ChoiceLogprobs.d.ts +10 -0
- package/dist/api/types/ChoiceLogprobs.js +5 -0
- package/dist/api/types/CompletionTokensDetails.d.ts +11 -0
- package/dist/api/types/CompletionTokensDetails.js +5 -0
- package/dist/api/types/CompletionUsage.d.ts +13 -0
- package/dist/api/types/CompletionUsage.js +5 -0
- package/dist/api/types/CustomInput.d.ts +7 -0
- package/dist/api/types/CustomInput.js +5 -0
- package/dist/api/types/CustomOutput.d.ts +9 -0
- package/dist/api/types/CustomOutput.js +5 -0
- package/dist/api/types/FileFile.d.ts +8 -0
- package/dist/api/types/FileFile.js +5 -0
- package/dist/api/types/File_.d.ts +8 -0
- package/dist/api/types/File_.js +5 -0
- package/dist/api/types/FunctionCallInput.d.ts +7 -0
- package/dist/api/types/FunctionCallInput.js +5 -0
- package/dist/api/types/FunctionCallOutput.d.ts +9 -0
- package/dist/api/types/FunctionCallOutput.js +5 -0
- package/dist/api/types/{Function.d.ts → FunctionOutput.d.ts} +1 -1
- package/dist/api/types/FunctionOutput.js +5 -0
- package/dist/api/types/ImageUrl.d.ts +8 -0
- package/dist/api/types/ImageUrl.js +5 -0
- package/dist/api/types/ImageUrlDetail.d.ts +9 -0
- package/dist/api/types/ImageUrlDetail.js +11 -0
- package/dist/api/types/InputAudio.d.ts +8 -0
- package/dist/api/types/InputAudio.js +5 -0
- package/dist/api/types/InputAudioFormat.d.ts +8 -0
- package/dist/api/types/InputAudioFormat.js +10 -0
- package/dist/api/types/InternalTemplateAgentCreate.d.ts +2 -0
- package/dist/api/types/LettaSchemasAgentFileAgentSchema.d.ts +2 -0
- package/dist/api/types/LettaSchemasAgentFileMessageSchema.d.ts +3 -1
- package/dist/api/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.d.ts +5 -0
- package/dist/api/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.js +5 -0
- package/dist/api/types/LettaSchemasAgentFileToolSchema.d.ts +2 -0
- package/dist/api/types/LlmConfig.d.ts +4 -0
- package/dist/api/types/Message.d.ts +1 -1
- package/dist/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.d.ts +9 -0
- package/dist/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.js +5 -0
- package/dist/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.d.ts +7 -0
- package/dist/api/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.js +5 -0
- package/dist/api/types/PromptTokensDetails.d.ts +9 -0
- package/dist/api/types/PromptTokensDetails.js +5 -0
- package/dist/api/types/RunMetrics.d.ts +2 -0
- package/dist/api/types/Tool.d.ts +2 -0
- package/dist/api/types/ToolCreate.d.ts +2 -0
- package/dist/api/types/TopLogprob.d.ts +10 -0
- package/dist/api/types/TopLogprob.js +5 -0
- package/dist/api/types/index.d.ts +55 -2
- package/dist/api/types/index.js +55 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/dist/serialization/resources/agents/resources/index.d.ts +0 -3
- package/dist/serialization/resources/agents/resources/index.js +1 -4
- package/dist/serialization/resources/chat/client/requests/ChatCompletionRequest.d.ts +24 -0
- package/{serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js → dist/serialization/resources/chat/client/requests/ChatCompletionRequest.js} +16 -6
- package/dist/serialization/resources/chat/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/chat/client/requests/index.js +5 -0
- package/dist/serialization/resources/chat/types/ChatCompletionRequestMessagesItem.d.ts +16 -0
- package/dist/serialization/resources/chat/types/ChatCompletionRequestMessagesItem.js +54 -0
- package/dist/serialization/resources/chat/types/ChatCompletionRequestStop.d.ts +10 -0
- package/dist/serialization/resources/chat/types/ChatCompletionRequestStop.js +44 -0
- package/dist/serialization/resources/chat/types/index.d.ts +2 -0
- package/dist/serialization/resources/chat/types/index.js +18 -0
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.d.ts +4 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.js +4 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.d.ts +11 -0
- package/dist/serialization/resources/{agents/resources/templates/client/requests/TemplatesMigrateRequest.js → templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.js} +9 -7
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.d.ts +10 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.js +41 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.d.ts +11 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.js +47 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.d.ts +10 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.js +41 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.d.ts +2 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.js +2 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.d.ts +11 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.js +46 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.d.ts +10 -0
- package/dist/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.js +41 -0
- package/dist/serialization/resources/templates/types/index.d.ts +6 -0
- package/dist/serialization/resources/templates/types/index.js +6 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
- package/dist/serialization/types/Annotation.d.ts +15 -0
- package/dist/serialization/types/Annotation.js +47 -0
- package/dist/serialization/types/AnnotationUrlCitation.d.ts +16 -0
- package/dist/serialization/types/AnnotationUrlCitation.js +48 -0
- package/dist/serialization/types/ApprovalRequestMessage.d.ts +4 -0
- package/dist/serialization/types/ApprovalRequestMessage.js +4 -0
- package/dist/serialization/types/ApprovalRequestMessageAllowedToolCalls.d.ts +12 -0
- package/dist/serialization/types/ApprovalRequestMessageAllowedToolCalls.js +43 -0
- package/dist/serialization/types/ApprovalRequestMessageRequestedToolCalls.d.ts +12 -0
- package/dist/serialization/types/ApprovalRequestMessageRequestedToolCalls.js +43 -0
- package/dist/serialization/types/Audio.d.ts +12 -0
- package/{serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js → dist/serialization/types/Audio.js} +4 -4
- package/dist/serialization/types/ChatCompletion.d.ts +23 -0
- package/dist/serialization/types/ChatCompletion.js +55 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParam.d.ts +22 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParam.js +53 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamContent.d.ts +11 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamContent.js +45 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamContentItem.d.ts +12 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamContentItem.js +46 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamToolCallsItem.d.ts +12 -0
- package/dist/serialization/types/ChatCompletionAssistantMessageParamToolCallsItem.js +46 -0
- package/dist/serialization/types/ChatCompletionAudio.d.ts +16 -0
- package/dist/serialization/types/ChatCompletionAudio.js +48 -0
- package/dist/serialization/types/ChatCompletionContentPartImageParam.d.ts +14 -0
- package/dist/serialization/types/ChatCompletionContentPartImageParam.js +45 -0
- package/dist/serialization/types/ChatCompletionContentPartInputAudioParam.d.ts +14 -0
- package/dist/serialization/types/ChatCompletionContentPartInputAudioParam.js +45 -0
- package/dist/serialization/types/ChatCompletionContentPartRefusalParam.d.ts +13 -0
- package/dist/serialization/types/ChatCompletionContentPartRefusalParam.js +44 -0
- package/dist/serialization/types/ChatCompletionContentPartTextParam.d.ts +13 -0
- package/dist/serialization/types/ChatCompletionContentPartTextParam.js +44 -0
- package/dist/serialization/types/ChatCompletionDeveloperMessageParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionDeveloperMessageParam.js +46 -0
- package/dist/serialization/types/ChatCompletionDeveloperMessageParamContent.d.ts +11 -0
- package/dist/serialization/types/ChatCompletionDeveloperMessageParamContent.js +45 -0
- package/dist/serialization/types/ChatCompletionFunctionMessageParam.d.ts +14 -0
- package/dist/serialization/types/ChatCompletionFunctionMessageParam.js +45 -0
- package/dist/serialization/types/ChatCompletionMessage.d.ts +23 -0
- package/dist/serialization/types/ChatCompletionMessage.js +55 -0
- package/dist/serialization/types/ChatCompletionMessageCustomToolCall.d.ts +16 -0
- package/dist/serialization/types/ChatCompletionMessageCustomToolCall.js +48 -0
- package/dist/serialization/types/ChatCompletionMessageCustomToolCallParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionMessageCustomToolCallParam.js +46 -0
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCallInput.d.ts +16 -0
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCallInput.js +48 -0
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCallOutput.d.ts +16 -0
- package/dist/serialization/types/{ChatCompletionMessageFunctionToolCall.js → ChatCompletionMessageFunctionToolCallOutput.js} +4 -4
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCallParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCallParam.js +46 -0
- package/dist/serialization/types/ChatCompletionMessageToolCallsItem.d.ts +12 -0
- package/dist/serialization/types/ChatCompletionMessageToolCallsItem.js +46 -0
- package/dist/serialization/types/ChatCompletionServiceTier.d.ts +10 -0
- package/dist/serialization/types/ChatCompletionServiceTier.js +41 -0
- package/dist/serialization/types/ChatCompletionSystemMessageParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionSystemMessageParam.js +46 -0
- package/dist/serialization/types/ChatCompletionSystemMessageParamContent.d.ts +11 -0
- package/dist/serialization/types/ChatCompletionSystemMessageParamContent.js +45 -0
- package/dist/serialization/types/ChatCompletionTokenLogprob.d.ts +17 -0
- package/dist/serialization/types/ChatCompletionTokenLogprob.js +49 -0
- package/dist/serialization/types/ChatCompletionToolMessageParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionToolMessageParam.js +46 -0
- package/dist/serialization/types/ChatCompletionToolMessageParamContent.d.ts +11 -0
- package/dist/serialization/types/ChatCompletionToolMessageParamContent.js +45 -0
- package/dist/serialization/types/ChatCompletionUserMessageParam.d.ts +15 -0
- package/dist/serialization/types/ChatCompletionUserMessageParam.js +46 -0
- package/dist/serialization/types/ChatCompletionUserMessageParamContent.d.ts +11 -0
- package/dist/serialization/types/ChatCompletionUserMessageParamContent.js +45 -0
- package/dist/serialization/types/ChatCompletionUserMessageParamContentItem.d.ts +14 -0
- package/dist/serialization/types/ChatCompletionUserMessageParamContentItem.js +50 -0
- package/dist/serialization/types/Choice.d.ts +19 -0
- package/dist/serialization/types/Choice.js +51 -0
- package/dist/serialization/types/ChoiceFinishReason.d.ts +10 -0
- package/dist/serialization/types/ChoiceFinishReason.js +41 -0
- package/dist/serialization/types/ChoiceLogprobs.d.ts +15 -0
- package/dist/serialization/types/ChoiceLogprobs.js +47 -0
- package/dist/serialization/types/CompletionTokensDetails.d.ts +16 -0
- package/dist/serialization/types/CompletionTokensDetails.js +48 -0
- package/dist/serialization/types/CompletionUsage.d.ts +19 -0
- package/dist/serialization/types/CompletionUsage.js +51 -0
- package/dist/serialization/types/CustomInput.d.ts +13 -0
- package/dist/serialization/{resources/agents/resources/templates/types/TemplatesMigrateResponse.js → types/CustomInput.js} +5 -4
- package/dist/serialization/types/CustomOutput.d.ts +14 -0
- package/dist/serialization/types/CustomOutput.js +46 -0
- package/dist/serialization/types/FileFile.d.ts +14 -0
- package/dist/serialization/types/FileFile.js +45 -0
- package/dist/serialization/types/File_.d.ts +14 -0
- package/dist/serialization/types/File_.js +45 -0
- package/dist/serialization/types/FunctionCallInput.d.ts +13 -0
- package/dist/serialization/types/FunctionCallInput.js +44 -0
- package/dist/serialization/types/FunctionCallOutput.d.ts +14 -0
- package/dist/serialization/types/FunctionCallOutput.js +46 -0
- package/{serialization/types/Function.d.ts → dist/serialization/types/FunctionOutput.d.ts} +2 -2
- package/{serialization/types/Function.js → dist/serialization/types/FunctionOutput.js} +2 -2
- package/dist/serialization/types/ImageUrl.d.ts +14 -0
- package/dist/serialization/types/ImageUrl.js +45 -0
- package/dist/serialization/types/ImageUrlDetail.d.ts +10 -0
- package/dist/serialization/types/ImageUrlDetail.js +41 -0
- package/dist/serialization/types/InputAudio.d.ts +14 -0
- package/dist/serialization/types/InputAudio.js +45 -0
- package/dist/serialization/types/InputAudioFormat.d.ts +10 -0
- package/dist/serialization/types/InputAudioFormat.js +41 -0
- package/dist/serialization/types/InternalTemplateAgentCreate.d.ts +1 -0
- package/dist/serialization/types/InternalTemplateAgentCreate.js +1 -0
- package/dist/serialization/types/LettaSchemasAgentFileAgentSchema.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasAgentFileAgentSchema.js +1 -0
- package/dist/serialization/types/LettaSchemasAgentFileMessageSchema.d.ts +4 -2
- package/dist/serialization/types/LettaSchemasAgentFileMessageSchema.js +4 -2
- package/dist/serialization/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.d.ts +12 -0
- package/dist/serialization/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.js +43 -0
- package/dist/serialization/types/LettaSchemasAgentFileToolSchema.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasAgentFileToolSchema.js +1 -0
- package/dist/serialization/types/LlmConfig.d.ts +2 -0
- package/dist/serialization/types/LlmConfig.js +2 -0
- package/dist/serialization/types/Message.d.ts +2 -2
- package/dist/serialization/types/Message.js +2 -2
- package/dist/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.d.ts +14 -0
- package/dist/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.js +46 -0
- package/dist/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.d.ts +13 -0
- package/dist/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.js +44 -0
- package/dist/serialization/types/PromptTokensDetails.d.ts +14 -0
- package/dist/serialization/types/PromptTokensDetails.js +46 -0
- package/dist/serialization/types/RunMetrics.d.ts +1 -0
- package/dist/serialization/types/RunMetrics.js +1 -0
- package/dist/serialization/types/Tool.d.ts +1 -0
- package/dist/serialization/types/Tool.js +1 -0
- package/dist/serialization/types/ToolCreate.d.ts +1 -0
- package/dist/serialization/types/ToolCreate.js +1 -0
- package/dist/serialization/types/TopLogprob.d.ts +15 -0
- package/dist/serialization/types/TopLogprob.js +47 -0
- package/dist/serialization/types/index.d.ts +55 -2
- package/dist/serialization/types/index.js +55 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +336 -395
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/serialization/resources/agents/resources/index.d.ts +0 -3
- package/serialization/resources/agents/resources/index.js +1 -4
- package/serialization/resources/chat/client/requests/ChatCompletionRequest.d.ts +24 -0
- package/serialization/resources/chat/client/requests/ChatCompletionRequest.js +55 -0
- package/serialization/resources/chat/client/requests/index.d.ts +1 -0
- package/serialization/resources/chat/client/requests/index.js +5 -0
- package/serialization/resources/chat/types/ChatCompletionRequestMessagesItem.d.ts +16 -0
- package/serialization/resources/chat/types/ChatCompletionRequestMessagesItem.js +54 -0
- package/serialization/resources/chat/types/ChatCompletionRequestStop.d.ts +10 -0
- package/serialization/resources/chat/types/ChatCompletionRequestStop.js +44 -0
- package/serialization/resources/chat/types/index.d.ts +2 -0
- package/serialization/resources/chat/types/index.js +18 -0
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.d.ts +4 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfig.js +4 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.d.ts +11 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.js +47 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.d.ts +10 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.js +41 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.d.ts +11 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.js +47 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.d.ts +10 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.js +41 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.d.ts +2 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItem.js +2 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.d.ts +11 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.js +46 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.d.ts +10 -0
- package/serialization/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecutionItem.js +41 -0
- package/serialization/resources/templates/types/index.d.ts +6 -0
- package/serialization/resources/templates/types/index.js +6 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
- package/serialization/types/Annotation.d.ts +15 -0
- package/serialization/types/Annotation.js +47 -0
- package/serialization/types/AnnotationUrlCitation.d.ts +16 -0
- package/serialization/types/AnnotationUrlCitation.js +48 -0
- package/serialization/types/ApprovalRequestMessage.d.ts +4 -0
- package/serialization/types/ApprovalRequestMessage.js +4 -0
- package/serialization/types/ApprovalRequestMessageAllowedToolCalls.d.ts +12 -0
- package/serialization/types/ApprovalRequestMessageAllowedToolCalls.js +43 -0
- package/serialization/types/ApprovalRequestMessageRequestedToolCalls.d.ts +12 -0
- package/serialization/types/ApprovalRequestMessageRequestedToolCalls.js +43 -0
- package/serialization/types/Audio.d.ts +12 -0
- package/serialization/types/Audio.js +43 -0
- package/serialization/types/ChatCompletion.d.ts +23 -0
- package/serialization/types/ChatCompletion.js +55 -0
- package/serialization/types/ChatCompletionAssistantMessageParam.d.ts +22 -0
- package/serialization/types/ChatCompletionAssistantMessageParam.js +53 -0
- package/serialization/types/ChatCompletionAssistantMessageParamContent.d.ts +11 -0
- package/serialization/types/ChatCompletionAssistantMessageParamContent.js +45 -0
- package/serialization/types/ChatCompletionAssistantMessageParamContentItem.d.ts +12 -0
- package/serialization/types/ChatCompletionAssistantMessageParamContentItem.js +46 -0
- package/serialization/types/ChatCompletionAssistantMessageParamToolCallsItem.d.ts +12 -0
- package/serialization/types/ChatCompletionAssistantMessageParamToolCallsItem.js +46 -0
- package/serialization/types/ChatCompletionAudio.d.ts +16 -0
- package/serialization/types/ChatCompletionAudio.js +48 -0
- package/serialization/types/ChatCompletionContentPartImageParam.d.ts +14 -0
- package/serialization/types/ChatCompletionContentPartImageParam.js +45 -0
- package/serialization/types/ChatCompletionContentPartInputAudioParam.d.ts +14 -0
- package/serialization/types/ChatCompletionContentPartInputAudioParam.js +45 -0
- package/serialization/types/ChatCompletionContentPartRefusalParam.d.ts +13 -0
- package/serialization/types/ChatCompletionContentPartRefusalParam.js +44 -0
- package/serialization/types/ChatCompletionContentPartTextParam.d.ts +13 -0
- package/serialization/types/ChatCompletionContentPartTextParam.js +44 -0
- package/serialization/types/ChatCompletionDeveloperMessageParam.d.ts +15 -0
- package/serialization/types/ChatCompletionDeveloperMessageParam.js +46 -0
- package/serialization/types/ChatCompletionDeveloperMessageParamContent.d.ts +11 -0
- package/serialization/types/ChatCompletionDeveloperMessageParamContent.js +45 -0
- package/serialization/types/ChatCompletionFunctionMessageParam.d.ts +14 -0
- package/serialization/types/ChatCompletionFunctionMessageParam.js +45 -0
- package/serialization/types/ChatCompletionMessage.d.ts +23 -0
- package/serialization/types/ChatCompletionMessage.js +55 -0
- package/serialization/types/ChatCompletionMessageCustomToolCall.d.ts +16 -0
- package/serialization/types/ChatCompletionMessageCustomToolCall.js +48 -0
- package/serialization/types/ChatCompletionMessageCustomToolCallParam.d.ts +15 -0
- package/serialization/types/ChatCompletionMessageCustomToolCallParam.js +46 -0
- package/serialization/types/ChatCompletionMessageFunctionToolCallInput.d.ts +16 -0
- package/serialization/types/ChatCompletionMessageFunctionToolCallInput.js +48 -0
- package/serialization/types/ChatCompletionMessageFunctionToolCallOutput.d.ts +16 -0
- package/serialization/types/{ChatCompletionMessageFunctionToolCall.js → ChatCompletionMessageFunctionToolCallOutput.js} +4 -4
- package/serialization/types/ChatCompletionMessageFunctionToolCallParam.d.ts +15 -0
- package/serialization/types/ChatCompletionMessageFunctionToolCallParam.js +46 -0
- package/serialization/types/ChatCompletionMessageToolCallsItem.d.ts +12 -0
- package/serialization/types/ChatCompletionMessageToolCallsItem.js +46 -0
- package/serialization/types/ChatCompletionServiceTier.d.ts +10 -0
- package/serialization/types/ChatCompletionServiceTier.js +41 -0
- package/serialization/types/ChatCompletionSystemMessageParam.d.ts +15 -0
- package/serialization/types/ChatCompletionSystemMessageParam.js +46 -0
- package/serialization/types/ChatCompletionSystemMessageParamContent.d.ts +11 -0
- package/serialization/types/ChatCompletionSystemMessageParamContent.js +45 -0
- package/serialization/types/ChatCompletionTokenLogprob.d.ts +17 -0
- package/serialization/types/ChatCompletionTokenLogprob.js +49 -0
- package/serialization/types/ChatCompletionToolMessageParam.d.ts +15 -0
- package/serialization/types/ChatCompletionToolMessageParam.js +46 -0
- package/serialization/types/ChatCompletionToolMessageParamContent.d.ts +11 -0
- package/serialization/types/ChatCompletionToolMessageParamContent.js +45 -0
- package/serialization/types/ChatCompletionUserMessageParam.d.ts +15 -0
- package/serialization/types/ChatCompletionUserMessageParam.js +46 -0
- package/serialization/types/ChatCompletionUserMessageParamContent.d.ts +11 -0
- package/serialization/types/ChatCompletionUserMessageParamContent.js +45 -0
- package/serialization/types/ChatCompletionUserMessageParamContentItem.d.ts +14 -0
- package/serialization/types/ChatCompletionUserMessageParamContentItem.js +50 -0
- package/serialization/types/Choice.d.ts +19 -0
- package/serialization/types/Choice.js +51 -0
- package/serialization/types/ChoiceFinishReason.d.ts +10 -0
- package/serialization/types/ChoiceFinishReason.js +41 -0
- package/serialization/types/ChoiceLogprobs.d.ts +15 -0
- package/serialization/types/ChoiceLogprobs.js +47 -0
- package/serialization/types/CompletionTokensDetails.d.ts +16 -0
- package/serialization/types/CompletionTokensDetails.js +48 -0
- package/serialization/types/CompletionUsage.d.ts +19 -0
- package/serialization/types/CompletionUsage.js +51 -0
- package/serialization/types/CustomInput.d.ts +13 -0
- package/serialization/types/CustomInput.js +44 -0
- package/serialization/types/CustomOutput.d.ts +14 -0
- package/serialization/types/CustomOutput.js +46 -0
- package/serialization/types/FileFile.d.ts +14 -0
- package/serialization/types/FileFile.js +45 -0
- package/serialization/types/File_.d.ts +14 -0
- package/serialization/types/File_.js +45 -0
- package/serialization/types/FunctionCallInput.d.ts +13 -0
- package/serialization/types/FunctionCallInput.js +44 -0
- package/serialization/types/FunctionCallOutput.d.ts +14 -0
- package/serialization/types/FunctionCallOutput.js +46 -0
- package/{dist/serialization/types/Function.d.ts → serialization/types/FunctionOutput.d.ts} +2 -2
- package/{dist/serialization/types/Function.js → serialization/types/FunctionOutput.js} +2 -2
- package/serialization/types/ImageUrl.d.ts +14 -0
- package/serialization/types/ImageUrl.js +45 -0
- package/serialization/types/ImageUrlDetail.d.ts +10 -0
- package/serialization/types/ImageUrlDetail.js +41 -0
- package/serialization/types/InputAudio.d.ts +14 -0
- package/serialization/types/InputAudio.js +45 -0
- package/serialization/types/InputAudioFormat.d.ts +10 -0
- package/serialization/types/InputAudioFormat.js +41 -0
- package/serialization/types/InternalTemplateAgentCreate.d.ts +1 -0
- package/serialization/types/InternalTemplateAgentCreate.js +1 -0
- package/serialization/types/LettaSchemasAgentFileAgentSchema.d.ts +1 -0
- package/serialization/types/LettaSchemasAgentFileAgentSchema.js +1 -0
- package/serialization/types/LettaSchemasAgentFileMessageSchema.d.ts +4 -2
- package/serialization/types/LettaSchemasAgentFileMessageSchema.js +4 -2
- package/serialization/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.d.ts +12 -0
- package/serialization/types/LettaSchemasAgentFileMessageSchemaApprovalsItem.js +43 -0
- package/serialization/types/LettaSchemasAgentFileToolSchema.d.ts +1 -0
- package/serialization/types/LettaSchemasAgentFileToolSchema.js +1 -0
- package/serialization/types/LlmConfig.d.ts +2 -0
- package/serialization/types/LlmConfig.js +2 -0
- package/serialization/types/Message.d.ts +2 -2
- package/serialization/types/Message.js +2 -2
- package/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.d.ts +14 -0
- package/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallFunction.js +46 -0
- package/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.d.ts +13 -0
- package/serialization/types/OpenaiTypesChatChatCompletionMessageFunctionToolCallParamFunction.js +44 -0
- package/serialization/types/PromptTokensDetails.d.ts +14 -0
- package/serialization/types/PromptTokensDetails.js +46 -0
- package/serialization/types/RunMetrics.d.ts +1 -0
- package/serialization/types/RunMetrics.js +1 -0
- package/serialization/types/Tool.d.ts +1 -0
- package/serialization/types/Tool.js +1 -0
- package/serialization/types/ToolCreate.d.ts +1 -0
- package/serialization/types/ToolCreate.js +1 -0
- package/serialization/types/TopLogprob.d.ts +15 -0
- package/serialization/types/TopLogprob.js +47 -0
- package/serialization/types/index.d.ts +55 -2
- package/serialization/types/index.js +55 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/templates/client/Client.d.ts +0 -79
- package/api/resources/agents/resources/templates/client/Client.js +0 -250
- package/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -16
- package/api/resources/agents/resources/templates/client/requests/index.d.ts +0 -1
- package/api/resources/agents/resources/templates/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +0 -79
- package/dist/api/resources/agents/resources/templates/client/Client.js +0 -250
- package/dist/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -16
- package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/templates/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/templates/types/index.js +0 -17
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -14
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +0 -5
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +0 -12
- package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/templates/types/index.js +0 -17
- package/dist/serialization/types/ChatCompletionMessageFunctionToolCall.d.ts +0 -16
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +0 -14
- package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +0 -1
- package/serialization/resources/agents/resources/templates/client/requests/index.js +0 -5
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +0 -12
- package/serialization/resources/agents/resources/templates/types/index.d.ts +0 -1
- package/serialization/resources/agents/resources/templates/types/index.js +0 -17
- package/serialization/types/ChatCompletionMessageFunctionToolCall.d.ts +0 -16
- /package/api/resources/{agents/resources/templates → chat}/client/index.d.ts +0 -0
- /package/api/resources/{agents/resources/templates → chat}/client/index.js +0 -0
- /package/api/resources/{agents/resources/templates/client/requests/TemplatesMigrateRequest.js → chat/client/requests/ChatCompletionRequest.js} +0 -0
- /package/api/resources/{agents/resources/templates → chat}/client/requests/index.js +0 -0
- /package/api/resources/{agents/resources/templates → chat}/index.d.ts +0 -0
- /package/api/resources/{agents/resources/templates → chat}/index.js +0 -0
- /package/api/resources/{agents/resources/templates/types/TemplatesMigrateResponse.js → chat/types/ChatCompletionRequestMessagesItem.js} +0 -0
- /package/api/{types/ChatCompletionMessageFunctionToolCall.js → resources/chat/types/ChatCompletionRequestStop.js} +0 -0
- /package/api/{types/Function.js → resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayName.js} +0 -0
- /package/{dist/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js → api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigDisplayNameItem.js} +0 -0
- /package/{dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.js → api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCalls.js} +0 -0
- /package/{dist/api/types/ChatCompletionMessageFunctionToolCall.js → api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemLlmConfigParallelToolCallsItem.js} +0 -0
- /package/{dist/api/types/Function.js → api/resources/templates/types/TemplatesCreateAgentsFromTemplateResponseAgentsItemToolsItemEnableParallelExecution.js} +0 -0
- /package/dist/api/resources/{agents/resources/templates → chat}/client/index.d.ts +0 -0
- /package/dist/api/resources/{agents/resources/templates → chat}/client/index.js +0 -0
- /package/dist/api/resources/{agents/resources/templates → chat}/client/requests/index.js +0 -0
- /package/dist/api/resources/{agents/resources/templates → chat}/index.d.ts +0 -0
- /package/dist/api/resources/{agents/resources/templates → chat}/index.js +0 -0
- /package/dist/serialization/resources/{agents/resources/templates → chat}/client/index.d.ts +0 -0
- /package/dist/serialization/resources/{agents/resources/templates → chat}/client/index.js +0 -0
- /package/dist/serialization/resources/{agents/resources/templates → chat}/index.d.ts +0 -0
- /package/dist/serialization/resources/{agents/resources/templates → chat}/index.js +0 -0
- /package/serialization/resources/{agents/resources/templates → chat}/client/index.d.ts +0 -0
- /package/serialization/resources/{agents/resources/templates → chat}/client/index.js +0 -0
- /package/serialization/resources/{agents/resources/templates → chat}/index.d.ts +0 -0
- /package/serialization/resources/{agents/resources/templates → chat}/index.js +0 -0
package/Client.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { Tools } from "./api/resources/tools/client/Client";
|
|
|
8
8
|
import { Sources } from "./api/resources/sources/client/Client";
|
|
9
9
|
import { Folders } from "./api/resources/folders/client/Client";
|
|
10
10
|
import { Agents } from "./api/resources/agents/client/Client";
|
|
11
|
+
import { Chat } from "./api/resources/chat/client/Client";
|
|
11
12
|
import { Groups } from "./api/resources/groups/client/Client";
|
|
12
13
|
import { Identities } from "./api/resources/identities/client/Client";
|
|
13
14
|
import { Models } from "./api/resources/models/client/Client";
|
|
@@ -54,6 +55,7 @@ export declare class LettaClient {
|
|
|
54
55
|
protected _sources: Sources | undefined;
|
|
55
56
|
protected _folders: Folders | undefined;
|
|
56
57
|
protected _agents: Agents | undefined;
|
|
58
|
+
protected _chat: Chat | undefined;
|
|
57
59
|
protected _groups: Groups | undefined;
|
|
58
60
|
protected _identities: Identities | undefined;
|
|
59
61
|
protected _models: Models | undefined;
|
|
@@ -76,6 +78,7 @@ export declare class LettaClient {
|
|
|
76
78
|
get sources(): Sources;
|
|
77
79
|
get folders(): Folders;
|
|
78
80
|
get agents(): Agents;
|
|
81
|
+
get chat(): Chat;
|
|
79
82
|
get groups(): Groups;
|
|
80
83
|
get identities(): Identities;
|
|
81
84
|
get models(): Models;
|
package/Client.js
CHANGED
|
@@ -9,22 +9,23 @@ const Client_2 = require("./api/resources/tools/client/Client");
|
|
|
9
9
|
const Client_3 = require("./api/resources/sources/client/Client");
|
|
10
10
|
const Client_4 = require("./api/resources/folders/client/Client");
|
|
11
11
|
const Client_5 = require("./api/resources/agents/client/Client");
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
14
|
-
const Client_8 = require("./api/resources/
|
|
15
|
-
const Client_9 = require("./api/resources/
|
|
16
|
-
const Client_10 = require("./api/resources/
|
|
17
|
-
const Client_11 = require("./api/resources/
|
|
18
|
-
const Client_12 = require("./api/resources/
|
|
19
|
-
const Client_13 = require("./api/resources/
|
|
20
|
-
const Client_14 = require("./api/resources/
|
|
21
|
-
const Client_15 = require("./api/resources/
|
|
22
|
-
const Client_16 = require("./api/resources/
|
|
23
|
-
const Client_17 = require("./api/resources/
|
|
24
|
-
const Client_18 = require("./api/resources/
|
|
25
|
-
const Client_19 = require("./api/resources/
|
|
26
|
-
const Client_20 = require("./api/resources/
|
|
27
|
-
const Client_21 = require("./api/resources/
|
|
12
|
+
const Client_6 = require("./api/resources/chat/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/groups/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/identities/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/models/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/blocks/client/Client");
|
|
17
|
+
const Client_11 = require("./api/resources/jobs/client/Client");
|
|
18
|
+
const Client_12 = require("./api/resources/health/client/Client");
|
|
19
|
+
const Client_13 = require("./api/resources/providers/client/Client");
|
|
20
|
+
const Client_14 = require("./api/resources/runs/client/Client");
|
|
21
|
+
const Client_15 = require("./api/resources/steps/client/Client");
|
|
22
|
+
const Client_16 = require("./api/resources/tags/client/Client");
|
|
23
|
+
const Client_17 = require("./api/resources/telemetry/client/Client");
|
|
24
|
+
const Client_18 = require("./api/resources/batches/client/Client");
|
|
25
|
+
const Client_19 = require("./api/resources/voice/client/Client");
|
|
26
|
+
const Client_20 = require("./api/resources/templates/client/Client");
|
|
27
|
+
const Client_21 = require("./api/resources/clientSideAccessTokens/client/Client");
|
|
28
|
+
const Client_22 = require("./api/resources/projects/client/Client");
|
|
28
29
|
class LettaClient {
|
|
29
30
|
constructor(_options = {}) {
|
|
30
31
|
this._options = _options;
|
|
@@ -49,69 +50,73 @@ class LettaClient {
|
|
|
49
50
|
var _a;
|
|
50
51
|
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_5.Agents(this._options)));
|
|
51
52
|
}
|
|
53
|
+
get chat() {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = this._chat) !== null && _a !== void 0 ? _a : (this._chat = new Client_6.Chat(this._options)));
|
|
56
|
+
}
|
|
52
57
|
get groups() {
|
|
53
58
|
var _a;
|
|
54
|
-
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new
|
|
59
|
+
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_7.Groups(this._options)));
|
|
55
60
|
}
|
|
56
61
|
get identities() {
|
|
57
62
|
var _a;
|
|
58
|
-
return ((_a = this._identities) !== null && _a !== void 0 ? _a : (this._identities = new
|
|
63
|
+
return ((_a = this._identities) !== null && _a !== void 0 ? _a : (this._identities = new Client_8.Identities(this._options)));
|
|
59
64
|
}
|
|
60
65
|
get models() {
|
|
61
66
|
var _a;
|
|
62
|
-
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new
|
|
67
|
+
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_9.Models(this._options)));
|
|
63
68
|
}
|
|
64
69
|
get blocks() {
|
|
65
70
|
var _a;
|
|
66
|
-
return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new
|
|
71
|
+
return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new Client_10.Blocks(this._options)));
|
|
67
72
|
}
|
|
68
73
|
get jobs() {
|
|
69
74
|
var _a;
|
|
70
|
-
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new
|
|
75
|
+
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_11.Jobs(this._options)));
|
|
71
76
|
}
|
|
72
77
|
get health() {
|
|
73
78
|
var _a;
|
|
74
|
-
return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new
|
|
79
|
+
return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_12.Health(this._options)));
|
|
75
80
|
}
|
|
76
81
|
get providers() {
|
|
77
82
|
var _a;
|
|
78
|
-
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new
|
|
83
|
+
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_13.Providers(this._options)));
|
|
79
84
|
}
|
|
80
85
|
get runs() {
|
|
81
86
|
var _a;
|
|
82
|
-
return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new
|
|
87
|
+
return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_14.Runs(this._options)));
|
|
83
88
|
}
|
|
84
89
|
get steps() {
|
|
85
90
|
var _a;
|
|
86
|
-
return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new
|
|
91
|
+
return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new Client_15.Steps(this._options)));
|
|
87
92
|
}
|
|
88
93
|
get tags() {
|
|
89
94
|
var _a;
|
|
90
|
-
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new
|
|
95
|
+
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_16.Tags(this._options)));
|
|
91
96
|
}
|
|
92
97
|
get telemetry() {
|
|
93
98
|
var _a;
|
|
94
|
-
return ((_a = this._telemetry) !== null && _a !== void 0 ? _a : (this._telemetry = new
|
|
99
|
+
return ((_a = this._telemetry) !== null && _a !== void 0 ? _a : (this._telemetry = new Client_17.Telemetry(this._options)));
|
|
95
100
|
}
|
|
96
101
|
get batches() {
|
|
97
102
|
var _a;
|
|
98
|
-
return ((_a = this._batches) !== null && _a !== void 0 ? _a : (this._batches = new
|
|
103
|
+
return ((_a = this._batches) !== null && _a !== void 0 ? _a : (this._batches = new Client_18.Batches(this._options)));
|
|
99
104
|
}
|
|
100
105
|
get voice() {
|
|
101
106
|
var _a;
|
|
102
|
-
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new
|
|
107
|
+
return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_19.Voice(this._options)));
|
|
103
108
|
}
|
|
104
109
|
get templates() {
|
|
105
110
|
var _a;
|
|
106
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
111
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_20.Templates(this._options)));
|
|
107
112
|
}
|
|
108
113
|
get clientSideAccessTokens() {
|
|
109
114
|
var _a;
|
|
110
|
-
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new
|
|
115
|
+
return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new Client_21.ClientSideAccessTokens(this._options)));
|
|
111
116
|
}
|
|
112
117
|
get projects() {
|
|
113
118
|
var _a;
|
|
114
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
119
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_22.Projects(this._options)));
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
exports.LettaClient = LettaClient;
|
package/README.md
CHANGED
|
@@ -1,139 +1,369 @@
|
|
|
1
|
-
# Letta TypeScript
|
|
1
|
+
# Letta TypeScript SDK
|
|
2
2
|
|
|
3
|
-
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fletta-ai%2Fletta-node)
|
|
4
3
|
[](https://www.npmjs.com/package/@letta-ai/letta-client)
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Letta is the platform for building stateful agents: open AI with advanced memory that can learn and self-improve over time.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
### Quicklinks:
|
|
8
|
+
* [**Developer Documentation**](https://docs.letta.com): Learn how to create agents using Python or TypeScript
|
|
9
|
+
* [**TypeScript API Reference**](./reference.md): Complete TypeScript SDK documentation
|
|
10
|
+
* [**Agent Development Environment (ADE)**](https://docs.letta.com/guides/ade/overview): A no-code UI for building stateful agents
|
|
11
|
+
* [**Letta Cloud**](https://app.letta.com/): The fastest way to try Letta
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
## Get started
|
|
14
|
+
|
|
15
|
+
Install the Letta TypeScript SDK:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @letta-ai/letta-client
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Simple Hello World example
|
|
22
|
+
|
|
23
|
+
In the example below, we'll create a stateful agent with two memory blocks. We'll initialize the `human` memory block with incorrect information, and correct the agent in our first message - which will trigger the agent to update its own memory with a tool call.
|
|
24
|
+
|
|
25
|
+
*To run the examples, you'll need to get a `LETTA_API_KEY` from [Letta Cloud](https://app.letta.com/api-keys), or run your own self-hosted server (see [our guide](https://docs.letta.com/guides/selfhosting))*
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { LettaClient } from '@letta-ai/letta-client';
|
|
29
|
+
|
|
30
|
+
const client = new LettaClient({ token: "LETTA_API_KEY" });
|
|
31
|
+
// const client = new LettaClient({ baseUrl: "http://localhost:8283" }); // if self-hosting
|
|
32
|
+
|
|
33
|
+
const agentState = await client.agents.create({
|
|
34
|
+
model: "openai/gpt-4o-mini",
|
|
35
|
+
embedding: "openai/text-embedding-3-small",
|
|
36
|
+
memoryBlocks: [
|
|
37
|
+
{
|
|
38
|
+
label: "human",
|
|
39
|
+
value: "The human's name is Chad. They like vibe coding."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "persona",
|
|
43
|
+
value: "My name is Sam, a helpful assistant."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
tools: ["web_search", "run_code"]
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
console.log(agentState.id);
|
|
50
|
+
// agent-d9be...0846
|
|
51
|
+
|
|
52
|
+
const response = await client.agents.messages.create(agentState.id, {
|
|
53
|
+
messages: [
|
|
54
|
+
{
|
|
55
|
+
role: "user",
|
|
56
|
+
content: "Hey, nice to meet you, my name is Brad."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// the agent will think, then edit its memory using a tool
|
|
62
|
+
for (const message of response.messages) {
|
|
63
|
+
console.log(message);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// The content of this memory block will be something like
|
|
67
|
+
// "The human's name is Brad. They like vibe coding."
|
|
68
|
+
// Fetch this block's content with:
|
|
69
|
+
const human_block = await client.agents.blocks.retrieve(agentState.id, "human");
|
|
70
|
+
console.log(human_block.value);
|
|
12
71
|
```
|
|
13
72
|
|
|
14
|
-
##
|
|
73
|
+
## Core concepts in Letta:
|
|
15
74
|
|
|
16
|
-
|
|
75
|
+
Letta is built on the [MemGPT](https://arxiv.org/abs/2310.08560) research paper, which introduced the concept of the "LLM Operating System" for memory management:
|
|
17
76
|
|
|
18
|
-
|
|
77
|
+
1. [**Memory Hierarchy**](https://docs.letta.com/guides/agents/memory): Agents have self-editing memory split between in-context and out-of-context memory
|
|
78
|
+
2. [**Memory Blocks**](https://docs.letta.com/guides/agents/memory-blocks): In-context memory is composed of persistent editable blocks
|
|
79
|
+
3. [**Agentic Context Engineering**](https://docs.letta.com/guides/agents/context-engineering): Agents control their context window using tools to edit, delete, or search memory
|
|
80
|
+
4. [**Perpetual Self-Improving Agents**](https://docs.letta.com/guides/agents/overview): Every agent has a perpetual (infinite) message history
|
|
19
81
|
|
|
20
|
-
|
|
82
|
+
## Local Development
|
|
83
|
+
|
|
84
|
+
Connect to a local Letta server instead of the cloud:
|
|
21
85
|
|
|
22
86
|
```typescript
|
|
23
|
-
|
|
87
|
+
const client = new LettaClient({
|
|
88
|
+
baseUrl: "http://localhost:8283"
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Run Letta locally with Docker:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
docker run \
|
|
96
|
+
-v ~/.letta/.persist/pgdata:/var/lib/postgresql/data \
|
|
97
|
+
-p 8283:8283 \
|
|
98
|
+
-e OPENAI_API_KEY="your_key" \
|
|
99
|
+
letta/letta:latest
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
See the [self-hosting guide](https://docs.letta.com/guides/selfhosting) for more options.
|
|
24
103
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
104
|
+
## Key Features
|
|
105
|
+
|
|
106
|
+
### Memory Management ([full guide](https://docs.letta.com/guides/agents/memory-blocks))
|
|
107
|
+
|
|
108
|
+
Memory blocks are persistent, editable sections of an agent's context window:
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
// Create agent with memory blocks
|
|
112
|
+
const agent = await client.agents.create({
|
|
113
|
+
memoryBlocks: [
|
|
114
|
+
{ label: "persona", value: "I'm a helpful assistant." },
|
|
115
|
+
{ label: "human", value: "User preferences and info." }
|
|
116
|
+
]
|
|
28
117
|
});
|
|
118
|
+
|
|
119
|
+
// Modify blocks manually
|
|
120
|
+
await client.agents.blocks.modify(agent.id, "human", {
|
|
121
|
+
value: "Updated user information"
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Retrieve a block
|
|
125
|
+
const block = await client.agents.blocks.retrieve(agent.id, "human");
|
|
29
126
|
```
|
|
30
127
|
|
|
31
|
-
|
|
128
|
+
### Multi-agent Shared Memory ([full guide](https://docs.letta.com/guides/agents/multi-agent-shared-memory))
|
|
32
129
|
|
|
33
|
-
|
|
34
|
-
|
|
130
|
+
Memory blocks can be attached to multiple agents. All agents will have an up-to-date view on the contents of the memory block -- if one agent modifies it, the other will see it immediately.
|
|
131
|
+
|
|
132
|
+
Here is how to attach a single memory block to multiple agents:
|
|
35
133
|
|
|
36
134
|
```typescript
|
|
37
|
-
|
|
135
|
+
// Create shared block
|
|
136
|
+
const sharedBlock = await client.blocks.create({
|
|
137
|
+
label: "organization",
|
|
138
|
+
value: "Shared team context"
|
|
139
|
+
});
|
|
38
140
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
141
|
+
// Attach to multiple agents
|
|
142
|
+
const agent1 = await client.agents.create({
|
|
143
|
+
memoryBlocks: [{ label: "persona", value: "I am a supervisor" }],
|
|
144
|
+
blockIds: [sharedBlock.id]
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const agent2 = await client.agents.create({
|
|
148
|
+
memoryBlocks: [{ label: "persona", value: "I am a worker" }],
|
|
149
|
+
blockIds: [sharedBlock.id]
|
|
150
|
+
});
|
|
42
151
|
```
|
|
43
152
|
|
|
44
|
-
|
|
153
|
+
### Sleep-time Agents ([full guide](https://docs.letta.com/guides/agents/architectures/sleeptime))
|
|
45
154
|
|
|
46
|
-
|
|
47
|
-
will be thrown.
|
|
155
|
+
Background agents that share memory with your primary agent:
|
|
48
156
|
|
|
49
157
|
```typescript
|
|
50
|
-
|
|
158
|
+
const agent = await client.agents.create({
|
|
159
|
+
model: "openai/gpt-4o-mini",
|
|
160
|
+
enableSleeptime: true // creates a sleep-time agent
|
|
161
|
+
});
|
|
162
|
+
```
|
|
51
163
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
164
|
+
### Agent File Import/Export ([full guide](https://docs.letta.com/guides/agents/agent-file))
|
|
165
|
+
|
|
166
|
+
Save and share agents with the `.af` file format:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { readFileSync } from 'fs';
|
|
170
|
+
|
|
171
|
+
// Import agent
|
|
172
|
+
const file = new Blob([readFileSync('/path/to/agent.af')]);
|
|
173
|
+
const agent = await client.agents.importAgentSerialized(file);
|
|
174
|
+
|
|
175
|
+
// Export agent
|
|
176
|
+
const schema = await client.agents.exportAgentSerialized(agent.id);
|
|
62
177
|
```
|
|
63
178
|
|
|
64
|
-
|
|
179
|
+
### MCP Tools ([full guide](https://docs.letta.com/guides/mcp/overview))
|
|
180
|
+
|
|
181
|
+
Connect to Model Context Protocol servers:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
// Add tool from MCP server
|
|
185
|
+
const tool = await client.tools.addMcpTool("weather-server", "get_weather");
|
|
186
|
+
|
|
187
|
+
// Create agent with MCP tool
|
|
188
|
+
const agent = await client.agents.create({
|
|
189
|
+
model: "openai/gpt-4o-mini",
|
|
190
|
+
toolIds: [tool.id]
|
|
191
|
+
});
|
|
192
|
+
```
|
|
65
193
|
|
|
66
|
-
###
|
|
194
|
+
### Filesystem ([full guide](https://docs.letta.com/guides/agents/filesystem))
|
|
67
195
|
|
|
68
|
-
|
|
196
|
+
Give agents access to files:
|
|
69
197
|
|
|
70
198
|
```typescript
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
199
|
+
import { createReadStream } from 'fs';
|
|
200
|
+
|
|
201
|
+
// Get an available embedding config
|
|
202
|
+
const embeddingConfigs = await client.embeddingModels.list();
|
|
203
|
+
|
|
204
|
+
// Create folder and upload file
|
|
205
|
+
const folder = await client.folders.create({
|
|
206
|
+
name: "my_folder",
|
|
207
|
+
embeddingConfig: embeddingConfigs[0]
|
|
75
208
|
});
|
|
209
|
+
await client.folders.files.upload(createReadStream("file.txt"), folder.id);
|
|
210
|
+
|
|
211
|
+
// Attach to agent
|
|
212
|
+
await client.agents.folders.attach(agent.id, folder.id);
|
|
76
213
|
```
|
|
77
214
|
|
|
78
|
-
###
|
|
215
|
+
### Long-running Agents ([full guide](https://docs.letta.com/guides/agents/long-running))
|
|
216
|
+
|
|
217
|
+
Background execution with resumable streaming:
|
|
79
218
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
219
|
+
```typescript
|
|
220
|
+
const stream = await client.agents.messages.createStream(agent.id, {
|
|
221
|
+
messages: [{ role: "user", content: "Analyze this dataset" }],
|
|
222
|
+
background: true
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
let runId, lastSeqId;
|
|
226
|
+
for await (const chunk of stream) {
|
|
227
|
+
runId = chunk.runId;
|
|
228
|
+
lastSeqId = chunk.seqId;
|
|
229
|
+
}
|
|
83
230
|
|
|
84
|
-
|
|
231
|
+
// Resume if disconnected
|
|
232
|
+
for await (const chunk of client.runs.stream(runId, { startingAfter: lastSeqId })) {
|
|
233
|
+
console.log(chunk);
|
|
234
|
+
}
|
|
235
|
+
```
|
|
85
236
|
|
|
86
|
-
|
|
87
|
-
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
88
|
-
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
237
|
+
### Streaming ([full guide](https://docs.letta.com/guides/agents/streaming))
|
|
89
238
|
|
|
90
|
-
|
|
239
|
+
Stream responses in real-time:
|
|
91
240
|
|
|
92
241
|
```typescript
|
|
93
|
-
const
|
|
94
|
-
|
|
242
|
+
const stream = await client.agents.messages.createStream(agent.id, {
|
|
243
|
+
messages: [{ role: "user", content: "Hello!" }]
|
|
95
244
|
});
|
|
245
|
+
|
|
246
|
+
for await (const chunk of stream) {
|
|
247
|
+
console.log(chunk);
|
|
248
|
+
}
|
|
96
249
|
```
|
|
97
250
|
|
|
98
|
-
###
|
|
251
|
+
### Message Types ([full guide](https://docs.letta.com/guides/agents/message-types))
|
|
252
|
+
|
|
253
|
+
Agent responses contain different message types. Handle them with the `messageType` discriminator:
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
const messages = await client.agents.messages.list(agent.id);
|
|
257
|
+
|
|
258
|
+
for (const message of messages) {
|
|
259
|
+
switch (message.messageType) {
|
|
260
|
+
case "user_message":
|
|
261
|
+
console.log("User:", message.content);
|
|
262
|
+
break;
|
|
263
|
+
case "assistant_message":
|
|
264
|
+
console.log("Agent:", message.content);
|
|
265
|
+
break;
|
|
266
|
+
case "reasoning_message":
|
|
267
|
+
console.log("Reasoning:", message.reasoning);
|
|
268
|
+
break;
|
|
269
|
+
case "tool_call_message":
|
|
270
|
+
console.log("Tool:", message.toolCall.name);
|
|
271
|
+
break;
|
|
272
|
+
case "tool_return_message":
|
|
273
|
+
console.log("Result:", message.toolReturn);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## TypeScript Support
|
|
99
280
|
|
|
100
|
-
|
|
281
|
+
Full TypeScript support with exported types:
|
|
101
282
|
|
|
102
283
|
```typescript
|
|
103
|
-
|
|
104
|
-
|
|
284
|
+
import { Letta } from "@letta-ai/letta-client";
|
|
285
|
+
|
|
286
|
+
const request: Letta.CreateAgentRequest = {
|
|
287
|
+
model: "openai/gpt-4o-mini",
|
|
288
|
+
memoryBlocks: [...]
|
|
289
|
+
};
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Error Handling
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
import { LettaError } from "@letta-ai/letta-client";
|
|
296
|
+
|
|
297
|
+
try {
|
|
298
|
+
await client.agents.messages.create(agentId, {...});
|
|
299
|
+
} catch (err) {
|
|
300
|
+
if (err instanceof LettaError) {
|
|
301
|
+
console.log(err.statusCode);
|
|
302
|
+
console.log(err.message);
|
|
303
|
+
console.log(err.body);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Advanced Configuration
|
|
309
|
+
|
|
310
|
+
### Retries
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
const response = await client.agents.create({...}, {
|
|
314
|
+
maxRetries: 3 // Default: 2
|
|
105
315
|
});
|
|
106
316
|
```
|
|
107
317
|
|
|
108
|
-
###
|
|
318
|
+
### Timeouts
|
|
319
|
+
|
|
320
|
+
```typescript
|
|
321
|
+
const response = await client.agents.create({...}, {
|
|
322
|
+
timeoutInSeconds: 30 // Default: 60
|
|
323
|
+
});
|
|
324
|
+
```
|
|
109
325
|
|
|
110
|
-
|
|
326
|
+
### Custom Headers
|
|
111
327
|
|
|
112
328
|
```typescript
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
329
|
+
const response = await client.agents.create({...}, {
|
|
330
|
+
headers: {
|
|
331
|
+
'X-Custom-Header': 'value'
|
|
332
|
+
}
|
|
116
333
|
});
|
|
117
|
-
controller.abort(); // aborts the request
|
|
118
334
|
```
|
|
119
335
|
|
|
120
|
-
###
|
|
336
|
+
### Abort Requests
|
|
121
337
|
|
|
122
|
-
|
|
123
|
-
|
|
338
|
+
```typescript
|
|
339
|
+
const controller = new AbortController();
|
|
340
|
+
const response = await client.agents.create({...}, {
|
|
341
|
+
abortSignal: controller.signal
|
|
342
|
+
});
|
|
343
|
+
controller.abort();
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Raw Response Access
|
|
124
347
|
|
|
125
348
|
```typescript
|
|
126
|
-
const { data, rawResponse } = await client.
|
|
349
|
+
const { data, rawResponse } = await client.agents
|
|
350
|
+
.create({...})
|
|
351
|
+
.withRawResponse();
|
|
127
352
|
|
|
128
|
-
console.log(data);
|
|
129
353
|
console.log(rawResponse.headers['X-My-Header']);
|
|
130
354
|
```
|
|
131
355
|
|
|
132
|
-
###
|
|
356
|
+
### Custom Fetch Client
|
|
133
357
|
|
|
134
|
-
|
|
135
|
-
|
|
358
|
+
```typescript
|
|
359
|
+
const client = new LettaClient({
|
|
360
|
+
fetcher: yourCustomFetchImplementation
|
|
361
|
+
});
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## Runtime Compatibility
|
|
136
365
|
|
|
366
|
+
Works in:
|
|
137
367
|
- Node.js 18+
|
|
138
368
|
- Vercel
|
|
139
369
|
- Cloudflare Workers
|
|
@@ -141,26 +371,28 @@ runtimes:
|
|
|
141
371
|
- Bun 1.0+
|
|
142
372
|
- React Native
|
|
143
373
|
|
|
144
|
-
|
|
374
|
+
## Contributing
|
|
145
375
|
|
|
146
|
-
|
|
147
|
-
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
376
|
+
Letta is an open source project built by over a hundred contributors. There are many ways to get involved in the Letta OSS project!
|
|
148
377
|
|
|
149
|
-
|
|
150
|
-
|
|
378
|
+
* [**Join the Discord**](https://discord.gg/letta): Chat with the Letta devs and other AI developers.
|
|
379
|
+
* [**Chat on our forum**](https://forum.letta.com/): If you're not into Discord, check out our developer forum.
|
|
380
|
+
* **Follow our socials**: [Twitter/X](https://twitter.com/Letta_AI), [LinkedIn](https://www.linkedin.com/company/letta-ai/), [YouTube](https://www.youtube.com/@letta-ai)
|
|
151
381
|
|
|
152
|
-
|
|
153
|
-
...
|
|
154
|
-
fetcher: // provide your implementation here
|
|
155
|
-
});
|
|
156
|
-
```
|
|
382
|
+
This SDK is generated programmatically. For SDK changes, please [open an issue](https://github.com/letta-ai/letta-node/issues).
|
|
157
383
|
|
|
158
|
-
|
|
384
|
+
README contributions are always welcome!
|
|
385
|
+
|
|
386
|
+
## Resources
|
|
387
|
+
|
|
388
|
+
- [Documentation](https://docs.letta.com)
|
|
389
|
+
- [TypeScript API Reference](./reference.md)
|
|
390
|
+
- [Example Applications](https://github.com/letta-ai/letta-chatbot-example)
|
|
391
|
+
|
|
392
|
+
## License
|
|
393
|
+
|
|
394
|
+
MIT
|
|
159
395
|
|
|
160
|
-
|
|
161
|
-
Additions made directly to this library would have to be moved over to our generation code,
|
|
162
|
-
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
163
|
-
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
164
|
-
an issue first to discuss with us!
|
|
396
|
+
---
|
|
165
397
|
|
|
166
|
-
|
|
398
|
+
***Legal notices**: By using Letta and related Letta services (such as the Letta endpoint or hosted service), you are agreeing to our [privacy policy](https://www.letta.com/privacy-policy) and [terms of service](https://www.letta.com/terms-of-service).*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as core from "../../core";
|
|
6
|
+
export declare class GoneError extends errors.LettaError {
|
|
7
|
+
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
|
+
}
|