@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
|
@@ -52,8 +52,8 @@ exports.Groups = 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
|
const Client_1 = require("../resources/messages/client/Client");
|
|
59
59
|
class Groups {
|
|
@@ -75,13 +75,18 @@ class Groups {
|
|
|
75
75
|
* @example
|
|
76
76
|
* await client.groups.list()
|
|
77
77
|
*/
|
|
78
|
-
list() {
|
|
78
|
+
list(request = {}, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__list() {
|
|
79
82
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
80
83
|
var _a, _b, _c;
|
|
81
84
|
const { managerType, before, after, limit, projectId } = request;
|
|
82
85
|
const _queryParams = {};
|
|
83
86
|
if (managerType != null) {
|
|
84
|
-
_queryParams["manager_type"] = managerType
|
|
87
|
+
_queryParams["manager_type"] = serializers.ManagerType.jsonOrThrow(managerType, {
|
|
88
|
+
unrecognizedObjectKeys: "strip",
|
|
89
|
+
});
|
|
85
90
|
}
|
|
86
91
|
if (before != null) {
|
|
87
92
|
_queryParams["before"] = before;
|
|
@@ -100,7 +105,7 @@ class Groups {
|
|
|
100
105
|
method: "GET",
|
|
101
106
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
102
107
|
? 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.
|
|
108
|
+
: 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
109
|
contentType: "application/json",
|
|
105
110
|
queryParameters: _queryParams,
|
|
106
111
|
requestType: "json",
|
|
@@ -109,13 +114,16 @@ class Groups {
|
|
|
109
114
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
110
115
|
});
|
|
111
116
|
if (_response.ok) {
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
return {
|
|
118
|
+
data: serializers.groups.list.Response.parseOrThrow(_response.body, {
|
|
119
|
+
unrecognizedObjectKeys: "passthrough",
|
|
120
|
+
allowUnrecognizedUnionMembers: true,
|
|
121
|
+
allowUnrecognizedEnumValues: true,
|
|
122
|
+
skipValidation: true,
|
|
123
|
+
breadcrumbsPrefix: ["response"],
|
|
124
|
+
}),
|
|
125
|
+
rawResponse: _response.rawResponse,
|
|
126
|
+
};
|
|
119
127
|
}
|
|
120
128
|
if (_response.error.reason === "status-code") {
|
|
121
129
|
switch (_response.error.statusCode) {
|
|
@@ -126,11 +134,12 @@ class Groups {
|
|
|
126
134
|
allowUnrecognizedEnumValues: true,
|
|
127
135
|
skipValidation: true,
|
|
128
136
|
breadcrumbsPrefix: ["response"],
|
|
129
|
-
}));
|
|
137
|
+
}), _response.rawResponse);
|
|
130
138
|
default:
|
|
131
139
|
throw new errors.LettaError({
|
|
132
140
|
statusCode: _response.error.statusCode,
|
|
133
141
|
body: _response.error.body,
|
|
142
|
+
rawResponse: _response.rawResponse,
|
|
134
143
|
});
|
|
135
144
|
}
|
|
136
145
|
}
|
|
@@ -139,12 +148,14 @@ class Groups {
|
|
|
139
148
|
throw new errors.LettaError({
|
|
140
149
|
statusCode: _response.error.statusCode,
|
|
141
150
|
body: _response.error.rawBody,
|
|
151
|
+
rawResponse: _response.rawResponse,
|
|
142
152
|
});
|
|
143
153
|
case "timeout":
|
|
144
154
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/groups/.");
|
|
145
155
|
case "unknown":
|
|
146
156
|
throw new errors.LettaError({
|
|
147
157
|
message: _response.error.errorMessage,
|
|
158
|
+
rawResponse: _response.rawResponse,
|
|
148
159
|
});
|
|
149
160
|
}
|
|
150
161
|
});
|
|
@@ -164,6 +175,9 @@ class Groups {
|
|
|
164
175
|
* })
|
|
165
176
|
*/
|
|
166
177
|
create(request, requestOptions) {
|
|
178
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
179
|
+
}
|
|
180
|
+
__create(request, requestOptions) {
|
|
167
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
182
|
var _a, _b, _c;
|
|
169
183
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -171,7 +185,7 @@ class Groups {
|
|
|
171
185
|
method: "POST",
|
|
172
186
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
173
187
|
? yield core.Supplier.get(this._options.project)
|
|
174
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
188
|
+
: 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),
|
|
175
189
|
contentType: "application/json",
|
|
176
190
|
requestType: "json",
|
|
177
191
|
body: serializers.GroupCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -180,13 +194,16 @@ class Groups {
|
|
|
180
194
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
195
|
});
|
|
182
196
|
if (_response.ok) {
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
return {
|
|
198
|
+
data: serializers.Group.parseOrThrow(_response.body, {
|
|
199
|
+
unrecognizedObjectKeys: "passthrough",
|
|
200
|
+
allowUnrecognizedUnionMembers: true,
|
|
201
|
+
allowUnrecognizedEnumValues: true,
|
|
202
|
+
skipValidation: true,
|
|
203
|
+
breadcrumbsPrefix: ["response"],
|
|
204
|
+
}),
|
|
205
|
+
rawResponse: _response.rawResponse,
|
|
206
|
+
};
|
|
190
207
|
}
|
|
191
208
|
if (_response.error.reason === "status-code") {
|
|
192
209
|
switch (_response.error.statusCode) {
|
|
@@ -197,11 +214,12 @@ class Groups {
|
|
|
197
214
|
allowUnrecognizedEnumValues: true,
|
|
198
215
|
skipValidation: true,
|
|
199
216
|
breadcrumbsPrefix: ["response"],
|
|
200
|
-
}));
|
|
217
|
+
}), _response.rawResponse);
|
|
201
218
|
default:
|
|
202
219
|
throw new errors.LettaError({
|
|
203
220
|
statusCode: _response.error.statusCode,
|
|
204
221
|
body: _response.error.body,
|
|
222
|
+
rawResponse: _response.rawResponse,
|
|
205
223
|
});
|
|
206
224
|
}
|
|
207
225
|
}
|
|
@@ -210,12 +228,14 @@ class Groups {
|
|
|
210
228
|
throw new errors.LettaError({
|
|
211
229
|
statusCode: _response.error.statusCode,
|
|
212
230
|
body: _response.error.rawBody,
|
|
231
|
+
rawResponse: _response.rawResponse,
|
|
213
232
|
});
|
|
214
233
|
case "timeout":
|
|
215
234
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/groups/.");
|
|
216
235
|
case "unknown":
|
|
217
236
|
throw new errors.LettaError({
|
|
218
237
|
message: _response.error.errorMessage,
|
|
238
|
+
rawResponse: _response.rawResponse,
|
|
219
239
|
});
|
|
220
240
|
}
|
|
221
241
|
});
|
|
@@ -231,6 +251,9 @@ class Groups {
|
|
|
231
251
|
* await client.groups.count()
|
|
232
252
|
*/
|
|
233
253
|
count(requestOptions) {
|
|
254
|
+
return core.HttpResponsePromise.fromPromise(this.__count(requestOptions));
|
|
255
|
+
}
|
|
256
|
+
__count(requestOptions) {
|
|
234
257
|
return __awaiter(this, void 0, void 0, function* () {
|
|
235
258
|
var _a, _b, _c;
|
|
236
259
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -238,7 +261,7 @@ class Groups {
|
|
|
238
261
|
method: "GET",
|
|
239
262
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
240
263
|
? yield core.Supplier.get(this._options.project)
|
|
241
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
264
|
+
: 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),
|
|
242
265
|
contentType: "application/json",
|
|
243
266
|
requestType: "json",
|
|
244
267
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -246,13 +269,16 @@ class Groups {
|
|
|
246
269
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
247
270
|
});
|
|
248
271
|
if (_response.ok) {
|
|
249
|
-
return
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
272
|
+
return {
|
|
273
|
+
data: serializers.groups.count.Response.parseOrThrow(_response.body, {
|
|
274
|
+
unrecognizedObjectKeys: "passthrough",
|
|
275
|
+
allowUnrecognizedUnionMembers: true,
|
|
276
|
+
allowUnrecognizedEnumValues: true,
|
|
277
|
+
skipValidation: true,
|
|
278
|
+
breadcrumbsPrefix: ["response"],
|
|
279
|
+
}),
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
281
|
+
};
|
|
256
282
|
}
|
|
257
283
|
if (_response.error.reason === "status-code") {
|
|
258
284
|
switch (_response.error.statusCode) {
|
|
@@ -263,11 +289,12 @@ class Groups {
|
|
|
263
289
|
allowUnrecognizedEnumValues: true,
|
|
264
290
|
skipValidation: true,
|
|
265
291
|
breadcrumbsPrefix: ["response"],
|
|
266
|
-
}));
|
|
292
|
+
}), _response.rawResponse);
|
|
267
293
|
default:
|
|
268
294
|
throw new errors.LettaError({
|
|
269
295
|
statusCode: _response.error.statusCode,
|
|
270
296
|
body: _response.error.body,
|
|
297
|
+
rawResponse: _response.rawResponse,
|
|
271
298
|
});
|
|
272
299
|
}
|
|
273
300
|
}
|
|
@@ -276,12 +303,14 @@ class Groups {
|
|
|
276
303
|
throw new errors.LettaError({
|
|
277
304
|
statusCode: _response.error.statusCode,
|
|
278
305
|
body: _response.error.rawBody,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
279
307
|
});
|
|
280
308
|
case "timeout":
|
|
281
309
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/groups/count.");
|
|
282
310
|
case "unknown":
|
|
283
311
|
throw new errors.LettaError({
|
|
284
312
|
message: _response.error.errorMessage,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
285
314
|
});
|
|
286
315
|
}
|
|
287
316
|
});
|
|
@@ -298,6 +327,9 @@ class Groups {
|
|
|
298
327
|
* await client.groups.retrieve("group_id")
|
|
299
328
|
*/
|
|
300
329
|
retrieve(groupId, requestOptions) {
|
|
330
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieve(groupId, requestOptions));
|
|
331
|
+
}
|
|
332
|
+
__retrieve(groupId, requestOptions) {
|
|
301
333
|
return __awaiter(this, void 0, void 0, function* () {
|
|
302
334
|
var _a, _b, _c;
|
|
303
335
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -305,7 +337,7 @@ class Groups {
|
|
|
305
337
|
method: "GET",
|
|
306
338
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
307
339
|
? yield core.Supplier.get(this._options.project)
|
|
308
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
340
|
+
: 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),
|
|
309
341
|
contentType: "application/json",
|
|
310
342
|
requestType: "json",
|
|
311
343
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -313,13 +345,16 @@ class Groups {
|
|
|
313
345
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
314
346
|
});
|
|
315
347
|
if (_response.ok) {
|
|
316
|
-
return
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
348
|
+
return {
|
|
349
|
+
data: serializers.Group.parseOrThrow(_response.body, {
|
|
350
|
+
unrecognizedObjectKeys: "passthrough",
|
|
351
|
+
allowUnrecognizedUnionMembers: true,
|
|
352
|
+
allowUnrecognizedEnumValues: true,
|
|
353
|
+
skipValidation: true,
|
|
354
|
+
breadcrumbsPrefix: ["response"],
|
|
355
|
+
}),
|
|
356
|
+
rawResponse: _response.rawResponse,
|
|
357
|
+
};
|
|
323
358
|
}
|
|
324
359
|
if (_response.error.reason === "status-code") {
|
|
325
360
|
switch (_response.error.statusCode) {
|
|
@@ -330,11 +365,12 @@ class Groups {
|
|
|
330
365
|
allowUnrecognizedEnumValues: true,
|
|
331
366
|
skipValidation: true,
|
|
332
367
|
breadcrumbsPrefix: ["response"],
|
|
333
|
-
}));
|
|
368
|
+
}), _response.rawResponse);
|
|
334
369
|
default:
|
|
335
370
|
throw new errors.LettaError({
|
|
336
371
|
statusCode: _response.error.statusCode,
|
|
337
372
|
body: _response.error.body,
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
338
374
|
});
|
|
339
375
|
}
|
|
340
376
|
}
|
|
@@ -343,12 +379,14 @@ class Groups {
|
|
|
343
379
|
throw new errors.LettaError({
|
|
344
380
|
statusCode: _response.error.statusCode,
|
|
345
381
|
body: _response.error.rawBody,
|
|
382
|
+
rawResponse: _response.rawResponse,
|
|
346
383
|
});
|
|
347
384
|
case "timeout":
|
|
348
385
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/groups/{group_id}.");
|
|
349
386
|
case "unknown":
|
|
350
387
|
throw new errors.LettaError({
|
|
351
388
|
message: _response.error.errorMessage,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
352
390
|
});
|
|
353
391
|
}
|
|
354
392
|
});
|
|
@@ -365,6 +403,9 @@ class Groups {
|
|
|
365
403
|
* await client.groups.delete("group_id")
|
|
366
404
|
*/
|
|
367
405
|
delete(groupId, requestOptions) {
|
|
406
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(groupId, requestOptions));
|
|
407
|
+
}
|
|
408
|
+
__delete(groupId, requestOptions) {
|
|
368
409
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
410
|
var _a, _b, _c;
|
|
370
411
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -372,7 +413,7 @@ class Groups {
|
|
|
372
413
|
method: "DELETE",
|
|
373
414
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
374
415
|
? yield core.Supplier.get(this._options.project)
|
|
375
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
416
|
+
: 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),
|
|
376
417
|
contentType: "application/json",
|
|
377
418
|
requestType: "json",
|
|
378
419
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -380,7 +421,7 @@ class Groups {
|
|
|
380
421
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
381
422
|
});
|
|
382
423
|
if (_response.ok) {
|
|
383
|
-
return _response.body;
|
|
424
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
384
425
|
}
|
|
385
426
|
if (_response.error.reason === "status-code") {
|
|
386
427
|
switch (_response.error.statusCode) {
|
|
@@ -391,11 +432,12 @@ class Groups {
|
|
|
391
432
|
allowUnrecognizedEnumValues: true,
|
|
392
433
|
skipValidation: true,
|
|
393
434
|
breadcrumbsPrefix: ["response"],
|
|
394
|
-
}));
|
|
435
|
+
}), _response.rawResponse);
|
|
395
436
|
default:
|
|
396
437
|
throw new errors.LettaError({
|
|
397
438
|
statusCode: _response.error.statusCode,
|
|
398
439
|
body: _response.error.body,
|
|
440
|
+
rawResponse: _response.rawResponse,
|
|
399
441
|
});
|
|
400
442
|
}
|
|
401
443
|
}
|
|
@@ -404,12 +446,14 @@ class Groups {
|
|
|
404
446
|
throw new errors.LettaError({
|
|
405
447
|
statusCode: _response.error.statusCode,
|
|
406
448
|
body: _response.error.rawBody,
|
|
449
|
+
rawResponse: _response.rawResponse,
|
|
407
450
|
});
|
|
408
451
|
case "timeout":
|
|
409
452
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/groups/{group_id}.");
|
|
410
453
|
case "unknown":
|
|
411
454
|
throw new errors.LettaError({
|
|
412
455
|
message: _response.error.errorMessage,
|
|
456
|
+
rawResponse: _response.rawResponse,
|
|
413
457
|
});
|
|
414
458
|
}
|
|
415
459
|
});
|
|
@@ -426,7 +470,10 @@ class Groups {
|
|
|
426
470
|
* @example
|
|
427
471
|
* await client.groups.modify("group_id")
|
|
428
472
|
*/
|
|
429
|
-
modify(
|
|
473
|
+
modify(groupId, request = {}, requestOptions) {
|
|
474
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(groupId, request, requestOptions));
|
|
475
|
+
}
|
|
476
|
+
__modify(groupId_1) {
|
|
430
477
|
return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
|
|
431
478
|
var _a, _b, _c;
|
|
432
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -434,7 +481,7 @@ class Groups {
|
|
|
434
481
|
method: "PATCH",
|
|
435
482
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
436
483
|
? yield core.Supplier.get(this._options.project)
|
|
437
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
484
|
+
: 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),
|
|
438
485
|
contentType: "application/json",
|
|
439
486
|
requestType: "json",
|
|
440
487
|
body: serializers.GroupUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -443,13 +490,16 @@ class Groups {
|
|
|
443
490
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
444
491
|
});
|
|
445
492
|
if (_response.ok) {
|
|
446
|
-
return
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
493
|
+
return {
|
|
494
|
+
data: serializers.Group.parseOrThrow(_response.body, {
|
|
495
|
+
unrecognizedObjectKeys: "passthrough",
|
|
496
|
+
allowUnrecognizedUnionMembers: true,
|
|
497
|
+
allowUnrecognizedEnumValues: true,
|
|
498
|
+
skipValidation: true,
|
|
499
|
+
breadcrumbsPrefix: ["response"],
|
|
500
|
+
}),
|
|
501
|
+
rawResponse: _response.rawResponse,
|
|
502
|
+
};
|
|
453
503
|
}
|
|
454
504
|
if (_response.error.reason === "status-code") {
|
|
455
505
|
switch (_response.error.statusCode) {
|
|
@@ -460,11 +510,12 @@ class Groups {
|
|
|
460
510
|
allowUnrecognizedEnumValues: true,
|
|
461
511
|
skipValidation: true,
|
|
462
512
|
breadcrumbsPrefix: ["response"],
|
|
463
|
-
}));
|
|
513
|
+
}), _response.rawResponse);
|
|
464
514
|
default:
|
|
465
515
|
throw new errors.LettaError({
|
|
466
516
|
statusCode: _response.error.statusCode,
|
|
467
517
|
body: _response.error.body,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
468
519
|
});
|
|
469
520
|
}
|
|
470
521
|
}
|
|
@@ -473,12 +524,14 @@ class Groups {
|
|
|
473
524
|
throw new errors.LettaError({
|
|
474
525
|
statusCode: _response.error.statusCode,
|
|
475
526
|
body: _response.error.rawBody,
|
|
527
|
+
rawResponse: _response.rawResponse,
|
|
476
528
|
});
|
|
477
529
|
case "timeout":
|
|
478
530
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/groups/{group_id}.");
|
|
479
531
|
case "unknown":
|
|
480
532
|
throw new errors.LettaError({
|
|
481
533
|
message: _response.error.errorMessage,
|
|
534
|
+
rawResponse: _response.rawResponse,
|
|
482
535
|
});
|
|
483
536
|
}
|
|
484
537
|
});
|
|
@@ -42,7 +42,8 @@ export declare class Messages {
|
|
|
42
42
|
* @example
|
|
43
43
|
* await client.groups.messages.list("group_id")
|
|
44
44
|
*/
|
|
45
|
-
list(groupId: string, request?: Letta.groups.MessagesListRequest, requestOptions?: Messages.RequestOptions):
|
|
45
|
+
list(groupId: string, request?: Letta.groups.MessagesListRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Letta.LettaMessageUnion[]>;
|
|
46
|
+
private __list;
|
|
46
47
|
/**
|
|
47
48
|
* Process a user message and return the group's response.
|
|
48
49
|
* This endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern
|
|
@@ -64,13 +65,15 @@ export declare class Messages {
|
|
|
64
65
|
* }]
|
|
65
66
|
* })
|
|
66
67
|
*/
|
|
67
|
-
create(groupId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions):
|
|
68
|
+
create(groupId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Letta.LettaResponse>;
|
|
69
|
+
private __create;
|
|
68
70
|
/**
|
|
69
71
|
* Process a user message and return the group's responses.
|
|
70
72
|
* This endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern.
|
|
71
73
|
* It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
72
74
|
*/
|
|
73
|
-
createStream(groupId: string, request: Letta.LettaStreamingRequest, requestOptions?: Messages.RequestOptions):
|
|
75
|
+
createStream(groupId: string, request: Letta.LettaStreamingRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<core.Stream<Letta.groups.LettaStreamingResponse>>;
|
|
76
|
+
private __createStream;
|
|
74
77
|
/**
|
|
75
78
|
* Update the details of a message associated with an agent.
|
|
76
79
|
*
|
|
@@ -86,7 +89,8 @@ export declare class Messages {
|
|
|
86
89
|
* content: "content"
|
|
87
90
|
* })
|
|
88
91
|
*/
|
|
89
|
-
modify(groupId: string, messageId: string, request: Letta.groups.MessagesModifyRequest, requestOptions?: Messages.RequestOptions):
|
|
92
|
+
modify(groupId: string, messageId: string, request: Letta.groups.MessagesModifyRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Letta.groups.MessagesModifyResponse>;
|
|
93
|
+
private __modify;
|
|
90
94
|
/**
|
|
91
95
|
* Delete the group messages for all agents that are part of the multi-agent group.
|
|
92
96
|
*
|
|
@@ -98,7 +102,8 @@ export declare class Messages {
|
|
|
98
102
|
* @example
|
|
99
103
|
* await client.groups.messages.reset("group_id")
|
|
100
104
|
*/
|
|
101
|
-
reset(groupId: string, requestOptions?: Messages.RequestOptions):
|
|
105
|
+
reset(groupId: string, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
106
|
+
private __reset;
|
|
102
107
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
103
108
|
Authorization: string;
|
|
104
109
|
}>;
|