@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
|
@@ -41,7 +41,8 @@ export declare class Providers {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.providers.list()
|
|
43
43
|
*/
|
|
44
|
-
list(request?: Letta.ProvidersListRequest, requestOptions?: Providers.RequestOptions):
|
|
44
|
+
list(request?: Letta.ProvidersListRequest, requestOptions?: Providers.RequestOptions): core.HttpResponsePromise<Letta.Provider[]>;
|
|
45
|
+
private __list;
|
|
45
46
|
/**
|
|
46
47
|
* Create a new custom provider
|
|
47
48
|
*
|
|
@@ -57,7 +58,8 @@ export declare class Providers {
|
|
|
57
58
|
* apiKey: "api_key"
|
|
58
59
|
* })
|
|
59
60
|
*/
|
|
60
|
-
create(request: Letta.ProviderCreate, requestOptions?: Providers.RequestOptions):
|
|
61
|
+
create(request: Letta.ProviderCreate, requestOptions?: Providers.RequestOptions): core.HttpResponsePromise<Letta.Provider>;
|
|
62
|
+
private __create;
|
|
61
63
|
/**
|
|
62
64
|
* Delete an existing custom provider
|
|
63
65
|
*
|
|
@@ -69,7 +71,8 @@ export declare class Providers {
|
|
|
69
71
|
* @example
|
|
70
72
|
* await client.providers.delete("provider_id")
|
|
71
73
|
*/
|
|
72
|
-
delete(providerId: string, requestOptions?: Providers.RequestOptions):
|
|
74
|
+
delete(providerId: string, requestOptions?: Providers.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
75
|
+
private __delete;
|
|
73
76
|
/**
|
|
74
77
|
* Update an existing custom provider
|
|
75
78
|
*
|
|
@@ -84,7 +87,8 @@ export declare class Providers {
|
|
|
84
87
|
* apiKey: "api_key"
|
|
85
88
|
* })
|
|
86
89
|
*/
|
|
87
|
-
modify(providerId: string, request: Letta.ProviderUpdate, requestOptions?: Providers.RequestOptions):
|
|
90
|
+
modify(providerId: string, request: Letta.ProviderUpdate, requestOptions?: Providers.RequestOptions): core.HttpResponsePromise<Letta.Provider>;
|
|
91
|
+
private __modify;
|
|
88
92
|
/**
|
|
89
93
|
* @param {Providers.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
94
|
*
|
|
@@ -93,7 +97,8 @@ export declare class Providers {
|
|
|
93
97
|
* @example
|
|
94
98
|
* await client.providers.check()
|
|
95
99
|
*/
|
|
96
|
-
check(requestOptions?: Providers.RequestOptions):
|
|
100
|
+
check(requestOptions?: Providers.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
101
|
+
private __check;
|
|
97
102
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
98
103
|
Authorization: string;
|
|
99
104
|
}>;
|
|
@@ -52,8 +52,8 @@ exports.Providers = 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 Providers {
|
|
59
59
|
constructor(_options = {}) {
|
|
@@ -70,7 +70,10 @@ class Providers {
|
|
|
70
70
|
* @example
|
|
71
71
|
* await client.providers.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 { name, providerType, after, limit } = request;
|
|
@@ -79,7 +82,9 @@ class Providers {
|
|
|
79
82
|
_queryParams["name"] = name;
|
|
80
83
|
}
|
|
81
84
|
if (providerType != null) {
|
|
82
|
-
_queryParams["provider_type"] = providerType
|
|
85
|
+
_queryParams["provider_type"] = serializers.ProviderType.jsonOrThrow(providerType, {
|
|
86
|
+
unrecognizedObjectKeys: "strip",
|
|
87
|
+
});
|
|
83
88
|
}
|
|
84
89
|
if (after != null) {
|
|
85
90
|
_queryParams["after"] = after;
|
|
@@ -92,7 +97,7 @@ class Providers {
|
|
|
92
97
|
method: "GET",
|
|
93
98
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
94
99
|
? yield core.Supplier.get(this._options.project)
|
|
95
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
100
|
+
: 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),
|
|
96
101
|
contentType: "application/json",
|
|
97
102
|
queryParameters: _queryParams,
|
|
98
103
|
requestType: "json",
|
|
@@ -101,13 +106,16 @@ class Providers {
|
|
|
101
106
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
102
107
|
});
|
|
103
108
|
if (_response.ok) {
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
return {
|
|
110
|
+
data: serializers.providers.list.Response.parseOrThrow(_response.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}),
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
118
|
+
};
|
|
111
119
|
}
|
|
112
120
|
if (_response.error.reason === "status-code") {
|
|
113
121
|
switch (_response.error.statusCode) {
|
|
@@ -118,11 +126,12 @@ class Providers {
|
|
|
118
126
|
allowUnrecognizedEnumValues: true,
|
|
119
127
|
skipValidation: true,
|
|
120
128
|
breadcrumbsPrefix: ["response"],
|
|
121
|
-
}));
|
|
129
|
+
}), _response.rawResponse);
|
|
122
130
|
default:
|
|
123
131
|
throw new errors.LettaError({
|
|
124
132
|
statusCode: _response.error.statusCode,
|
|
125
133
|
body: _response.error.body,
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
126
135
|
});
|
|
127
136
|
}
|
|
128
137
|
}
|
|
@@ -131,12 +140,14 @@ class Providers {
|
|
|
131
140
|
throw new errors.LettaError({
|
|
132
141
|
statusCode: _response.error.statusCode,
|
|
133
142
|
body: _response.error.rawBody,
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
134
144
|
});
|
|
135
145
|
case "timeout":
|
|
136
146
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/providers/.");
|
|
137
147
|
case "unknown":
|
|
138
148
|
throw new errors.LettaError({
|
|
139
149
|
message: _response.error.errorMessage,
|
|
150
|
+
rawResponse: _response.rawResponse,
|
|
140
151
|
});
|
|
141
152
|
}
|
|
142
153
|
});
|
|
@@ -157,6 +168,9 @@ class Providers {
|
|
|
157
168
|
* })
|
|
158
169
|
*/
|
|
159
170
|
create(request, requestOptions) {
|
|
171
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
172
|
+
}
|
|
173
|
+
__create(request, requestOptions) {
|
|
160
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
175
|
var _a, _b, _c;
|
|
162
176
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -164,7 +178,7 @@ class Providers {
|
|
|
164
178
|
method: "POST",
|
|
165
179
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
166
180
|
? yield core.Supplier.get(this._options.project)
|
|
167
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
181
|
+
: 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),
|
|
168
182
|
contentType: "application/json",
|
|
169
183
|
requestType: "json",
|
|
170
184
|
body: serializers.ProviderCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -173,13 +187,16 @@ class Providers {
|
|
|
173
187
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
174
188
|
});
|
|
175
189
|
if (_response.ok) {
|
|
176
|
-
return
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
return {
|
|
191
|
+
data: serializers.Provider.parseOrThrow(_response.body, {
|
|
192
|
+
unrecognizedObjectKeys: "passthrough",
|
|
193
|
+
allowUnrecognizedUnionMembers: true,
|
|
194
|
+
allowUnrecognizedEnumValues: true,
|
|
195
|
+
skipValidation: true,
|
|
196
|
+
breadcrumbsPrefix: ["response"],
|
|
197
|
+
}),
|
|
198
|
+
rawResponse: _response.rawResponse,
|
|
199
|
+
};
|
|
183
200
|
}
|
|
184
201
|
if (_response.error.reason === "status-code") {
|
|
185
202
|
switch (_response.error.statusCode) {
|
|
@@ -190,11 +207,12 @@ class Providers {
|
|
|
190
207
|
allowUnrecognizedEnumValues: true,
|
|
191
208
|
skipValidation: true,
|
|
192
209
|
breadcrumbsPrefix: ["response"],
|
|
193
|
-
}));
|
|
210
|
+
}), _response.rawResponse);
|
|
194
211
|
default:
|
|
195
212
|
throw new errors.LettaError({
|
|
196
213
|
statusCode: _response.error.statusCode,
|
|
197
214
|
body: _response.error.body,
|
|
215
|
+
rawResponse: _response.rawResponse,
|
|
198
216
|
});
|
|
199
217
|
}
|
|
200
218
|
}
|
|
@@ -203,12 +221,14 @@ class Providers {
|
|
|
203
221
|
throw new errors.LettaError({
|
|
204
222
|
statusCode: _response.error.statusCode,
|
|
205
223
|
body: _response.error.rawBody,
|
|
224
|
+
rawResponse: _response.rawResponse,
|
|
206
225
|
});
|
|
207
226
|
case "timeout":
|
|
208
227
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/providers/.");
|
|
209
228
|
case "unknown":
|
|
210
229
|
throw new errors.LettaError({
|
|
211
230
|
message: _response.error.errorMessage,
|
|
231
|
+
rawResponse: _response.rawResponse,
|
|
212
232
|
});
|
|
213
233
|
}
|
|
214
234
|
});
|
|
@@ -225,6 +245,9 @@ class Providers {
|
|
|
225
245
|
* await client.providers.delete("provider_id")
|
|
226
246
|
*/
|
|
227
247
|
delete(providerId, requestOptions) {
|
|
248
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(providerId, requestOptions));
|
|
249
|
+
}
|
|
250
|
+
__delete(providerId, requestOptions) {
|
|
228
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
229
252
|
var _a, _b, _c;
|
|
230
253
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -232,7 +255,7 @@ class Providers {
|
|
|
232
255
|
method: "DELETE",
|
|
233
256
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
234
257
|
? yield core.Supplier.get(this._options.project)
|
|
235
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
258
|
+
: 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),
|
|
236
259
|
contentType: "application/json",
|
|
237
260
|
requestType: "json",
|
|
238
261
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -240,7 +263,7 @@ class Providers {
|
|
|
240
263
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
264
|
});
|
|
242
265
|
if (_response.ok) {
|
|
243
|
-
return _response.body;
|
|
266
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
244
267
|
}
|
|
245
268
|
if (_response.error.reason === "status-code") {
|
|
246
269
|
switch (_response.error.statusCode) {
|
|
@@ -251,11 +274,12 @@ class Providers {
|
|
|
251
274
|
allowUnrecognizedEnumValues: true,
|
|
252
275
|
skipValidation: true,
|
|
253
276
|
breadcrumbsPrefix: ["response"],
|
|
254
|
-
}));
|
|
277
|
+
}), _response.rawResponse);
|
|
255
278
|
default:
|
|
256
279
|
throw new errors.LettaError({
|
|
257
280
|
statusCode: _response.error.statusCode,
|
|
258
281
|
body: _response.error.body,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
259
283
|
});
|
|
260
284
|
}
|
|
261
285
|
}
|
|
@@ -264,12 +288,14 @@ class Providers {
|
|
|
264
288
|
throw new errors.LettaError({
|
|
265
289
|
statusCode: _response.error.statusCode,
|
|
266
290
|
body: _response.error.rawBody,
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
267
292
|
});
|
|
268
293
|
case "timeout":
|
|
269
294
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/providers/{provider_id}.");
|
|
270
295
|
case "unknown":
|
|
271
296
|
throw new errors.LettaError({
|
|
272
297
|
message: _response.error.errorMessage,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
273
299
|
});
|
|
274
300
|
}
|
|
275
301
|
});
|
|
@@ -289,6 +315,9 @@ class Providers {
|
|
|
289
315
|
* })
|
|
290
316
|
*/
|
|
291
317
|
modify(providerId, request, requestOptions) {
|
|
318
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(providerId, request, requestOptions));
|
|
319
|
+
}
|
|
320
|
+
__modify(providerId, request, requestOptions) {
|
|
292
321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
293
322
|
var _a, _b, _c;
|
|
294
323
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -296,7 +325,7 @@ class Providers {
|
|
|
296
325
|
method: "PATCH",
|
|
297
326
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
298
327
|
? yield core.Supplier.get(this._options.project)
|
|
299
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
328
|
+
: 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),
|
|
300
329
|
contentType: "application/json",
|
|
301
330
|
requestType: "json",
|
|
302
331
|
body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -305,13 +334,16 @@ class Providers {
|
|
|
305
334
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
306
335
|
});
|
|
307
336
|
if (_response.ok) {
|
|
308
|
-
return
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
337
|
+
return {
|
|
338
|
+
data: serializers.Provider.parseOrThrow(_response.body, {
|
|
339
|
+
unrecognizedObjectKeys: "passthrough",
|
|
340
|
+
allowUnrecognizedUnionMembers: true,
|
|
341
|
+
allowUnrecognizedEnumValues: true,
|
|
342
|
+
skipValidation: true,
|
|
343
|
+
breadcrumbsPrefix: ["response"],
|
|
344
|
+
}),
|
|
345
|
+
rawResponse: _response.rawResponse,
|
|
346
|
+
};
|
|
315
347
|
}
|
|
316
348
|
if (_response.error.reason === "status-code") {
|
|
317
349
|
switch (_response.error.statusCode) {
|
|
@@ -322,11 +354,12 @@ class Providers {
|
|
|
322
354
|
allowUnrecognizedEnumValues: true,
|
|
323
355
|
skipValidation: true,
|
|
324
356
|
breadcrumbsPrefix: ["response"],
|
|
325
|
-
}));
|
|
357
|
+
}), _response.rawResponse);
|
|
326
358
|
default:
|
|
327
359
|
throw new errors.LettaError({
|
|
328
360
|
statusCode: _response.error.statusCode,
|
|
329
361
|
body: _response.error.body,
|
|
362
|
+
rawResponse: _response.rawResponse,
|
|
330
363
|
});
|
|
331
364
|
}
|
|
332
365
|
}
|
|
@@ -335,12 +368,14 @@ class Providers {
|
|
|
335
368
|
throw new errors.LettaError({
|
|
336
369
|
statusCode: _response.error.statusCode,
|
|
337
370
|
body: _response.error.rawBody,
|
|
371
|
+
rawResponse: _response.rawResponse,
|
|
338
372
|
});
|
|
339
373
|
case "timeout":
|
|
340
374
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/providers/{provider_id}.");
|
|
341
375
|
case "unknown":
|
|
342
376
|
throw new errors.LettaError({
|
|
343
377
|
message: _response.error.errorMessage,
|
|
378
|
+
rawResponse: _response.rawResponse,
|
|
344
379
|
});
|
|
345
380
|
}
|
|
346
381
|
});
|
|
@@ -354,6 +389,9 @@ class Providers {
|
|
|
354
389
|
* await client.providers.check()
|
|
355
390
|
*/
|
|
356
391
|
check(requestOptions) {
|
|
392
|
+
return core.HttpResponsePromise.fromPromise(this.__check(requestOptions));
|
|
393
|
+
}
|
|
394
|
+
__check(requestOptions) {
|
|
357
395
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
396
|
var _a, _b, _c;
|
|
359
397
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -361,7 +399,7 @@ class Providers {
|
|
|
361
399
|
method: "GET",
|
|
362
400
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
363
401
|
? yield core.Supplier.get(this._options.project)
|
|
364
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
402
|
+
: 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),
|
|
365
403
|
contentType: "application/json",
|
|
366
404
|
requestType: "json",
|
|
367
405
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -369,7 +407,7 @@ class Providers {
|
|
|
369
407
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
370
408
|
});
|
|
371
409
|
if (_response.ok) {
|
|
372
|
-
return _response.body;
|
|
410
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
373
411
|
}
|
|
374
412
|
if (_response.error.reason === "status-code") {
|
|
375
413
|
switch (_response.error.statusCode) {
|
|
@@ -380,11 +418,12 @@ class Providers {
|
|
|
380
418
|
allowUnrecognizedEnumValues: true,
|
|
381
419
|
skipValidation: true,
|
|
382
420
|
breadcrumbsPrefix: ["response"],
|
|
383
|
-
}));
|
|
421
|
+
}), _response.rawResponse);
|
|
384
422
|
default:
|
|
385
423
|
throw new errors.LettaError({
|
|
386
424
|
statusCode: _response.error.statusCode,
|
|
387
425
|
body: _response.error.body,
|
|
426
|
+
rawResponse: _response.rawResponse,
|
|
388
427
|
});
|
|
389
428
|
}
|
|
390
429
|
}
|
|
@@ -393,12 +432,14 @@ class Providers {
|
|
|
393
432
|
throw new errors.LettaError({
|
|
394
433
|
statusCode: _response.error.statusCode,
|
|
395
434
|
body: _response.error.rawBody,
|
|
435
|
+
rawResponse: _response.rawResponse,
|
|
396
436
|
});
|
|
397
437
|
case "timeout":
|
|
398
438
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/providers/check.");
|
|
399
439
|
case "unknown":
|
|
400
440
|
throw new errors.LettaError({
|
|
401
441
|
message: _response.error.errorMessage,
|
|
442
|
+
rawResponse: _response.rawResponse,
|
|
402
443
|
});
|
|
403
444
|
}
|
|
404
445
|
});
|
|
@@ -50,7 +50,8 @@ export declare class Runs {
|
|
|
50
50
|
* @example
|
|
51
51
|
* await client.runs.list()
|
|
52
52
|
*/
|
|
53
|
-
list(request?: Letta.RunsListRequest, requestOptions?: Runs.RequestOptions):
|
|
53
|
+
list(request?: Letta.RunsListRequest, requestOptions?: Runs.RequestOptions): core.HttpResponsePromise<Letta.Run[]>;
|
|
54
|
+
private __list;
|
|
54
55
|
/**
|
|
55
56
|
* List all active runs.
|
|
56
57
|
*
|
|
@@ -62,7 +63,8 @@ export declare class Runs {
|
|
|
62
63
|
* @example
|
|
63
64
|
* await client.runs.listActive()
|
|
64
65
|
*/
|
|
65
|
-
listActive(request?: Letta.RunsListActiveRequest, requestOptions?: Runs.RequestOptions):
|
|
66
|
+
listActive(request?: Letta.RunsListActiveRequest, requestOptions?: Runs.RequestOptions): core.HttpResponsePromise<Letta.Run[]>;
|
|
67
|
+
private __listActive;
|
|
66
68
|
/**
|
|
67
69
|
* Get the status of a run.
|
|
68
70
|
*
|
|
@@ -74,7 +76,8 @@ export declare class Runs {
|
|
|
74
76
|
* @example
|
|
75
77
|
* await client.runs.retrieve("run_id")
|
|
76
78
|
*/
|
|
77
|
-
retrieve(runId: string, requestOptions?: Runs.RequestOptions):
|
|
79
|
+
retrieve(runId: string, requestOptions?: Runs.RequestOptions): core.HttpResponsePromise<Letta.Run>;
|
|
80
|
+
private __retrieve;
|
|
78
81
|
/**
|
|
79
82
|
* Delete a run by its run_id.
|
|
80
83
|
*
|
|
@@ -86,7 +89,8 @@ export declare class Runs {
|
|
|
86
89
|
* @example
|
|
87
90
|
* await client.runs.delete("run_id")
|
|
88
91
|
*/
|
|
89
|
-
delete(runId: string, requestOptions?: Runs.RequestOptions):
|
|
92
|
+
delete(runId: string, requestOptions?: Runs.RequestOptions): core.HttpResponsePromise<Letta.Run>;
|
|
93
|
+
private __delete;
|
|
90
94
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
91
95
|
Authorization: string;
|
|
92
96
|
}>;
|