@letta-ai/letta-client 0.1.170 → 0.1.173
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/README.md +16 -3
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ConflictError.d.ts +2 -1
- package/api/errors/ConflictError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/PaymentRequiredError.d.ts +2 -1
- package/api/errors/PaymentRequiredError.js +2 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/api/errors/UnprocessableEntityError.js +2 -1
- package/api/resources/agents/client/Client.d.ts +20 -10
- package/api/resources/agents/client/Client.js +166 -82
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- 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 +10 -5
- package/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/context/client/Client.js +18 -9
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/files/client/Client.js +45 -21
- package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/api/resources/batches/client/Client.d.ts +8 -4
- package/api/resources/batches/client/Client.js +63 -30
- package/api/resources/blocks/client/Client.d.ts +12 -6
- package/api/resources/blocks/client/Client.js +100 -49
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/api/resources/embeddingModels/client/Client.js +18 -9
- package/api/resources/folders/client/Client.d.ts +18 -9
- package/api/resources/folders/client/Client.js +154 -76
- package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/api/resources/folders/resources/files/client/Client.js +48 -24
- package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/api/resources/groups/client/Client.d.ts +12 -6
- package/api/resources/groups/client/Client.js +105 -52
- package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/api/resources/health/client/Client.d.ts +2 -1
- package/api/resources/health/client/Client.js +17 -8
- package/api/resources/identities/client/Client.d.ts +14 -7
- package/api/resources/identities/client/Client.js +123 -61
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/api/resources/jobs/client/Client.d.ts +10 -5
- package/api/resources/jobs/client/Client.js +92 -47
- package/api/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/messages/client/Client.js +19 -10
- package/api/resources/models/client/Client.d.ts +2 -1
- package/api/resources/models/client/Client.js +27 -14
- package/api/resources/projects/client/Client.d.ts +2 -1
- package/api/resources/projects/client/Client.js +18 -9
- package/api/resources/providers/client/Client.d.ts +10 -5
- package/api/resources/providers/client/Client.js +77 -36
- package/api/resources/runs/client/Client.d.ts +8 -4
- package/api/resources/runs/client/Client.js +74 -38
- package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/api/resources/sources/client/Client.d.ts +20 -10
- package/api/resources/sources/client/Client.js +173 -86
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/api/resources/sources/resources/files/client/Client.js +48 -24
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/api/resources/steps/client/Client.d.ts +4 -2
- package/api/resources/steps/client/Client.js +41 -21
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/api/resources/tags/client/Client.d.ts +2 -1
- package/api/resources/tags/client/Client.js +19 -10
- package/api/resources/telemetry/client/Client.d.ts +2 -1
- package/api/resources/telemetry/client/Client.js +18 -9
- package/api/resources/templates/client/Client.d.ts +2 -1
- package/api/resources/templates/client/Client.js +18 -9
- package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/api/resources/tools/client/Client.d.ts +40 -20
- package/api/resources/tools/client/Client.js +356 -182
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/api/resources/voice/client/Client.d.ts +2 -1
- package/api/resources/voice/client/Client.js +9 -3
- package/api/types/AgentState.d.ts +2 -0
- package/api/types/EmbeddingConfig.d.ts +1 -11
- package/api/types/LettaStreamingRequest.d.ts +2 -0
- package/api/types/LlmConfig.d.ts +1 -11
- package/api/types/ModalSandboxConfig.d.ts +4 -0
- package/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/api/types/NpmRequirement.d.ts +9 -0
- package/api/types/NpmRequirement.js +5 -0
- package/api/types/Passage.d.ts +4 -4
- package/api/types/Tool.d.ts +2 -0
- package/api/types/ToolCreate.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +11 -3
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/core/form-data-utils/FormDataWrapper.js +53 -10
- package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +3 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +2 -0
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ConflictError.d.ts +2 -1
- package/dist/api/errors/ConflictError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
- package/dist/api/errors/PaymentRequiredError.js +2 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/dist/api/errors/UnprocessableEntityError.js +2 -1
- package/dist/api/resources/agents/client/Client.d.ts +20 -10
- package/dist/api/resources/agents/client/Client.js +166 -82
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- 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 +10 -5
- package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/dist/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/dist/api/resources/batches/client/Client.d.ts +8 -4
- package/dist/api/resources/batches/client/Client.js +63 -30
- package/dist/api/resources/blocks/client/Client.d.ts +12 -6
- package/dist/api/resources/blocks/client/Client.js +100 -49
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/dist/api/resources/embeddingModels/client/Client.js +18 -9
- package/dist/api/resources/folders/client/Client.d.ts +18 -9
- package/dist/api/resources/folders/client/Client.js +154 -76
- package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
- package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/groups/client/Client.d.ts +12 -6
- package/dist/api/resources/groups/client/Client.js +105 -52
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/dist/api/resources/health/client/Client.d.ts +2 -1
- package/dist/api/resources/health/client/Client.js +17 -8
- package/dist/api/resources/identities/client/Client.d.ts +14 -7
- package/dist/api/resources/identities/client/Client.js +123 -61
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/dist/api/resources/jobs/client/Client.d.ts +10 -5
- package/dist/api/resources/jobs/client/Client.js +92 -47
- package/dist/api/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/messages/client/Client.js +19 -10
- package/dist/api/resources/models/client/Client.d.ts +2 -1
- package/dist/api/resources/models/client/Client.js +27 -14
- package/dist/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/api/resources/projects/client/Client.js +18 -9
- package/dist/api/resources/providers/client/Client.d.ts +10 -5
- package/dist/api/resources/providers/client/Client.js +77 -36
- package/dist/api/resources/runs/client/Client.d.ts +8 -4
- package/dist/api/resources/runs/client/Client.js +74 -38
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/dist/api/resources/sources/client/Client.d.ts +20 -10
- package/dist/api/resources/sources/client/Client.js +173 -86
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/steps/client/Client.d.ts +4 -2
- package/dist/api/resources/steps/client/Client.js +41 -21
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/dist/api/resources/tags/client/Client.d.ts +2 -1
- package/dist/api/resources/tags/client/Client.js +19 -10
- package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
- package/dist/api/resources/telemetry/client/Client.js +18 -9
- package/dist/api/resources/templates/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/client/Client.js +18 -9
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/tools/client/Client.d.ts +40 -20
- package/dist/api/resources/tools/client/Client.js +356 -182
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/api/resources/voice/client/Client.d.ts +2 -1
- package/dist/api/resources/voice/client/Client.js +9 -3
- package/dist/api/types/AgentState.d.ts +2 -0
- package/dist/api/types/EmbeddingConfig.d.ts +1 -11
- package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
- package/dist/api/types/LlmConfig.d.ts +1 -11
- package/dist/api/types/ModalSandboxConfig.d.ts +4 -0
- package/dist/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/dist/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/dist/api/types/NpmRequirement.d.ts +9 -0
- package/dist/api/types/NpmRequirement.js +5 -0
- package/dist/api/types/Passage.d.ts +4 -4
- package/dist/api/types/Tool.d.ts +2 -0
- package/dist/api/types/ToolCreate.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +11 -3
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +3 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +2 -0
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/errors/LettaError.d.ts +4 -1
- package/dist/errors/LettaError.js +6 -8
- 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/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/dist/serialization/types/AgentState.d.ts +1 -0
- package/dist/serialization/types/AgentState.js +1 -0
- package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/dist/serialization/types/LettaStreamingRequest.js +1 -0
- package/dist/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/dist/serialization/types/ModalSandboxConfig.js +3 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/dist/serialization/types/NpmRequirement.d.ts +13 -0
- package/dist/serialization/types/NpmRequirement.js +44 -0
- package/dist/serialization/types/Passage.d.ts +1 -1
- package/dist/serialization/types/Passage.js +1 -1
- package/dist/serialization/types/Tool.d.ts +2 -0
- package/dist/serialization/types/Tool.js +2 -0
- package/dist/serialization/types/ToolCreate.d.ts +2 -0
- package/dist/serialization/types/ToolCreate.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/LettaError.d.ts +4 -1
- package/errors/LettaError.js +6 -8
- package/package.json +4 -4
- 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/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/serialization/types/AgentState.d.ts +1 -0
- package/serialization/types/AgentState.js +1 -0
- package/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/serialization/types/LettaStreamingRequest.js +1 -0
- package/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/serialization/types/ModalSandboxConfig.js +3 -0
- package/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/serialization/types/NpmRequirement.d.ts +13 -0
- package/serialization/types/NpmRequirement.js +44 -0
- package/serialization/types/Passage.d.ts +1 -1
- package/serialization/types/Passage.js +1 -1
- package/serialization/types/Tool.d.ts +2 -0
- package/serialization/types/Tool.js +2 -0
- package/serialization/types/ToolCreate.d.ts +2 -0
- package/serialization/types/ToolCreate.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -71,7 +71,10 @@ class Jobs {
|
|
|
71
71
|
* @example
|
|
72
72
|
* await client.jobs.list()
|
|
73
73
|
*/
|
|
74
|
-
list() {
|
|
74
|
+
list(request = {}, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__list() {
|
|
75
78
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
79
|
var _a, _b, _c;
|
|
77
80
|
const { sourceId, before, after, limit, ascending } = request;
|
|
@@ -96,7 +99,7 @@ class Jobs {
|
|
|
96
99
|
method: "GET",
|
|
97
100
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
98
101
|
? yield core.Supplier.get(this._options.project)
|
|
99
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
102
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
100
103
|
contentType: "application/json",
|
|
101
104
|
queryParameters: _queryParams,
|
|
102
105
|
requestType: "json",
|
|
@@ -105,13 +108,16 @@ class Jobs {
|
|
|
105
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
106
109
|
});
|
|
107
110
|
if (_response.ok) {
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
return {
|
|
112
|
+
data: serializers.jobs.list.Response.parseOrThrow(_response.body, {
|
|
113
|
+
unrecognizedObjectKeys: "passthrough",
|
|
114
|
+
allowUnrecognizedUnionMembers: true,
|
|
115
|
+
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
117
|
+
breadcrumbsPrefix: ["response"],
|
|
118
|
+
}),
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
};
|
|
115
121
|
}
|
|
116
122
|
if (_response.error.reason === "status-code") {
|
|
117
123
|
switch (_response.error.statusCode) {
|
|
@@ -122,11 +128,12 @@ class Jobs {
|
|
|
122
128
|
allowUnrecognizedEnumValues: true,
|
|
123
129
|
skipValidation: true,
|
|
124
130
|
breadcrumbsPrefix: ["response"],
|
|
125
|
-
}));
|
|
131
|
+
}), _response.rawResponse);
|
|
126
132
|
default:
|
|
127
133
|
throw new errors.LettaError({
|
|
128
134
|
statusCode: _response.error.statusCode,
|
|
129
135
|
body: _response.error.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
130
137
|
});
|
|
131
138
|
}
|
|
132
139
|
}
|
|
@@ -135,12 +142,14 @@ class Jobs {
|
|
|
135
142
|
throw new errors.LettaError({
|
|
136
143
|
statusCode: _response.error.statusCode,
|
|
137
144
|
body: _response.error.rawBody,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
138
146
|
});
|
|
139
147
|
case "timeout":
|
|
140
148
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/.");
|
|
141
149
|
case "unknown":
|
|
142
150
|
throw new errors.LettaError({
|
|
143
151
|
message: _response.error.errorMessage,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
144
153
|
});
|
|
145
154
|
}
|
|
146
155
|
});
|
|
@@ -156,7 +165,10 @@ class Jobs {
|
|
|
156
165
|
* @example
|
|
157
166
|
* await client.jobs.listActive()
|
|
158
167
|
*/
|
|
159
|
-
listActive() {
|
|
168
|
+
listActive(request = {}, requestOptions) {
|
|
169
|
+
return core.HttpResponsePromise.fromPromise(this.__listActive(request, requestOptions));
|
|
170
|
+
}
|
|
171
|
+
__listActive() {
|
|
160
172
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
161
173
|
var _a, _b, _c;
|
|
162
174
|
const { sourceId, before, after, limit, ascending } = request;
|
|
@@ -181,7 +193,7 @@ class Jobs {
|
|
|
181
193
|
method: "GET",
|
|
182
194
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
183
195
|
? yield core.Supplier.get(this._options.project)
|
|
184
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
196
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
185
197
|
contentType: "application/json",
|
|
186
198
|
queryParameters: _queryParams,
|
|
187
199
|
requestType: "json",
|
|
@@ -190,13 +202,16 @@ class Jobs {
|
|
|
190
202
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
203
|
});
|
|
192
204
|
if (_response.ok) {
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
205
|
+
return {
|
|
206
|
+
data: serializers.jobs.listActive.Response.parseOrThrow(_response.body, {
|
|
207
|
+
unrecognizedObjectKeys: "passthrough",
|
|
208
|
+
allowUnrecognizedUnionMembers: true,
|
|
209
|
+
allowUnrecognizedEnumValues: true,
|
|
210
|
+
skipValidation: true,
|
|
211
|
+
breadcrumbsPrefix: ["response"],
|
|
212
|
+
}),
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
};
|
|
200
215
|
}
|
|
201
216
|
if (_response.error.reason === "status-code") {
|
|
202
217
|
switch (_response.error.statusCode) {
|
|
@@ -207,11 +222,12 @@ class Jobs {
|
|
|
207
222
|
allowUnrecognizedEnumValues: true,
|
|
208
223
|
skipValidation: true,
|
|
209
224
|
breadcrumbsPrefix: ["response"],
|
|
210
|
-
}));
|
|
225
|
+
}), _response.rawResponse);
|
|
211
226
|
default:
|
|
212
227
|
throw new errors.LettaError({
|
|
213
228
|
statusCode: _response.error.statusCode,
|
|
214
229
|
body: _response.error.body,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
215
231
|
});
|
|
216
232
|
}
|
|
217
233
|
}
|
|
@@ -220,12 +236,14 @@ class Jobs {
|
|
|
220
236
|
throw new errors.LettaError({
|
|
221
237
|
statusCode: _response.error.statusCode,
|
|
222
238
|
body: _response.error.rawBody,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
223
240
|
});
|
|
224
241
|
case "timeout":
|
|
225
242
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/active.");
|
|
226
243
|
case "unknown":
|
|
227
244
|
throw new errors.LettaError({
|
|
228
245
|
message: _response.error.errorMessage,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
229
247
|
});
|
|
230
248
|
}
|
|
231
249
|
});
|
|
@@ -242,6 +260,9 @@ class Jobs {
|
|
|
242
260
|
* await client.jobs.retrieve("job_id")
|
|
243
261
|
*/
|
|
244
262
|
retrieve(jobId, requestOptions) {
|
|
263
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieve(jobId, requestOptions));
|
|
264
|
+
}
|
|
265
|
+
__retrieve(jobId, requestOptions) {
|
|
245
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
246
267
|
var _a, _b, _c;
|
|
247
268
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -249,7 +270,7 @@ class Jobs {
|
|
|
249
270
|
method: "GET",
|
|
250
271
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
251
272
|
? yield core.Supplier.get(this._options.project)
|
|
252
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
273
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
253
274
|
contentType: "application/json",
|
|
254
275
|
requestType: "json",
|
|
255
276
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -257,13 +278,16 @@ class Jobs {
|
|
|
257
278
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
279
|
});
|
|
259
280
|
if (_response.ok) {
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
281
|
+
return {
|
|
282
|
+
data: serializers.Job.parseOrThrow(_response.body, {
|
|
283
|
+
unrecognizedObjectKeys: "passthrough",
|
|
284
|
+
allowUnrecognizedUnionMembers: true,
|
|
285
|
+
allowUnrecognizedEnumValues: true,
|
|
286
|
+
skipValidation: true,
|
|
287
|
+
breadcrumbsPrefix: ["response"],
|
|
288
|
+
}),
|
|
289
|
+
rawResponse: _response.rawResponse,
|
|
290
|
+
};
|
|
267
291
|
}
|
|
268
292
|
if (_response.error.reason === "status-code") {
|
|
269
293
|
switch (_response.error.statusCode) {
|
|
@@ -274,11 +298,12 @@ class Jobs {
|
|
|
274
298
|
allowUnrecognizedEnumValues: true,
|
|
275
299
|
skipValidation: true,
|
|
276
300
|
breadcrumbsPrefix: ["response"],
|
|
277
|
-
}));
|
|
301
|
+
}), _response.rawResponse);
|
|
278
302
|
default:
|
|
279
303
|
throw new errors.LettaError({
|
|
280
304
|
statusCode: _response.error.statusCode,
|
|
281
305
|
body: _response.error.body,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
282
307
|
});
|
|
283
308
|
}
|
|
284
309
|
}
|
|
@@ -287,12 +312,14 @@ class Jobs {
|
|
|
287
312
|
throw new errors.LettaError({
|
|
288
313
|
statusCode: _response.error.statusCode,
|
|
289
314
|
body: _response.error.rawBody,
|
|
315
|
+
rawResponse: _response.rawResponse,
|
|
290
316
|
});
|
|
291
317
|
case "timeout":
|
|
292
318
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/{job_id}.");
|
|
293
319
|
case "unknown":
|
|
294
320
|
throw new errors.LettaError({
|
|
295
321
|
message: _response.error.errorMessage,
|
|
322
|
+
rawResponse: _response.rawResponse,
|
|
296
323
|
});
|
|
297
324
|
}
|
|
298
325
|
});
|
|
@@ -309,6 +336,9 @@ class Jobs {
|
|
|
309
336
|
* await client.jobs.delete("job_id")
|
|
310
337
|
*/
|
|
311
338
|
delete(jobId, requestOptions) {
|
|
339
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(jobId, requestOptions));
|
|
340
|
+
}
|
|
341
|
+
__delete(jobId, requestOptions) {
|
|
312
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
313
343
|
var _a, _b, _c;
|
|
314
344
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -316,7 +346,7 @@ class Jobs {
|
|
|
316
346
|
method: "DELETE",
|
|
317
347
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
318
348
|
? yield core.Supplier.get(this._options.project)
|
|
319
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
349
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
320
350
|
contentType: "application/json",
|
|
321
351
|
requestType: "json",
|
|
322
352
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -324,13 +354,16 @@ class Jobs {
|
|
|
324
354
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
325
355
|
});
|
|
326
356
|
if (_response.ok) {
|
|
327
|
-
return
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
357
|
+
return {
|
|
358
|
+
data: serializers.Job.parseOrThrow(_response.body, {
|
|
359
|
+
unrecognizedObjectKeys: "passthrough",
|
|
360
|
+
allowUnrecognizedUnionMembers: true,
|
|
361
|
+
allowUnrecognizedEnumValues: true,
|
|
362
|
+
skipValidation: true,
|
|
363
|
+
breadcrumbsPrefix: ["response"],
|
|
364
|
+
}),
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
366
|
+
};
|
|
334
367
|
}
|
|
335
368
|
if (_response.error.reason === "status-code") {
|
|
336
369
|
switch (_response.error.statusCode) {
|
|
@@ -341,11 +374,12 @@ class Jobs {
|
|
|
341
374
|
allowUnrecognizedEnumValues: true,
|
|
342
375
|
skipValidation: true,
|
|
343
376
|
breadcrumbsPrefix: ["response"],
|
|
344
|
-
}));
|
|
377
|
+
}), _response.rawResponse);
|
|
345
378
|
default:
|
|
346
379
|
throw new errors.LettaError({
|
|
347
380
|
statusCode: _response.error.statusCode,
|
|
348
381
|
body: _response.error.body,
|
|
382
|
+
rawResponse: _response.rawResponse,
|
|
349
383
|
});
|
|
350
384
|
}
|
|
351
385
|
}
|
|
@@ -354,12 +388,14 @@ class Jobs {
|
|
|
354
388
|
throw new errors.LettaError({
|
|
355
389
|
statusCode: _response.error.statusCode,
|
|
356
390
|
body: _response.error.rawBody,
|
|
391
|
+
rawResponse: _response.rawResponse,
|
|
357
392
|
});
|
|
358
393
|
case "timeout":
|
|
359
394
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/jobs/{job_id}.");
|
|
360
395
|
case "unknown":
|
|
361
396
|
throw new errors.LettaError({
|
|
362
397
|
message: _response.error.errorMessage,
|
|
398
|
+
rawResponse: _response.rawResponse,
|
|
363
399
|
});
|
|
364
400
|
}
|
|
365
401
|
});
|
|
@@ -379,6 +415,9 @@ class Jobs {
|
|
|
379
415
|
* await client.jobs.cancelJob("job_id")
|
|
380
416
|
*/
|
|
381
417
|
cancelJob(jobId, requestOptions) {
|
|
418
|
+
return core.HttpResponsePromise.fromPromise(this.__cancelJob(jobId, requestOptions));
|
|
419
|
+
}
|
|
420
|
+
__cancelJob(jobId, requestOptions) {
|
|
382
421
|
return __awaiter(this, void 0, void 0, function* () {
|
|
383
422
|
var _a, _b, _c;
|
|
384
423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -386,7 +425,7 @@ class Jobs {
|
|
|
386
425
|
method: "PATCH",
|
|
387
426
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
388
427
|
? yield core.Supplier.get(this._options.project)
|
|
389
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
428
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
|
|
390
429
|
contentType: "application/json",
|
|
391
430
|
requestType: "json",
|
|
392
431
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -394,13 +433,16 @@ class Jobs {
|
|
|
394
433
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
395
434
|
});
|
|
396
435
|
if (_response.ok) {
|
|
397
|
-
return
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
436
|
+
return {
|
|
437
|
+
data: serializers.Job.parseOrThrow(_response.body, {
|
|
438
|
+
unrecognizedObjectKeys: "passthrough",
|
|
439
|
+
allowUnrecognizedUnionMembers: true,
|
|
440
|
+
allowUnrecognizedEnumValues: true,
|
|
441
|
+
skipValidation: true,
|
|
442
|
+
breadcrumbsPrefix: ["response"],
|
|
443
|
+
}),
|
|
444
|
+
rawResponse: _response.rawResponse,
|
|
445
|
+
};
|
|
404
446
|
}
|
|
405
447
|
if (_response.error.reason === "status-code") {
|
|
406
448
|
switch (_response.error.statusCode) {
|
|
@@ -411,11 +453,12 @@ class Jobs {
|
|
|
411
453
|
allowUnrecognizedEnumValues: true,
|
|
412
454
|
skipValidation: true,
|
|
413
455
|
breadcrumbsPrefix: ["response"],
|
|
414
|
-
}));
|
|
456
|
+
}), _response.rawResponse);
|
|
415
457
|
default:
|
|
416
458
|
throw new errors.LettaError({
|
|
417
459
|
statusCode: _response.error.statusCode,
|
|
418
460
|
body: _response.error.body,
|
|
461
|
+
rawResponse: _response.rawResponse,
|
|
419
462
|
});
|
|
420
463
|
}
|
|
421
464
|
}
|
|
@@ -424,12 +467,14 @@ class Jobs {
|
|
|
424
467
|
throw new errors.LettaError({
|
|
425
468
|
statusCode: _response.error.statusCode,
|
|
426
469
|
body: _response.error.rawBody,
|
|
470
|
+
rawResponse: _response.rawResponse,
|
|
427
471
|
});
|
|
428
472
|
case "timeout":
|
|
429
473
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/jobs/{job_id}/cancel.");
|
|
430
474
|
case "unknown":
|
|
431
475
|
throw new errors.LettaError({
|
|
432
476
|
message: _response.error.errorMessage,
|
|
477
|
+
rawResponse: _response.rawResponse,
|
|
433
478
|
});
|
|
434
479
|
}
|
|
435
480
|
});
|
|
@@ -49,7 +49,8 @@ export declare class Messages {
|
|
|
49
49
|
* @example
|
|
50
50
|
* await client.messages.listBatchMessages("batch_id")
|
|
51
51
|
*/
|
|
52
|
-
listBatchMessages(batchId: string, request?: Letta.ListBatchMessagesRequest, requestOptions?: Messages.RequestOptions):
|
|
52
|
+
listBatchMessages(batchId: string, request?: Letta.ListBatchMessagesRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Letta.LettaBatchMessages>;
|
|
53
|
+
private __listBatchMessages;
|
|
53
54
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
54
55
|
Authorization: string;
|
|
55
56
|
}>;
|
|
@@ -78,7 +78,10 @@ class Messages {
|
|
|
78
78
|
* @example
|
|
79
79
|
* await client.messages.listBatchMessages("batch_id")
|
|
80
80
|
*/
|
|
81
|
-
listBatchMessages(
|
|
81
|
+
listBatchMessages(batchId, request = {}, requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__listBatchMessages(batchId, request, requestOptions));
|
|
83
|
+
}
|
|
84
|
+
__listBatchMessages(batchId_1) {
|
|
82
85
|
return __awaiter(this, arguments, void 0, function* (batchId, request = {}, requestOptions) {
|
|
83
86
|
var _a, _b, _c;
|
|
84
87
|
const { limit, cursor, agentId, sortDescending } = request;
|
|
@@ -100,7 +103,7 @@ class Messages {
|
|
|
100
103
|
method: "GET",
|
|
101
104
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
102
105
|
? yield core.Supplier.get(this._options.project)
|
|
103
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
106
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
104
107
|
contentType: "application/json",
|
|
105
108
|
queryParameters: _queryParams,
|
|
106
109
|
requestType: "json",
|
|
@@ -109,13 +112,16 @@ class Messages {
|
|
|
109
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
110
113
|
});
|
|
111
114
|
if (_response.ok) {
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
return {
|
|
116
|
+
data: serializers.LettaBatchMessages.parseOrThrow(_response.body, {
|
|
117
|
+
unrecognizedObjectKeys: "passthrough",
|
|
118
|
+
allowUnrecognizedUnionMembers: true,
|
|
119
|
+
allowUnrecognizedEnumValues: true,
|
|
120
|
+
skipValidation: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
}),
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
};
|
|
119
125
|
}
|
|
120
126
|
if (_response.error.reason === "status-code") {
|
|
121
127
|
switch (_response.error.statusCode) {
|
|
@@ -126,11 +132,12 @@ class Messages {
|
|
|
126
132
|
allowUnrecognizedEnumValues: true,
|
|
127
133
|
skipValidation: true,
|
|
128
134
|
breadcrumbsPrefix: ["response"],
|
|
129
|
-
}));
|
|
135
|
+
}), _response.rawResponse);
|
|
130
136
|
default:
|
|
131
137
|
throw new errors.LettaError({
|
|
132
138
|
statusCode: _response.error.statusCode,
|
|
133
139
|
body: _response.error.body,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
134
141
|
});
|
|
135
142
|
}
|
|
136
143
|
}
|
|
@@ -139,12 +146,14 @@ class Messages {
|
|
|
139
146
|
throw new errors.LettaError({
|
|
140
147
|
statusCode: _response.error.statusCode,
|
|
141
148
|
body: _response.error.rawBody,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
142
150
|
});
|
|
143
151
|
case "timeout":
|
|
144
152
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/messages/batches/{batch_id}/messages.");
|
|
145
153
|
case "unknown":
|
|
146
154
|
throw new errors.LettaError({
|
|
147
155
|
message: _response.error.errorMessage,
|
|
156
|
+
rawResponse: _response.rawResponse,
|
|
148
157
|
});
|
|
149
158
|
}
|
|
150
159
|
});
|
|
@@ -41,7 +41,8 @@ export declare class Models {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.models.list()
|
|
43
43
|
*/
|
|
44
|
-
list(request?: Letta.ModelsListRequest, requestOptions?: Models.RequestOptions):
|
|
44
|
+
list(request?: Letta.ModelsListRequest, requestOptions?: Models.RequestOptions): core.HttpResponsePromise<Letta.LlmConfig[]>;
|
|
45
|
+
private __list;
|
|
45
46
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
46
47
|
Authorization: string;
|
|
47
48
|
}>;
|
|
@@ -52,8 +52,8 @@ exports.Models = void 0;
|
|
|
52
52
|
const environments = __importStar(require("../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../core"));
|
|
54
54
|
const Letta = __importStar(require("../../../index"));
|
|
55
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
56
55
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
58
|
class Models {
|
|
59
59
|
constructor(_options = {}) {
|
|
@@ -70,31 +70,38 @@ class Models {
|
|
|
70
70
|
* @example
|
|
71
71
|
* await client.models.list()
|
|
72
72
|
*/
|
|
73
|
-
list() {
|
|
73
|
+
list(request = {}, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__list() {
|
|
74
77
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
78
|
var _a, _b, _c;
|
|
76
79
|
const { providerCategory, providerName, providerType } = request;
|
|
77
80
|
const _queryParams = {};
|
|
78
81
|
if (providerCategory != null) {
|
|
79
82
|
if (Array.isArray(providerCategory)) {
|
|
80
|
-
_queryParams["provider_category"] = providerCategory.map((item) => item);
|
|
83
|
+
_queryParams["provider_category"] = providerCategory.map((item) => serializers.ProviderCategory.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
|
|
81
84
|
}
|
|
82
85
|
else {
|
|
83
|
-
_queryParams["provider_category"] = providerCategory
|
|
86
|
+
_queryParams["provider_category"] = serializers.ProviderCategory.jsonOrThrow(providerCategory, {
|
|
87
|
+
unrecognizedObjectKeys: "strip",
|
|
88
|
+
});
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
if (providerName != null) {
|
|
87
92
|
_queryParams["provider_name"] = providerName;
|
|
88
93
|
}
|
|
89
94
|
if (providerType != null) {
|
|
90
|
-
_queryParams["provider_type"] = providerType
|
|
95
|
+
_queryParams["provider_type"] = serializers.ProviderType.jsonOrThrow(providerType, {
|
|
96
|
+
unrecognizedObjectKeys: "strip",
|
|
97
|
+
});
|
|
91
98
|
}
|
|
92
99
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
100
|
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/models/"),
|
|
94
101
|
method: "GET",
|
|
95
102
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
96
103
|
? yield core.Supplier.get(this._options.project)
|
|
97
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
104
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
98
105
|
contentType: "application/json",
|
|
99
106
|
queryParameters: _queryParams,
|
|
100
107
|
requestType: "json",
|
|
@@ -103,13 +110,16 @@ class Models {
|
|
|
103
110
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
104
111
|
});
|
|
105
112
|
if (_response.ok) {
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
return {
|
|
114
|
+
data: serializers.models.list.Response.parseOrThrow(_response.body, {
|
|
115
|
+
unrecognizedObjectKeys: "passthrough",
|
|
116
|
+
allowUnrecognizedUnionMembers: true,
|
|
117
|
+
allowUnrecognizedEnumValues: true,
|
|
118
|
+
skipValidation: true,
|
|
119
|
+
breadcrumbsPrefix: ["response"],
|
|
120
|
+
}),
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
};
|
|
113
123
|
}
|
|
114
124
|
if (_response.error.reason === "status-code") {
|
|
115
125
|
switch (_response.error.statusCode) {
|
|
@@ -120,11 +130,12 @@ class Models {
|
|
|
120
130
|
allowUnrecognizedEnumValues: true,
|
|
121
131
|
skipValidation: true,
|
|
122
132
|
breadcrumbsPrefix: ["response"],
|
|
123
|
-
}));
|
|
133
|
+
}), _response.rawResponse);
|
|
124
134
|
default:
|
|
125
135
|
throw new errors.LettaError({
|
|
126
136
|
statusCode: _response.error.statusCode,
|
|
127
137
|
body: _response.error.body,
|
|
138
|
+
rawResponse: _response.rawResponse,
|
|
128
139
|
});
|
|
129
140
|
}
|
|
130
141
|
}
|
|
@@ -133,12 +144,14 @@ class Models {
|
|
|
133
144
|
throw new errors.LettaError({
|
|
134
145
|
statusCode: _response.error.statusCode,
|
|
135
146
|
body: _response.error.rawBody,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
136
148
|
});
|
|
137
149
|
case "timeout":
|
|
138
150
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/models/.");
|
|
139
151
|
case "unknown":
|
|
140
152
|
throw new errors.LettaError({
|
|
141
153
|
message: _response.error.errorMessage,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
142
155
|
});
|
|
143
156
|
}
|
|
144
157
|
});
|
|
@@ -39,7 +39,8 @@ export declare class Projects {
|
|
|
39
39
|
* @example
|
|
40
40
|
* await client.projects.list()
|
|
41
41
|
*/
|
|
42
|
-
list(request?: Letta.ProjectsListRequest, requestOptions?: Projects.RequestOptions):
|
|
42
|
+
list(request?: Letta.ProjectsListRequest, requestOptions?: Projects.RequestOptions): core.HttpResponsePromise<Letta.ProjectsListResponse>;
|
|
43
|
+
private __list;
|
|
43
44
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
44
45
|
Authorization: string;
|
|
45
46
|
}>;
|
|
@@ -67,7 +67,10 @@ class Projects {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.projects.list()
|
|
69
69
|
*/
|
|
70
|
-
list() {
|
|
70
|
+
list(request = {}, requestOptions) {
|
|
71
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
72
|
+
}
|
|
73
|
+
__list() {
|
|
71
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
72
75
|
var _a, _b, _c;
|
|
73
76
|
const { name, offset, limit } = request;
|
|
@@ -86,7 +89,7 @@ class Projects {
|
|
|
86
89
|
method: "GET",
|
|
87
90
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
88
91
|
? yield core.Supplier.get(this._options.project)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
92
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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
93
|
contentType: "application/json",
|
|
91
94
|
queryParameters: _queryParams,
|
|
92
95
|
requestType: "json",
|
|
@@ -95,18 +98,22 @@ class Projects {
|
|
|
95
98
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
99
|
});
|
|
97
100
|
if (_response.ok) {
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
return {
|
|
102
|
+
data: serializers.ProjectsListResponse.parseOrThrow(_response.body, {
|
|
103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
104
|
+
allowUnrecognizedUnionMembers: true,
|
|
105
|
+
allowUnrecognizedEnumValues: true,
|
|
106
|
+
skipValidation: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
}),
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
};
|
|
105
111
|
}
|
|
106
112
|
if (_response.error.reason === "status-code") {
|
|
107
113
|
throw new errors.LettaError({
|
|
108
114
|
statusCode: _response.error.statusCode,
|
|
109
115
|
body: _response.error.body,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
119
|
switch (_response.error.reason) {
|
|
@@ -114,12 +121,14 @@ class Projects {
|
|
|
114
121
|
throw new errors.LettaError({
|
|
115
122
|
statusCode: _response.error.statusCode,
|
|
116
123
|
body: _response.error.rawBody,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
117
125
|
});
|
|
118
126
|
case "timeout":
|
|
119
127
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/projects.");
|
|
120
128
|
case "unknown":
|
|
121
129
|
throw new errors.LettaError({
|
|
122
130
|
message: _response.error.errorMessage,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
123
132
|
});
|
|
124
133
|
}
|
|
125
134
|
});
|