@letta-ai/letta-client 0.1.8 → 0.1.11
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 +5 -0
- package/Client.js +5 -0
- package/README.md +9 -9
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/agents/client/Client.d.ts +4 -7
- package/api/resources/agents/client/Client.js +54 -46
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +7 -8
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/context/client/Client.js +20 -10
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/api/resources/agents/resources/index.js +17 -7
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/api/resources/agents/resources/messages/client/Client.d.ts +8 -6
- package/api/resources/agents/resources/messages/client/Client.js +42 -32
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/api/resources/agents/resources/messages/types/index.js +0 -1
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/api/resources/agents/types/index.d.ts +1 -0
- package/api/resources/agents/types/index.js +1 -0
- package/api/resources/blocks/client/Client.d.ts +2 -0
- package/api/resources/blocks/client/Client.js +40 -30
- package/api/resources/health/client/Client.d.ts +2 -0
- package/api/resources/health/client/Client.js +20 -10
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +20 -8
- package/api/resources/jobs/client/Client.d.ts +2 -0
- package/api/resources/jobs/client/Client.js +31 -21
- package/api/resources/models/client/Client.d.ts +2 -0
- package/api/resources/models/client/Client.js +23 -13
- package/api/resources/providers/client/Client.d.ts +2 -0
- package/api/resources/providers/client/Client.js +31 -21
- package/api/resources/runs/client/Client.d.ts +8 -8
- package/api/resources/runs/client/Client.js +43 -58
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/api/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/sources/client/Client.js +43 -33
- package/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/files/client/Client.js +28 -18
- package/api/resources/sources/resources/index.js +17 -7
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/api/resources/tag/client/Client.d.ts +44 -0
- package/api/resources/tag/client/Client.js +146 -0
- package/api/resources/tag/client/index.d.ts +1 -0
- package/api/resources/tag/client/index.js +17 -0
- package/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/api/resources/tag/client/requests/index.d.ts +1 -0
- package/api/resources/tag/client/requests/index.js +2 -0
- package/api/resources/tag/index.d.ts +1 -0
- package/api/resources/tag/index.js +17 -0
- package/api/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/tools/client/Client.js +57 -47
- package/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/api/types/AgentType.d.ts +1 -1
- package/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/api/types/JobStatus.d.ts +1 -1
- package/api/types/JobType.d.ts +1 -1
- package/api/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +2 -2
- package/api/types/LettaRequest.d.ts +2 -6
- package/api/types/LettaRequestConfig.d.ts +11 -0
- package/api/types/LettaResponse.d.ts +1 -1
- package/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/api/types/LlmConfigModelEndpointType.js +1 -0
- package/api/types/MessageCreateRole.d.ts +1 -1
- package/api/types/MessageRole.d.ts +1 -1
- package/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/api/types/Run.d.ts +2 -0
- package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/api/types/SandboxType.d.ts +1 -1
- package/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/api/types/ToolRuleType.d.ts +1 -1
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/UserMessageInputContent.d.ts +1 -1
- package/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/api/types/index.d.ts +2 -1
- package/api/types/index.js +2 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +2 -2
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +3 -4
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +3 -4
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/core/form-data-utils/FormDataWrapper.js +22 -12
- package/core/index.js +17 -7
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +5 -5
- package/core/schemas/builders/bigint/bigint.js +1 -2
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +2 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +11 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/dist/Client.d.ts +5 -0
- package/dist/Client.js +5 -0
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/agents/client/Client.d.ts +4 -7
- package/dist/api/resources/agents/client/Client.js +54 -46
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +7 -8
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/dist/api/resources/agents/resources/index.js +17 -7
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +8 -6
- package/dist/api/resources/agents/resources/messages/client/Client.js +42 -32
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js +5 -0
- package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/dist/api/resources/agents/types/index.d.ts +1 -0
- package/dist/api/resources/agents/types/index.js +1 -0
- package/dist/api/resources/blocks/client/Client.d.ts +2 -0
- package/dist/api/resources/blocks/client/Client.js +40 -30
- package/dist/api/resources/health/client/Client.d.ts +2 -0
- package/dist/api/resources/health/client/Client.js +20 -10
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +20 -8
- package/dist/api/resources/jobs/client/Client.d.ts +2 -0
- package/dist/api/resources/jobs/client/Client.js +31 -21
- package/dist/api/resources/models/client/Client.d.ts +2 -0
- package/dist/api/resources/models/client/Client.js +23 -13
- package/dist/api/resources/providers/client/Client.d.ts +2 -0
- package/dist/api/resources/providers/client/Client.js +31 -21
- package/dist/api/resources/runs/client/Client.d.ts +8 -8
- package/dist/api/resources/runs/client/Client.js +43 -58
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/dist/api/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/client/Client.js +43 -33
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/files/client/Client.js +28 -18
- package/dist/api/resources/sources/resources/index.js +17 -7
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/dist/api/resources/tag/client/Client.d.ts +44 -0
- package/dist/api/resources/tag/client/Client.js +146 -0
- package/dist/api/resources/tag/client/index.d.ts +1 -0
- package/dist/api/resources/tag/client/index.js +17 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
- package/dist/api/resources/tag/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tag/client/requests/index.js +2 -0
- package/dist/api/resources/tag/index.d.ts +1 -0
- package/dist/api/resources/tag/index.js +17 -0
- package/dist/api/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/tools/client/Client.js +57 -47
- package/dist/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/dist/api/types/AgentType.d.ts +1 -1
- package/dist/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/dist/api/types/JobStatus.d.ts +1 -1
- package/dist/api/types/JobType.d.ts +1 -1
- package/dist/api/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +2 -2
- package/dist/api/types/LettaMessageUnion.js +5 -0
- package/dist/api/types/LettaRequest.d.ts +2 -6
- package/dist/api/types/LettaRequestConfig.d.ts +11 -0
- package/dist/api/types/LettaRequestConfig.js +5 -0
- package/dist/api/types/LettaResponse.d.ts +1 -1
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/dist/api/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/api/types/MessageCreateRole.d.ts +1 -1
- package/dist/api/types/MessageRole.d.ts +1 -1
- package/dist/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/dist/api/types/Run.d.ts +2 -0
- package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/dist/api/types/SandboxType.d.ts +1 -1
- package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/dist/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/dist/api/types/ToolRuleType.d.ts +1 -1
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/UserMessageInputContent.d.ts +1 -1
- package/dist/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/dist/api/types/index.d.ts +2 -1
- package/dist/api/types/index.js +2 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +2 -2
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +3 -4
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +3 -4
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
- package/dist/core/index.js +17 -7
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +5 -5
- package/dist/core/schemas/builders/bigint/bigint.js +1 -2
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +2 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +11 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/environments.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/agents/client/index.js +17 -7
- package/dist/serialization/resources/agents/client/list.js +17 -7
- package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -1
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -8
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/dist/serialization/resources/agents/resources/index.js +17 -7
- package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +19 -10
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +19 -9
- package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/dist/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +19 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js +44 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/dist/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/dist/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/dist/serialization/resources/agents/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/types/index.js +1 -0
- package/dist/serialization/resources/blocks/client/index.js +17 -7
- package/dist/serialization/resources/blocks/client/list.js +17 -7
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +19 -8
- package/dist/serialization/resources/jobs/client/index.js +17 -7
- package/dist/serialization/resources/jobs/client/list.js +17 -7
- package/dist/serialization/resources/jobs/client/listActive.js +17 -7
- package/dist/serialization/resources/models/client/index.js +17 -7
- package/dist/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/dist/serialization/resources/models/client/listLlms.js +17 -7
- package/dist/serialization/resources/providers/client/index.js +17 -7
- package/dist/serialization/resources/providers/client/listProviders.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/dist/serialization/resources/runs/client/getRunMessages.js +19 -9
- package/dist/serialization/resources/runs/client/index.js +17 -7
- package/dist/serialization/resources/runs/client/listActiveRuns.js +17 -7
- package/dist/serialization/resources/runs/client/listRuns.js +17 -7
- package/dist/serialization/resources/sources/client/getByName.js +17 -7
- package/dist/serialization/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/sources/client/list.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/dist/serialization/resources/sources/resources/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/dist/serialization/resources/tag/client/index.d.ts +1 -0
- package/dist/serialization/resources/tag/client/index.js +37 -0
- package/dist/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/dist/serialization/resources/tag/client/listTags.js +41 -0
- package/dist/serialization/resources/tag/index.d.ts +1 -0
- package/dist/serialization/resources/tag/index.js +17 -0
- package/dist/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/dist/serialization/resources/tools/client/getByName.js +17 -7
- package/dist/serialization/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +17 -7
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +17 -7
- package/dist/serialization/types/ActionModel.js +17 -7
- package/dist/serialization/types/ActionParametersModel.js +17 -7
- package/dist/serialization/types/ActionResponseModel.js +17 -7
- package/dist/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/dist/serialization/types/AgentState.js +17 -7
- package/dist/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/dist/serialization/types/AgentType.js +17 -7
- package/dist/serialization/types/AppAuthScheme.js +17 -7
- package/dist/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/dist/serialization/types/AppModel.js +17 -7
- package/dist/serialization/types/ArchivalMemorySummary.js +17 -7
- package/dist/serialization/types/AssistantFile.js +17 -7
- package/dist/serialization/types/AssistantMessageInput.js +17 -7
- package/dist/serialization/types/AssistantMessageOutput.js +17 -7
- package/dist/serialization/types/AuthRequest.js +17 -7
- package/dist/serialization/types/AuthResponse.js +17 -7
- package/dist/serialization/types/AuthSchemeField.js +17 -7
- package/dist/serialization/types/Block.js +17 -7
- package/dist/serialization/types/BlockUpdate.js +17 -7
- package/dist/serialization/types/ChatCompletionRequest.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/dist/serialization/types/ChatCompletionResponse.js +17 -7
- package/dist/serialization/types/ChildToolRule.js +17 -7
- package/dist/serialization/types/Choice.js +17 -7
- package/dist/serialization/types/ConditionalToolRule.js +17 -7
- package/dist/serialization/types/ConflictErrorBody.js +17 -7
- package/dist/serialization/types/ContextWindowOverview.js +17 -7
- package/dist/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/dist/serialization/types/CreateAssistantRequest.js +17 -7
- package/dist/serialization/types/CreateBlock.js +17 -7
- package/dist/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/dist/serialization/types/DeleteAssistantResponse.js +17 -7
- package/dist/serialization/types/E2BSandboxConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +18 -7
- package/dist/serialization/types/FileMetadata.js +17 -7
- package/dist/serialization/types/FunctionCallInput.js +17 -7
- package/dist/serialization/types/FunctionCallOutput.js +17 -7
- package/dist/serialization/types/FunctionSchema.js +17 -7
- package/dist/serialization/types/Health.js +17 -7
- package/dist/serialization/types/HttpValidationError.js +17 -7
- package/dist/serialization/types/InitToolRule.js +17 -7
- package/dist/serialization/types/InternalServerErrorBody.js +17 -7
- package/dist/serialization/types/Job.js +17 -7
- package/dist/serialization/types/JobStatus.js +17 -7
- package/dist/serialization/types/JobType.js +17 -7
- package/dist/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/{serialization/types/LettaResponseMessagesItem.js → dist/serialization/types/LettaMessageUnion.js} +19 -9
- package/dist/serialization/types/LettaRequest.d.ts +2 -3
- package/dist/serialization/types/LettaRequest.js +19 -10
- package/dist/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/dist/serialization/types/LettaRequestConfig.js +45 -0
- package/dist/serialization/types/LettaResponse.d.ts +2 -2
- package/dist/serialization/types/LettaResponse.js +19 -9
- package/dist/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/dist/serialization/types/LettaSchemasToolTool.js +17 -7
- package/dist/serialization/types/LettaUsageStatistics.js +17 -7
- package/dist/serialization/types/LlmConfig.js +17 -7
- package/dist/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/serialization/types/LlmConfigModelEndpointType.js +18 -7
- package/dist/serialization/types/LocalSandboxConfig.js +17 -7
- package/dist/serialization/types/LogProbToken.js +17 -7
- package/dist/serialization/types/Memory.js +17 -7
- package/dist/serialization/types/MessageContentLogProb.js +17 -7
- package/dist/serialization/types/MessageCreate.js +17 -7
- package/dist/serialization/types/MessageCreateRole.js +17 -7
- package/dist/serialization/types/MessageRole.js +17 -7
- package/dist/serialization/types/NotFoundErrorBody.js +17 -7
- package/dist/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/dist/serialization/types/OpenAiAssistant.js +17 -7
- package/dist/serialization/types/Organization.js +17 -7
- package/dist/serialization/types/OrganizationCreate.js +17 -7
- package/dist/serialization/types/Passage.js +17 -7
- package/dist/serialization/types/Provider.js +17 -7
- package/dist/serialization/types/ReasoningMessage.js +17 -7
- package/dist/serialization/types/RecallMemorySummary.js +17 -7
- package/dist/serialization/types/ResponseFormat.js +17 -7
- package/dist/serialization/types/Run.d.ts +2 -0
- package/dist/serialization/types/Run.js +19 -7
- package/dist/serialization/types/SandboxConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigCreate.js +17 -7
- package/dist/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdate.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/dist/serialization/types/SandboxType.js +17 -7
- package/dist/serialization/types/Source.js +17 -7
- package/dist/serialization/types/SystemMessageInput.js +17 -7
- package/dist/serialization/types/SystemMessageOutput.js +17 -7
- package/dist/serialization/types/TerminalToolRule.js +17 -7
- package/dist/serialization/types/ToolCallDelta.js +17 -7
- package/dist/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/dist/serialization/types/ToolCallMessage.js +17 -7
- package/dist/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/dist/serialization/types/ToolCreate.js +17 -7
- package/dist/serialization/types/ToolFunctionChoice.js +17 -7
- package/dist/serialization/types/ToolInput.js +17 -7
- package/dist/serialization/types/ToolMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/dist/serialization/types/ToolRuleType.js +17 -7
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +18 -7
- package/dist/serialization/types/UsageStatistics.js +17 -7
- package/dist/serialization/types/User.js +17 -7
- package/dist/serialization/types/UserCreate.js +17 -7
- package/dist/serialization/types/UserMessageInput.js +17 -7
- package/dist/serialization/types/UserMessageInputContent.js +17 -7
- package/dist/serialization/types/UserMessageOutput.js +17 -7
- package/dist/serialization/types/UserUpdate.js +17 -7
- package/dist/serialization/types/ValidationError.js +17 -7
- package/dist/serialization/types/ValidationErrorLocItem.js +17 -7
- package/dist/serialization/types/index.d.ts +2 -1
- package/dist/serialization/types/index.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +17 -16
- package/reference.md +78 -22
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/agents/client/index.js +17 -7
- package/serialization/resources/agents/client/list.js +17 -7
- package/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -1
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -8
- package/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/serialization/resources/agents/resources/index.js +17 -7
- package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +19 -10
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +19 -9
- package/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +19 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js +44 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/serialization/resources/agents/types/index.d.ts +1 -0
- package/serialization/resources/agents/types/index.js +1 -0
- package/serialization/resources/blocks/client/index.js +17 -7
- package/serialization/resources/blocks/client/list.js +17 -7
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +19 -8
- package/serialization/resources/jobs/client/index.js +17 -7
- package/serialization/resources/jobs/client/list.js +17 -7
- package/serialization/resources/jobs/client/listActive.js +17 -7
- package/serialization/resources/models/client/index.js +17 -7
- package/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/serialization/resources/models/client/listLlms.js +17 -7
- package/serialization/resources/providers/client/index.js +17 -7
- package/serialization/resources/providers/client/listProviders.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/serialization/resources/runs/client/getRunMessages.js +19 -9
- package/serialization/resources/runs/client/index.js +17 -7
- package/serialization/resources/runs/client/listActiveRuns.js +17 -7
- package/serialization/resources/runs/client/listRuns.js +17 -7
- package/serialization/resources/sources/client/getByName.js +17 -7
- package/serialization/resources/sources/client/index.js +17 -7
- package/serialization/resources/sources/client/list.js +17 -7
- package/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/serialization/resources/sources/resources/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/serialization/resources/tag/client/index.d.ts +1 -0
- package/serialization/resources/tag/client/index.js +37 -0
- package/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/serialization/resources/tag/client/listTags.js +41 -0
- package/serialization/resources/tag/index.d.ts +1 -0
- package/serialization/resources/tag/index.js +17 -0
- package/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/serialization/resources/tools/client/getByName.js +17 -7
- package/serialization/resources/tools/client/index.js +17 -7
- package/serialization/resources/tools/client/list.js +17 -7
- package/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +17 -7
- package/serialization/resources/tools/client/requests/ToolUpdate.js +17 -7
- package/serialization/types/ActionModel.js +17 -7
- package/serialization/types/ActionParametersModel.js +17 -7
- package/serialization/types/ActionResponseModel.js +17 -7
- package/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/serialization/types/AgentState.js +17 -7
- package/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/serialization/types/AgentType.js +17 -7
- package/serialization/types/AppAuthScheme.js +17 -7
- package/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/serialization/types/AppModel.js +17 -7
- package/serialization/types/ArchivalMemorySummary.js +17 -7
- package/serialization/types/AssistantFile.js +17 -7
- package/serialization/types/AssistantMessageInput.js +17 -7
- package/serialization/types/AssistantMessageOutput.js +17 -7
- package/serialization/types/AuthRequest.js +17 -7
- package/serialization/types/AuthResponse.js +17 -7
- package/serialization/types/AuthSchemeField.js +17 -7
- package/serialization/types/Block.js +17 -7
- package/serialization/types/BlockUpdate.js +17 -7
- package/serialization/types/ChatCompletionRequest.js +17 -7
- package/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/serialization/types/ChatCompletionResponse.js +17 -7
- package/serialization/types/ChildToolRule.js +17 -7
- package/serialization/types/Choice.js +17 -7
- package/serialization/types/ConditionalToolRule.js +17 -7
- package/serialization/types/ConflictErrorBody.js +17 -7
- package/serialization/types/ContextWindowOverview.js +17 -7
- package/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/serialization/types/CreateAssistantRequest.js +17 -7
- package/serialization/types/CreateBlock.js +17 -7
- package/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/serialization/types/DeleteAssistantResponse.js +17 -7
- package/serialization/types/E2BSandboxConfig.js +17 -7
- package/serialization/types/EmbeddingConfig.js +17 -7
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +18 -7
- package/serialization/types/FileMetadata.js +17 -7
- package/serialization/types/FunctionCallInput.js +17 -7
- package/serialization/types/FunctionCallOutput.js +17 -7
- package/serialization/types/FunctionSchema.js +17 -7
- package/serialization/types/Health.js +17 -7
- package/serialization/types/HttpValidationError.js +17 -7
- package/serialization/types/InitToolRule.js +17 -7
- package/serialization/types/InternalServerErrorBody.js +17 -7
- package/serialization/types/Job.js +17 -7
- package/serialization/types/JobStatus.js +17 -7
- package/serialization/types/JobType.js +17 -7
- package/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/{dist/serialization/types/LettaResponseMessagesItem.js → serialization/types/LettaMessageUnion.js} +19 -9
- package/serialization/types/LettaRequest.d.ts +2 -3
- package/serialization/types/LettaRequest.js +19 -10
- package/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/serialization/types/LettaRequestConfig.js +45 -0
- package/serialization/types/LettaResponse.d.ts +2 -2
- package/serialization/types/LettaResponse.js +19 -9
- package/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/serialization/types/LettaSchemasToolTool.js +17 -7
- package/serialization/types/LettaUsageStatistics.js +17 -7
- package/serialization/types/LlmConfig.js +17 -7
- package/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/serialization/types/LlmConfigModelEndpointType.js +18 -7
- package/serialization/types/LocalSandboxConfig.js +17 -7
- package/serialization/types/LogProbToken.js +17 -7
- package/serialization/types/Memory.js +17 -7
- package/serialization/types/MessageContentLogProb.js +17 -7
- package/serialization/types/MessageCreate.js +17 -7
- package/serialization/types/MessageCreateRole.js +17 -7
- package/serialization/types/MessageRole.js +17 -7
- package/serialization/types/NotFoundErrorBody.js +17 -7
- package/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/serialization/types/OpenAiAssistant.js +17 -7
- package/serialization/types/Organization.js +17 -7
- package/serialization/types/OrganizationCreate.js +17 -7
- package/serialization/types/Passage.js +17 -7
- package/serialization/types/Provider.js +17 -7
- package/serialization/types/ReasoningMessage.js +17 -7
- package/serialization/types/RecallMemorySummary.js +17 -7
- package/serialization/types/ResponseFormat.js +17 -7
- package/serialization/types/Run.d.ts +2 -0
- package/serialization/types/Run.js +19 -7
- package/serialization/types/SandboxConfig.js +17 -7
- package/serialization/types/SandboxConfigCreate.js +17 -7
- package/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/serialization/types/SandboxConfigUpdate.js +17 -7
- package/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/serialization/types/SandboxType.js +17 -7
- package/serialization/types/Source.js +17 -7
- package/serialization/types/SystemMessageInput.js +17 -7
- package/serialization/types/SystemMessageOutput.js +17 -7
- package/serialization/types/TerminalToolRule.js +17 -7
- package/serialization/types/ToolCallDelta.js +17 -7
- package/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/serialization/types/ToolCallMessage.js +17 -7
- package/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/serialization/types/ToolCreate.js +17 -7
- package/serialization/types/ToolFunctionChoice.js +17 -7
- package/serialization/types/ToolInput.js +17 -7
- package/serialization/types/ToolMessage.js +17 -7
- package/serialization/types/ToolReturnMessage.js +17 -7
- package/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/serialization/types/ToolRuleType.js +17 -7
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +18 -7
- package/serialization/types/UsageStatistics.js +17 -7
- package/serialization/types/User.js +17 -7
- package/serialization/types/UserCreate.js +17 -7
- package/serialization/types/UserMessageInput.js +17 -7
- package/serialization/types/UserMessageInputContent.js +17 -7
- package/serialization/types/UserMessageOutput.js +17 -7
- package/serialization/types/UserUpdate.js +17 -7
- package/serialization/types/ValidationError.js +17 -7
- package/serialization/types/ValidationErrorLocItem.js +17 -7
- package/serialization/types/index.d.ts +2 -1
- package/serialization/types/index.js +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -49
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -49
- /package/api/resources/agents/{resources/messages/types/MessagesListResponseItem.js → types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/api/{types/LettaResponseMessagesItem.js → resources/tag/client/requests/ListTagsRequest.js} +0 -0
- /package/{dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.js → api/types/LettaMessageUnion.js} +0 -0
- /package/{dist/api/types/LettaResponseMessagesItem.js → api/types/LettaRequestConfig.js} +0 -0
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace MemoryVariables {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -63,12 +73,12 @@ class MemoryVariables {
|
|
|
63
73
|
* await client.agents.memoryVariables.get("agent_id")
|
|
64
74
|
*/
|
|
65
75
|
get(agentId, requestOptions) {
|
|
66
|
-
var _a, _b;
|
|
67
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b, _c;
|
|
68
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
69
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
79
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/variables`),
|
|
70
80
|
method: "GET",
|
|
71
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
72
82
|
contentType: "application/json",
|
|
73
83
|
requestType: "json",
|
|
74
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace Messages {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -48,14 +50,14 @@ export declare class Messages {
|
|
|
48
50
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
49
51
|
*
|
|
50
52
|
* @example
|
|
51
|
-
* await client.agents.messages.
|
|
53
|
+
* await client.agents.messages.send("agent_id", {
|
|
52
54
|
* messages: [{
|
|
53
55
|
* role: "user",
|
|
54
56
|
* text: "text"
|
|
55
57
|
* }]
|
|
56
58
|
* })
|
|
57
59
|
*/
|
|
58
|
-
|
|
60
|
+
send(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.LettaResponse>;
|
|
59
61
|
/**
|
|
60
62
|
* Update the details of a message associated with an agent.
|
|
61
63
|
*
|
|
@@ -77,8 +79,8 @@ export declare class Messages {
|
|
|
77
79
|
*/
|
|
78
80
|
stream(agentId: string, request: Letta.agents.LettaStreamingRequest, requestOptions?: Messages.RequestOptions): Promise<core.Stream<Letta.agents.LettaStreamingResponse>>;
|
|
79
81
|
/**
|
|
80
|
-
* Asynchronously process a user message and return a
|
|
81
|
-
* The actual processing happens in the background, and the status can be checked using the
|
|
82
|
+
* Asynchronously process a user message and return a run object.
|
|
83
|
+
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
82
84
|
*
|
|
83
85
|
* @param {string} agentId
|
|
84
86
|
* @param {Letta.LettaRequest} request
|
|
@@ -87,14 +89,14 @@ export declare class Messages {
|
|
|
87
89
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
88
90
|
*
|
|
89
91
|
* @example
|
|
90
|
-
* await client.agents.messages.
|
|
92
|
+
* await client.agents.messages.sendAsync("agent_id", {
|
|
91
93
|
* messages: [{
|
|
92
94
|
* role: "user",
|
|
93
95
|
* text: "text"
|
|
94
96
|
* }]
|
|
95
97
|
* })
|
|
96
98
|
*/
|
|
97
|
-
|
|
99
|
+
sendAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
|
|
98
100
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
99
101
|
Authorization: string;
|
|
100
102
|
}>;
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,9 +71,9 @@ class Messages {
|
|
|
61
71
|
* @example
|
|
62
72
|
* await client.agents.messages.list("agent_id")
|
|
63
73
|
*/
|
|
64
|
-
list(
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
list(agentId_1) {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
76
|
+
var _a, _b, _c;
|
|
67
77
|
const { before, limit, msgObject, assistantMessageToolName, assistantMessageToolKwarg } = request;
|
|
68
78
|
const _queryParams = {};
|
|
69
79
|
if (before != null) {
|
|
@@ -82,9 +92,9 @@ class Messages {
|
|
|
82
92
|
_queryParams["assistant_message_tool_kwarg"] = assistantMessageToolKwarg;
|
|
83
93
|
}
|
|
84
94
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
95
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
86
96
|
method: "GET",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
97
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
98
|
contentType: "application/json",
|
|
89
99
|
queryParameters: _queryParams,
|
|
90
100
|
requestType: "json",
|
|
@@ -144,20 +154,20 @@ class Messages {
|
|
|
144
154
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
145
155
|
*
|
|
146
156
|
* @example
|
|
147
|
-
* await client.agents.messages.
|
|
157
|
+
* await client.agents.messages.send("agent_id", {
|
|
148
158
|
* messages: [{
|
|
149
159
|
* role: "user",
|
|
150
160
|
* text: "text"
|
|
151
161
|
* }]
|
|
152
162
|
* })
|
|
153
163
|
*/
|
|
154
|
-
|
|
155
|
-
var _a, _b;
|
|
164
|
+
send(agentId, request, requestOptions) {
|
|
156
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
var _a, _b, _c;
|
|
157
167
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
158
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
168
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
159
169
|
method: "POST",
|
|
160
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
170
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
171
|
contentType: "application/json",
|
|
162
172
|
requestType: "json",
|
|
163
173
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -219,13 +229,13 @@ class Messages {
|
|
|
219
229
|
* @example
|
|
220
230
|
* await client.agents.messages.update("agent_id", "message_id")
|
|
221
231
|
*/
|
|
222
|
-
update(
|
|
223
|
-
|
|
224
|
-
|
|
232
|
+
update(agentId_1, messageId_1) {
|
|
233
|
+
return __awaiter(this, arguments, void 0, function* (agentId, messageId, request = {}, requestOptions) {
|
|
234
|
+
var _a, _b, _c;
|
|
225
235
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
226
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
236
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
|
|
227
237
|
method: "PATCH",
|
|
228
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
238
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
229
239
|
contentType: "application/json",
|
|
230
240
|
requestType: "json",
|
|
231
241
|
body: serializers.agents.MessageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -280,12 +290,12 @@ class Messages {
|
|
|
280
290
|
* It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
281
291
|
*/
|
|
282
292
|
stream(agentId, request, requestOptions) {
|
|
283
|
-
var _a, _b;
|
|
284
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
var _a, _b, _c;
|
|
285
295
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
286
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
296
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
|
|
287
297
|
method: "POST",
|
|
288
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
298
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
289
299
|
contentType: "application/json",
|
|
290
300
|
requestType: "json",
|
|
291
301
|
body: serializers.agents.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -346,8 +356,8 @@ class Messages {
|
|
|
346
356
|
});
|
|
347
357
|
}
|
|
348
358
|
/**
|
|
349
|
-
* Asynchronously process a user message and return a
|
|
350
|
-
* The actual processing happens in the background, and the status can be checked using the
|
|
359
|
+
* Asynchronously process a user message and return a run object.
|
|
360
|
+
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
351
361
|
*
|
|
352
362
|
* @param {string} agentId
|
|
353
363
|
* @param {Letta.LettaRequest} request
|
|
@@ -356,20 +366,20 @@ class Messages {
|
|
|
356
366
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
357
367
|
*
|
|
358
368
|
* @example
|
|
359
|
-
* await client.agents.messages.
|
|
369
|
+
* await client.agents.messages.sendAsync("agent_id", {
|
|
360
370
|
* messages: [{
|
|
361
371
|
* role: "user",
|
|
362
372
|
* text: "text"
|
|
363
373
|
* }]
|
|
364
374
|
* })
|
|
365
375
|
*/
|
|
366
|
-
|
|
367
|
-
var _a, _b;
|
|
376
|
+
sendAsync(agentId, request, requestOptions) {
|
|
368
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
var _a, _b, _c;
|
|
369
379
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
370
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
380
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
|
|
371
381
|
method: "POST",
|
|
372
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
382
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
373
383
|
contentType: "application/json",
|
|
374
384
|
requestType: "json",
|
|
375
385
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts
CHANGED
|
@@ -14,12 +14,8 @@ import * as Letta from "../../../../../../index";
|
|
|
14
14
|
export interface LettaStreamingRequest {
|
|
15
15
|
/** The messages to be sent to the agent. */
|
|
16
16
|
messages: Letta.MessageCreate[];
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/** The name of the designated message tool. */
|
|
20
|
-
assistantMessageToolName?: string;
|
|
21
|
-
/** The name of the message argument in the designated message tool. */
|
|
22
|
-
assistantMessageToolKwarg?: string;
|
|
17
|
+
/** Configuration options for the LettaRequest. */
|
|
18
|
+
config?: Letta.LettaRequestConfig;
|
|
23
19
|
/** Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True). */
|
|
24
20
|
streamTokens?: boolean;
|
|
25
21
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../../../../../index";
|
|
5
|
-
export
|
|
5
|
+
export type LettaStreamingResponse = Letta.agents.LettaStreamingResponse.SystemMessage | Letta.agents.LettaStreamingResponse.UserMessage | Letta.agents.LettaStreamingResponse.ReasoningMessage | Letta.agents.LettaStreamingResponse.ToolCallMessage | Letta.agents.LettaStreamingResponse.ToolReturnMessage | Letta.agents.LettaStreamingResponse.AssistantMessage | Letta.agents.LettaStreamingResponse.UsageStatistics;
|
|
6
6
|
export declare namespace LettaStreamingResponse {
|
|
7
7
|
interface SystemMessage extends Letta.SystemMessageOutput {
|
|
8
8
|
messageType: "system_message";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../../../../../index";
|
|
5
|
-
export
|
|
5
|
+
export type MessagesListResponse = Letta.LettaSchemasMessageMessage[] | Letta.LettaMessageUnion[];
|
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./MessagesListResponseItem"), exports);
|
|
18
17
|
__exportStar(require("./MessagesListResponse"), exports);
|
|
19
18
|
__exportStar(require("./LettaStreamingResponse"), exports);
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace RecallMemory {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,12 +71,12 @@ class RecallMemory {
|
|
|
61
71
|
* await client.agents.recallMemory.getSummary("agent_id")
|
|
62
72
|
*/
|
|
63
73
|
getSummary(agentId, requestOptions) {
|
|
64
|
-
var _a, _b;
|
|
65
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
var _a, _b, _c;
|
|
66
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
77
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
|
|
68
78
|
method: "GET",
|
|
69
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
70
80
|
contentType: "application/json",
|
|
71
81
|
requestType: "json",
|
|
72
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace Sources {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,12 +71,12 @@ class Sources {
|
|
|
61
71
|
* await client.agents.sources.get("agent_id")
|
|
62
72
|
*/
|
|
63
73
|
get(agentId, requestOptions) {
|
|
64
|
-
var _a, _b;
|
|
65
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
var _a, _b, _c;
|
|
66
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
77
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
|
|
68
78
|
method: "GET",
|
|
69
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
70
80
|
contentType: "application/json",
|
|
71
81
|
requestType: "json",
|
|
72
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace Templates {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -75,18 +85,18 @@ class Templates {
|
|
|
75
85
|
* @example
|
|
76
86
|
* await client.agents.templates.createVersion("agent_id")
|
|
77
87
|
*/
|
|
78
|
-
createVersion(
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
createVersion(agentId_1) {
|
|
89
|
+
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
90
|
+
var _a, _b, _c;
|
|
81
91
|
const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
|
|
82
92
|
const _queryParams = {};
|
|
83
93
|
if (returnAgentState != null) {
|
|
84
94
|
_queryParams["returnAgentState"] = returnAgentState.toString();
|
|
85
95
|
}
|
|
86
96
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
87
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
97
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
|
|
88
98
|
method: "POST",
|
|
89
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
99
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
100
|
contentType: "application/json",
|
|
91
101
|
queryParameters: _queryParams,
|
|
92
102
|
requestType: "json",
|
|
@@ -148,12 +158,12 @@ class Templates {
|
|
|
148
158
|
* })
|
|
149
159
|
*/
|
|
150
160
|
migrate(agentId, request, requestOptions) {
|
|
151
|
-
var _a, _b;
|
|
152
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
var _a, _b, _c;
|
|
153
163
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
164
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
|
|
155
165
|
method: "POST",
|
|
156
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
166
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
167
|
contentType: "application/json",
|
|
158
168
|
requestType: "json",
|
|
159
169
|
body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -221,13 +231,13 @@ class Templates {
|
|
|
221
231
|
* @example
|
|
222
232
|
* await client.agents.templates.create("agent_id")
|
|
223
233
|
*/
|
|
224
|
-
create(
|
|
225
|
-
|
|
226
|
-
|
|
234
|
+
create(agentId_1) {
|
|
235
|
+
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
236
|
+
var _a, _b, _c;
|
|
227
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
228
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
238
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
|
|
229
239
|
method: "POST",
|
|
230
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
240
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
231
241
|
contentType: "application/json",
|
|
232
242
|
requestType: "json",
|
|
233
243
|
body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -7,6 +7,8 @@ import * as Letta from "../../../../../index";
|
|
|
7
7
|
export declare namespace Tools {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<string | undefined>;
|
|
11
13
|
fetcher?: core.FetchFunction;
|
|
12
14
|
}
|