vellum-ai 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +32 -0
- package/Client.js +254 -36
- package/api/client/requests/ExecutePromptRequest.d.ts +20 -0
- package/api/client/requests/ExecutePromptRequest.js +5 -0
- package/api/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
- package/api/client/requests/ExecutePromptStreamRequest.js +5 -0
- package/api/client/requests/GenerateBodyRequest.d.ts +11 -0
- package/api/client/requests/SubmitCompletionActualsRequest.d.ts +6 -0
- package/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +6 -0
- package/api/client/requests/index.d.ts +2 -0
- package/api/errors/ForbiddenError.d.ts +1 -2
- package/api/resources/deployments/client/Client.js +2 -2
- package/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +6 -0
- package/api/resources/documentIndexes/client/Client.js +2 -2
- package/api/resources/documents/client/Client.d.ts +3 -0
- package/api/resources/documents/client/Client.js +7 -5
- package/api/resources/documents/client/requests/DocumentsListRequest.d.ts +4 -0
- package/api/resources/modelVersions/client/Client.js +1 -1
- package/api/resources/registeredPrompts/client/Client.js +1 -1
- package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -0
- package/api/resources/sandboxes/client/Client.d.ts +3 -0
- package/api/resources/sandboxes/client/Client.js +5 -2
- package/api/resources/testSuites/client/Client.d.ts +8 -0
- package/api/resources/testSuites/client/Client.js +10 -2
- package/api/resources/testSuites/client/requests/UpsertTestSuiteTestCaseRequest.d.ts +7 -0
- package/api/types/BlockTypeEnum.d.ts +4 -4
- package/api/types/ChatMessageRole.d.ts +4 -4
- package/api/types/DeploymentRead.d.ts +6 -6
- package/api/types/DeploymentStatus.d.ts +3 -3
- package/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
- package/api/types/DocumentIndexRead.d.ts +5 -5
- package/api/types/DocumentIndexStatus.d.ts +2 -2
- package/api/types/DocumentRead.d.ts +5 -5
- package/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
- package/api/types/EnvironmentEnum.d.ts +3 -3
- package/api/types/ErrorVariableValue.d.ts +7 -0
- package/api/types/ErrorVariableValue.js +5 -0
- package/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
- package/api/types/ExecutePromptApiErrorResponse.js +5 -0
- package/api/types/ExecutePromptEvent.d.ts +19 -0
- package/api/types/ExecutePromptEvent.js +5 -0
- package/api/types/ExecutePromptResponse.d.ts +13 -0
- package/api/types/ExecutePromptResponse.js +5 -0
- package/api/types/FinishReasonEnum.d.ts +3 -3
- package/api/types/FulfilledEnum.d.ts +4 -0
- package/api/types/FulfilledEnum.js +5 -0
- package/api/types/FulfilledExecutePromptEvent.d.ts +12 -0
- package/api/types/FulfilledExecutePromptEvent.js +5 -0
- package/api/types/FulfilledExecutePromptResponse.d.ts +15 -0
- package/api/types/FulfilledExecutePromptResponse.js +5 -0
- package/api/types/FulfilledPromptExecutionMeta.d.ts +11 -0
- package/api/types/FulfilledPromptExecutionMeta.js +5 -0
- package/api/types/GenerateOptionsRequest.d.ts +2 -2
- package/api/types/IndexingStateEnum.d.ts +5 -5
- package/api/types/InitiatedEnum.d.ts +4 -0
- package/api/types/InitiatedEnum.js +5 -0
- package/api/types/InitiatedExecutePromptEvent.d.ts +11 -0
- package/api/types/InitiatedExecutePromptEvent.js +5 -0
- package/api/types/InitiatedPromptExecutionMeta.d.ts +12 -0
- package/api/types/InitiatedPromptExecutionMeta.js +5 -0
- package/api/types/JsonVariableValue.d.ts +6 -0
- package/api/types/JsonVariableValue.js +5 -0
- package/api/types/LogicalOperator.d.ts +18 -18
- package/api/types/LogprobsEnum.d.ts +2 -2
- package/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
- package/api/types/ModelVersionRead.d.ts +13 -12
- package/api/types/ModelVersionReadStatusEnum.d.ts +4 -4
- package/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
- package/api/types/ProcessingStateEnum.d.ts +4 -4
- package/api/types/PromptDeploymentExpandMetaRequestRequest.d.ts +15 -0
- package/api/types/PromptDeploymentExpandMetaRequestRequest.js +5 -0
- package/api/types/PromptExecutionMeta.d.ts +14 -0
- package/api/types/PromptExecutionMeta.js +5 -0
- package/api/types/PromptOutput.d.ts +16 -0
- package/api/types/PromptOutput.js +5 -0
- package/api/types/ProviderEnum.d.ts +15 -13
- package/api/types/ProviderEnum.js +1 -0
- package/api/types/RawPromptExecutionOverridesRequest.d.ts +10 -0
- package/api/types/RawPromptExecutionOverridesRequest.js +5 -0
- package/api/types/RejectedEnum.d.ts +4 -0
- package/api/types/RejectedEnum.js +5 -0
- package/api/types/RejectedExecutePromptEvent.d.ts +12 -0
- package/api/types/RejectedExecutePromptEvent.js +5 -0
- package/api/types/RejectedExecutePromptResponse.d.ts +15 -0
- package/api/types/RejectedExecutePromptResponse.js +5 -0
- package/api/types/RejectedPromptExecutionMeta.d.ts +11 -0
- package/api/types/RejectedPromptExecutionMeta.js +5 -0
- package/api/types/ScenarioInputTypeEnum.d.ts +2 -2
- package/api/types/SlimDocument.d.ts +7 -7
- package/api/types/StreamingEnum.d.ts +4 -0
- package/api/types/StreamingEnum.js +5 -0
- package/api/types/StreamingExecutePromptEvent.d.ts +15 -0
- package/api/types/StreamingExecutePromptEvent.js +5 -0
- package/api/types/StreamingPromptExecutionMeta.d.ts +9 -0
- package/api/types/StreamingPromptExecutionMeta.js +5 -0
- package/api/types/StringVariableValue.d.ts +6 -0
- package/api/types/StringVariableValue.js +5 -0
- package/api/types/VellumErrorCodeEnum.d.ts +3 -3
- package/api/types/VellumVariableType.d.ts +9 -7
- package/api/types/VellumVariableType.js +1 -0
- package/api/types/WorkflowExecutionEventErrorCode.d.ts +6 -6
- package/api/types/WorkflowExecutionEventType.d.ts +2 -2
- package/api/types/WorkflowNodeResultEventState.d.ts +4 -4
- package/api/types/WorkflowRequestInputRequest.d.ts +4 -1
- package/api/types/WorkflowRequestNumberInputRequest.d.ts +8 -0
- package/api/types/WorkflowRequestNumberInputRequest.js +5 -0
- package/api/types/index.d.ts +25 -0
- package/api/types/index.js +25 -0
- package/core/fetcher/APIResponse.d.ts +1 -0
- package/core/fetcher/Fetcher.d.ts +1 -4
- package/core/fetcher/Fetcher.js +52 -31
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
- package/core/fetcher/index.d.ts +1 -0
- package/core/fetcher/index.js +3 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/core/streaming-fetcher/Stream.d.ts +3 -2
- package/core/streaming-fetcher/index.d.ts +0 -3
- package/core/streaming-fetcher/index.js +1 -5
- package/dist/Client.d.ts +32 -0
- package/dist/Client.js +254 -36
- package/dist/api/client/requests/ExecutePromptRequest.d.ts +20 -0
- package/dist/api/client/requests/ExecutePromptRequest.js +5 -0
- package/dist/api/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
- package/dist/api/client/requests/ExecutePromptStreamRequest.js +5 -0
- package/dist/api/client/requests/GenerateBodyRequest.d.ts +11 -0
- package/dist/api/client/requests/SubmitCompletionActualsRequest.d.ts +6 -0
- package/dist/api/client/requests/SubmitWorkflowExecutionActualsRequest.d.ts +6 -0
- package/dist/api/client/requests/index.d.ts +2 -0
- package/dist/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/api/resources/deployments/client/Client.js +2 -2
- package/dist/api/resources/deployments/client/requests/DeploymentProviderPayloadRequest.d.ts +6 -0
- package/dist/api/resources/documentIndexes/client/Client.js +2 -2
- package/dist/api/resources/documents/client/Client.d.ts +3 -0
- package/dist/api/resources/documents/client/Client.js +7 -5
- package/dist/api/resources/documents/client/requests/DocumentsListRequest.d.ts +4 -0
- package/dist/api/resources/modelVersions/client/Client.js +1 -1
- package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
- package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +1 -0
- package/dist/api/resources/sandboxes/client/Client.d.ts +3 -0
- package/dist/api/resources/sandboxes/client/Client.js +5 -2
- package/dist/api/resources/testSuites/client/Client.d.ts +8 -0
- package/dist/api/resources/testSuites/client/Client.js +10 -2
- package/dist/api/resources/testSuites/client/requests/UpsertTestSuiteTestCaseRequest.d.ts +7 -0
- package/dist/api/types/BlockTypeEnum.d.ts +4 -4
- package/dist/api/types/ChatMessageRole.d.ts +4 -4
- package/dist/api/types/DeploymentRead.d.ts +6 -6
- package/dist/api/types/DeploymentStatus.d.ts +3 -3
- package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
- package/dist/api/types/DocumentIndexRead.d.ts +5 -5
- package/dist/api/types/DocumentIndexStatus.d.ts +2 -2
- package/dist/api/types/DocumentRead.d.ts +5 -5
- package/dist/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
- package/dist/api/types/EnvironmentEnum.d.ts +3 -3
- package/dist/api/types/ErrorVariableValue.d.ts +7 -0
- package/dist/api/types/ErrorVariableValue.js +5 -0
- package/dist/api/types/ExecutePromptApiErrorResponse.d.ts +7 -0
- package/dist/api/types/ExecutePromptApiErrorResponse.js +5 -0
- package/dist/api/types/ExecutePromptEvent.d.ts +19 -0
- package/dist/api/types/ExecutePromptEvent.js +5 -0
- package/dist/api/types/ExecutePromptResponse.d.ts +13 -0
- package/dist/api/types/ExecutePromptResponse.js +5 -0
- package/dist/api/types/FinishReasonEnum.d.ts +3 -3
- package/dist/api/types/FulfilledEnum.d.ts +4 -0
- package/dist/api/types/FulfilledEnum.js +5 -0
- package/dist/api/types/FulfilledExecutePromptEvent.d.ts +12 -0
- package/dist/api/types/FulfilledExecutePromptEvent.js +5 -0
- package/dist/api/types/FulfilledExecutePromptResponse.d.ts +15 -0
- package/dist/api/types/FulfilledExecutePromptResponse.js +5 -0
- package/dist/api/types/FulfilledPromptExecutionMeta.d.ts +11 -0
- package/dist/api/types/FulfilledPromptExecutionMeta.js +5 -0
- package/dist/api/types/GenerateOptionsRequest.d.ts +2 -2
- package/dist/api/types/IndexingStateEnum.d.ts +5 -5
- package/dist/api/types/InitiatedEnum.d.ts +4 -0
- package/dist/api/types/InitiatedEnum.js +5 -0
- package/dist/api/types/InitiatedExecutePromptEvent.d.ts +11 -0
- package/dist/api/types/InitiatedExecutePromptEvent.js +5 -0
- package/dist/api/types/InitiatedPromptExecutionMeta.d.ts +12 -0
- package/dist/api/types/InitiatedPromptExecutionMeta.js +5 -0
- package/dist/api/types/JsonVariableValue.d.ts +6 -0
- package/dist/api/types/JsonVariableValue.js +5 -0
- package/dist/api/types/LogicalOperator.d.ts +18 -18
- package/dist/api/types/LogprobsEnum.d.ts +2 -2
- package/dist/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
- package/dist/api/types/ModelVersionRead.d.ts +13 -12
- package/dist/api/types/ModelVersionReadStatusEnum.d.ts +4 -4
- package/dist/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
- package/dist/api/types/ProcessingStateEnum.d.ts +4 -4
- package/dist/api/types/PromptDeploymentExpandMetaRequestRequest.d.ts +15 -0
- package/dist/api/types/PromptDeploymentExpandMetaRequestRequest.js +5 -0
- package/dist/api/types/PromptExecutionMeta.d.ts +14 -0
- package/dist/api/types/PromptExecutionMeta.js +5 -0
- package/dist/api/types/PromptOutput.d.ts +16 -0
- package/dist/api/types/PromptOutput.js +5 -0
- package/dist/api/types/ProviderEnum.d.ts +15 -13
- package/dist/api/types/ProviderEnum.js +1 -0
- package/dist/api/types/RawPromptExecutionOverridesRequest.d.ts +10 -0
- package/dist/api/types/RawPromptExecutionOverridesRequest.js +5 -0
- package/dist/api/types/RejectedEnum.d.ts +4 -0
- package/dist/api/types/RejectedEnum.js +5 -0
- package/dist/api/types/RejectedExecutePromptEvent.d.ts +12 -0
- package/dist/api/types/RejectedExecutePromptEvent.js +5 -0
- package/dist/api/types/RejectedExecutePromptResponse.d.ts +15 -0
- package/dist/api/types/RejectedExecutePromptResponse.js +5 -0
- package/dist/api/types/RejectedPromptExecutionMeta.d.ts +11 -0
- package/dist/api/types/RejectedPromptExecutionMeta.js +5 -0
- package/dist/api/types/ScenarioInputTypeEnum.d.ts +2 -2
- package/dist/api/types/SlimDocument.d.ts +7 -7
- package/dist/api/types/StreamingEnum.d.ts +4 -0
- package/dist/api/types/StreamingEnum.js +5 -0
- package/dist/api/types/StreamingExecutePromptEvent.d.ts +15 -0
- package/dist/api/types/StreamingExecutePromptEvent.js +5 -0
- package/dist/api/types/StreamingPromptExecutionMeta.d.ts +9 -0
- package/dist/api/types/StreamingPromptExecutionMeta.js +5 -0
- package/dist/api/types/StringVariableValue.d.ts +6 -0
- package/dist/api/types/StringVariableValue.js +5 -0
- package/dist/api/types/VellumErrorCodeEnum.d.ts +3 -3
- package/dist/api/types/VellumVariableType.d.ts +9 -7
- package/dist/api/types/VellumVariableType.js +1 -0
- package/dist/api/types/WorkflowExecutionEventErrorCode.d.ts +6 -6
- package/dist/api/types/WorkflowExecutionEventType.d.ts +2 -2
- package/dist/api/types/WorkflowNodeResultEventState.d.ts +4 -4
- package/dist/api/types/WorkflowRequestInputRequest.d.ts +4 -1
- package/dist/api/types/WorkflowRequestNumberInputRequest.d.ts +8 -0
- package/dist/api/types/WorkflowRequestNumberInputRequest.js +5 -0
- package/dist/api/types/index.d.ts +25 -0
- package/dist/api/types/index.js +25 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -4
- package/dist/core/fetcher/Fetcher.js +52 -31
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
- package/dist/core/fetcher/index.d.ts +1 -0
- package/dist/core/fetcher/index.js +3 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/streaming-fetcher/Stream.d.ts +3 -2
- package/dist/core/streaming-fetcher/index.d.ts +0 -3
- package/dist/core/streaming-fetcher/index.js +1 -5
- package/dist/serialization/client/requests/ExecutePromptRequest.d.ts +20 -0
- package/dist/serialization/client/requests/ExecutePromptRequest.js +52 -0
- package/dist/serialization/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
- package/dist/serialization/client/requests/ExecutePromptStreamRequest.js +52 -0
- package/dist/serialization/client/requests/index.d.ts +2 -0
- package/dist/serialization/client/requests/index.js +5 -1
- package/dist/serialization/types/ErrorVariableValue.d.ts +12 -0
- package/dist/serialization/types/ErrorVariableValue.js +42 -0
- package/dist/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
- package/dist/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
- package/dist/serialization/types/ExecutePromptEvent.d.ts +22 -0
- package/dist/serialization/types/ExecutePromptEvent.js +50 -0
- package/dist/serialization/types/ExecutePromptResponse.d.ts +16 -0
- package/dist/serialization/types/ExecutePromptResponse.js +48 -0
- package/dist/serialization/types/FulfilledEnum.d.ts +10 -0
- package/dist/serialization/types/FulfilledEnum.js +31 -0
- package/dist/serialization/types/FulfilledExecutePromptEvent.d.ts +14 -0
- package/dist/serialization/types/FulfilledExecutePromptEvent.js +44 -0
- package/dist/serialization/types/FulfilledExecutePromptResponse.d.ts +15 -0
- package/dist/serialization/types/FulfilledExecutePromptResponse.js +45 -0
- package/dist/serialization/types/FulfilledPromptExecutionMeta.d.ts +13 -0
- package/dist/serialization/types/FulfilledPromptExecutionMeta.js +43 -0
- package/dist/serialization/types/InitiatedEnum.d.ts +10 -0
- package/dist/serialization/types/InitiatedEnum.js +31 -0
- package/dist/serialization/types/InitiatedExecutePromptEvent.d.ts +13 -0
- package/dist/serialization/types/InitiatedExecutePromptEvent.js +43 -0
- package/dist/serialization/types/InitiatedPromptExecutionMeta.d.ts +15 -0
- package/dist/serialization/types/InitiatedPromptExecutionMeta.js +36 -0
- package/dist/serialization/types/JsonVariableValue.d.ts +12 -0
- package/dist/serialization/types/JsonVariableValue.js +33 -0
- package/dist/serialization/types/PromptDeploymentExpandMetaRequestRequest.d.ts +16 -0
- package/dist/serialization/types/PromptDeploymentExpandMetaRequestRequest.js +37 -0
- package/dist/serialization/types/PromptExecutionMeta.d.ts +16 -0
- package/dist/serialization/types/PromptExecutionMeta.js +46 -0
- package/dist/serialization/types/PromptOutput.d.ts +19 -0
- package/dist/serialization/types/PromptOutput.js +49 -0
- package/dist/serialization/types/ProviderEnum.d.ts +1 -1
- package/dist/serialization/types/ProviderEnum.js +1 -0
- package/dist/serialization/types/RawPromptExecutionOverridesRequest.d.ts +14 -0
- package/dist/serialization/types/RawPromptExecutionOverridesRequest.js +35 -0
- package/dist/serialization/types/RejectedEnum.d.ts +10 -0
- package/dist/serialization/types/RejectedEnum.js +31 -0
- package/dist/serialization/types/RejectedExecutePromptEvent.d.ts +14 -0
- package/dist/serialization/types/RejectedExecutePromptEvent.js +44 -0
- package/dist/serialization/types/RejectedExecutePromptResponse.d.ts +15 -0
- package/dist/serialization/types/RejectedExecutePromptResponse.js +45 -0
- package/dist/serialization/types/RejectedPromptExecutionMeta.d.ts +13 -0
- package/dist/serialization/types/RejectedPromptExecutionMeta.js +43 -0
- package/dist/serialization/types/StreamingEnum.d.ts +10 -0
- package/dist/serialization/types/StreamingEnum.js +31 -0
- package/dist/serialization/types/StreamingExecutePromptEvent.d.ts +16 -0
- package/dist/serialization/types/StreamingExecutePromptEvent.js +46 -0
- package/dist/serialization/types/StreamingPromptExecutionMeta.d.ts +12 -0
- package/dist/serialization/types/StreamingPromptExecutionMeta.js +33 -0
- package/dist/serialization/types/StringVariableValue.d.ts +12 -0
- package/dist/serialization/types/StringVariableValue.js +33 -0
- package/dist/serialization/types/VellumVariableType.d.ts +1 -1
- package/dist/serialization/types/VellumVariableType.js +1 -1
- package/dist/serialization/types/WorkflowRequestInputRequest.d.ts +4 -1
- package/dist/serialization/types/WorkflowRequestInputRequest.js +1 -0
- package/dist/serialization/types/WorkflowRequestNumberInputRequest.d.ts +13 -0
- package/dist/serialization/types/WorkflowRequestNumberInputRequest.js +34 -0
- package/dist/serialization/types/index.d.ts +25 -0
- package/dist/serialization/types/index.js +25 -0
- package/package.json +6 -5
- package/serialization/client/requests/ExecutePromptRequest.d.ts +20 -0
- package/serialization/client/requests/ExecutePromptRequest.js +52 -0
- package/serialization/client/requests/ExecutePromptStreamRequest.d.ts +20 -0
- package/serialization/client/requests/ExecutePromptStreamRequest.js +52 -0
- package/serialization/client/requests/index.d.ts +2 -0
- package/serialization/client/requests/index.js +5 -1
- package/serialization/types/ErrorVariableValue.d.ts +12 -0
- package/serialization/types/ErrorVariableValue.js +42 -0
- package/serialization/types/ExecutePromptApiErrorResponse.d.ts +12 -0
- package/serialization/types/ExecutePromptApiErrorResponse.js +33 -0
- package/serialization/types/ExecutePromptEvent.d.ts +22 -0
- package/serialization/types/ExecutePromptEvent.js +50 -0
- package/serialization/types/ExecutePromptResponse.d.ts +16 -0
- package/serialization/types/ExecutePromptResponse.js +48 -0
- package/serialization/types/FulfilledEnum.d.ts +10 -0
- package/serialization/types/FulfilledEnum.js +31 -0
- package/serialization/types/FulfilledExecutePromptEvent.d.ts +14 -0
- package/serialization/types/FulfilledExecutePromptEvent.js +44 -0
- package/serialization/types/FulfilledExecutePromptResponse.d.ts +15 -0
- package/serialization/types/FulfilledExecutePromptResponse.js +45 -0
- package/serialization/types/FulfilledPromptExecutionMeta.d.ts +13 -0
- package/serialization/types/FulfilledPromptExecutionMeta.js +43 -0
- package/serialization/types/InitiatedEnum.d.ts +10 -0
- package/serialization/types/InitiatedEnum.js +31 -0
- package/serialization/types/InitiatedExecutePromptEvent.d.ts +13 -0
- package/serialization/types/InitiatedExecutePromptEvent.js +43 -0
- package/serialization/types/InitiatedPromptExecutionMeta.d.ts +15 -0
- package/serialization/types/InitiatedPromptExecutionMeta.js +36 -0
- package/serialization/types/JsonVariableValue.d.ts +12 -0
- package/serialization/types/JsonVariableValue.js +33 -0
- package/serialization/types/PromptDeploymentExpandMetaRequestRequest.d.ts +16 -0
- package/serialization/types/PromptDeploymentExpandMetaRequestRequest.js +37 -0
- package/serialization/types/PromptExecutionMeta.d.ts +16 -0
- package/serialization/types/PromptExecutionMeta.js +46 -0
- package/serialization/types/PromptOutput.d.ts +19 -0
- package/serialization/types/PromptOutput.js +49 -0
- package/serialization/types/ProviderEnum.d.ts +1 -1
- package/serialization/types/ProviderEnum.js +1 -0
- package/serialization/types/RawPromptExecutionOverridesRequest.d.ts +14 -0
- package/serialization/types/RawPromptExecutionOverridesRequest.js +35 -0
- package/serialization/types/RejectedEnum.d.ts +10 -0
- package/serialization/types/RejectedEnum.js +31 -0
- package/serialization/types/RejectedExecutePromptEvent.d.ts +14 -0
- package/serialization/types/RejectedExecutePromptEvent.js +44 -0
- package/serialization/types/RejectedExecutePromptResponse.d.ts +15 -0
- package/serialization/types/RejectedExecutePromptResponse.js +45 -0
- package/serialization/types/RejectedPromptExecutionMeta.d.ts +13 -0
- package/serialization/types/RejectedPromptExecutionMeta.js +43 -0
- package/serialization/types/StreamingEnum.d.ts +10 -0
- package/serialization/types/StreamingEnum.js +31 -0
- package/serialization/types/StreamingExecutePromptEvent.d.ts +16 -0
- package/serialization/types/StreamingExecutePromptEvent.js +46 -0
- package/serialization/types/StreamingPromptExecutionMeta.d.ts +12 -0
- package/serialization/types/StreamingPromptExecutionMeta.js +33 -0
- package/serialization/types/StringVariableValue.d.ts +12 -0
- package/serialization/types/StringVariableValue.js +33 -0
- package/serialization/types/VellumVariableType.d.ts +1 -1
- package/serialization/types/VellumVariableType.js +1 -1
- package/serialization/types/WorkflowRequestInputRequest.d.ts +4 -1
- package/serialization/types/WorkflowRequestInputRequest.js +1 -0
- package/serialization/types/WorkflowRequestNumberInputRequest.d.ts +13 -0
- package/serialization/types/WorkflowRequestNumberInputRequest.js +34 -0
- package/serialization/types/index.d.ts +25 -0
- package/serialization/types/index.js +25 -0
- package/core/form-data-utils/getFormDataContentLength.d.ts +0 -2
- package/core/form-data-utils/getFormDataContentLength.js +0 -27
- package/core/form-data-utils/index.d.ts +0 -1
- package/core/form-data-utils/index.js +0 -5
- package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -24
- package/core/streaming-fetcher/StreamingFetcher.js +0 -58
- package/core/streaming-fetcher/getHeader.d.ts +0 -2
- package/dist/core/form-data-utils/getFormDataContentLength.d.ts +0 -2
- package/dist/core/form-data-utils/getFormDataContentLength.js +0 -27
- package/dist/core/form-data-utils/index.d.ts +0 -1
- package/dist/core/form-data-utils/index.js +0 -5
- package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -24
- package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -58
- package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
package/Client.d.ts
CHANGED
|
@@ -24,6 +24,18 @@ export declare namespace VellumClient {
|
|
|
24
24
|
export declare class VellumClient {
|
|
25
25
|
protected readonly _options: VellumClient.Options;
|
|
26
26
|
constructor(_options: VellumClient.Options);
|
|
27
|
+
/**
|
|
28
|
+
* Executes a deployed Prompt and returns the result.
|
|
29
|
+
* @throws {@link Vellum.BadRequestError}
|
|
30
|
+
* @throws {@link Vellum.ForbiddenError}
|
|
31
|
+
* @throws {@link Vellum.NotFoundError}
|
|
32
|
+
* @throws {@link Vellum.InternalServerError}
|
|
33
|
+
*/
|
|
34
|
+
executePrompt(request: Vellum.ExecutePromptRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.ExecutePromptResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Executes a deployed Prompt and streams back the results.
|
|
37
|
+
*/
|
|
38
|
+
executePromptStream(request: Vellum.ExecutePromptStreamRequest, requestOptions?: VellumClient.RequestOptions): Promise<core.Stream<Vellum.ExecutePromptEvent>>;
|
|
27
39
|
/**
|
|
28
40
|
* Executes a deployed Workflow and streams back its results.
|
|
29
41
|
*/
|
|
@@ -36,6 +48,16 @@ export declare class VellumClient {
|
|
|
36
48
|
* @throws {@link Vellum.ForbiddenError}
|
|
37
49
|
* @throws {@link Vellum.NotFoundError}
|
|
38
50
|
* @throws {@link Vellum.InternalServerError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await vellum.generate({
|
|
54
|
+
* requests: [{
|
|
55
|
+
* inputValues: {}
|
|
56
|
+
* }],
|
|
57
|
+
* options: {
|
|
58
|
+
* logprobs: Vellum.LogprobsEnum.All
|
|
59
|
+
* }
|
|
60
|
+
* })
|
|
39
61
|
*/
|
|
40
62
|
generate(request: Vellum.GenerateBodyRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.GenerateResponse>;
|
|
41
63
|
/**
|
|
@@ -60,12 +82,22 @@ export declare class VellumClient {
|
|
|
60
82
|
* @throws {@link Vellum.BadRequestError}
|
|
61
83
|
* @throws {@link Vellum.NotFoundError}
|
|
62
84
|
* @throws {@link Vellum.InternalServerError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await vellum.submitCompletionActuals({
|
|
88
|
+
* actuals: []
|
|
89
|
+
* })
|
|
63
90
|
*/
|
|
64
91
|
submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest, requestOptions?: VellumClient.RequestOptions): Promise<void>;
|
|
65
92
|
/**
|
|
66
93
|
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
67
94
|
*
|
|
68
95
|
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* await vellum.submitWorkflowExecutionActuals({
|
|
99
|
+
* actuals: []
|
|
100
|
+
* })
|
|
69
101
|
*/
|
|
70
102
|
submitWorkflowExecutionActuals(request: Vellum.SubmitWorkflowExecutionActualsRequest, requestOptions?: VellumClient.RequestOptions): Promise<void>;
|
|
71
103
|
protected _deployments: Deployments | undefined;
|
package/Client.js
CHANGED
|
@@ -56,13 +56,148 @@ class VellumClient {
|
|
|
56
56
|
constructor(_options) {
|
|
57
57
|
this._options = _options;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Executes a deployed Prompt and returns the result.
|
|
61
|
+
* @throws {@link Vellum.BadRequestError}
|
|
62
|
+
* @throws {@link Vellum.ForbiddenError}
|
|
63
|
+
* @throws {@link Vellum.NotFoundError}
|
|
64
|
+
* @throws {@link Vellum.InternalServerError}
|
|
65
|
+
*/
|
|
66
|
+
executePrompt(request, requestOptions) {
|
|
67
|
+
var _a;
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const _response = yield core.fetcher({
|
|
70
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
71
|
+
.predict, "v1/execute-prompt"),
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers: {
|
|
74
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
75
|
+
"X-Fern-Language": "JavaScript",
|
|
76
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
77
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
78
|
+
},
|
|
79
|
+
contentType: "application/json",
|
|
80
|
+
body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
});
|
|
84
|
+
if (_response.ok) {
|
|
85
|
+
return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
|
|
86
|
+
unrecognizedObjectKeys: "passthrough",
|
|
87
|
+
allowUnrecognizedUnionMembers: true,
|
|
88
|
+
allowUnrecognizedEnumValues: true,
|
|
89
|
+
breadcrumbsPrefix: ["response"],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (_response.error.reason === "status-code") {
|
|
93
|
+
switch (_response.error.statusCode) {
|
|
94
|
+
case 400:
|
|
95
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
96
|
+
case 403:
|
|
97
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
98
|
+
case 404:
|
|
99
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
100
|
+
case 500:
|
|
101
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
102
|
+
default:
|
|
103
|
+
throw new errors.VellumError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.body,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
switch (_response.error.reason) {
|
|
110
|
+
case "non-json":
|
|
111
|
+
throw new errors.VellumError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.rawBody,
|
|
114
|
+
});
|
|
115
|
+
case "timeout":
|
|
116
|
+
throw new errors.VellumTimeoutError();
|
|
117
|
+
case "unknown":
|
|
118
|
+
throw new errors.VellumError({
|
|
119
|
+
message: _response.error.errorMessage,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Executes a deployed Prompt and streams back the results.
|
|
126
|
+
*/
|
|
127
|
+
executePromptStream(request, requestOptions) {
|
|
128
|
+
var _a;
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const _response = yield core.fetcher({
|
|
131
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
132
|
+
.predict, "v1/execute-prompt-stream"),
|
|
133
|
+
method: "POST",
|
|
134
|
+
headers: {
|
|
135
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
136
|
+
"X-Fern-Language": "JavaScript",
|
|
137
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
138
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
139
|
+
},
|
|
140
|
+
contentType: "application/json",
|
|
141
|
+
body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
|
|
142
|
+
unrecognizedObjectKeys: "strip",
|
|
143
|
+
}),
|
|
144
|
+
responseType: "streaming",
|
|
145
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
146
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
|
+
});
|
|
148
|
+
if (_response.ok) {
|
|
149
|
+
return new core.Stream({
|
|
150
|
+
stream: _response.body,
|
|
151
|
+
terminator: "\n",
|
|
152
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
return yield serializers.ExecutePromptEvent.parseOrThrow(data, {
|
|
154
|
+
unrecognizedObjectKeys: "passthrough",
|
|
155
|
+
allowUnrecognizedUnionMembers: true,
|
|
156
|
+
allowUnrecognizedEnumValues: true,
|
|
157
|
+
breadcrumbsPrefix: ["response"],
|
|
158
|
+
});
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (_response.error.reason === "status-code") {
|
|
163
|
+
switch (_response.error.statusCode) {
|
|
164
|
+
case 400:
|
|
165
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
166
|
+
case 403:
|
|
167
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
168
|
+
case 404:
|
|
169
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
170
|
+
case 500:
|
|
171
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
172
|
+
default:
|
|
173
|
+
throw new errors.VellumError({
|
|
174
|
+
statusCode: _response.error.statusCode,
|
|
175
|
+
body: _response.error.body,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
switch (_response.error.reason) {
|
|
180
|
+
case "non-json":
|
|
181
|
+
throw new errors.VellumError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.rawBody,
|
|
184
|
+
});
|
|
185
|
+
case "timeout":
|
|
186
|
+
throw new errors.VellumTimeoutError();
|
|
187
|
+
case "unknown":
|
|
188
|
+
throw new errors.VellumError({
|
|
189
|
+
message: _response.error.errorMessage,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
59
194
|
/**
|
|
60
195
|
* Executes a deployed Workflow and streams back its results.
|
|
61
196
|
*/
|
|
62
197
|
executeWorkflowStream(request, requestOptions) {
|
|
63
198
|
var _a;
|
|
64
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const _response = yield core.
|
|
200
|
+
const _response = yield core.fetcher({
|
|
66
201
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
67
202
|
.predict, "v1/execute-workflow-stream"),
|
|
68
203
|
method: "POST",
|
|
@@ -70,25 +205,58 @@ class VellumClient {
|
|
|
70
205
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
71
206
|
"X-Fern-Language": "JavaScript",
|
|
72
207
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
73
|
-
"X-Fern-SDK-Version": "
|
|
208
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
74
209
|
},
|
|
210
|
+
contentType: "application/json",
|
|
75
211
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
76
212
|
unrecognizedObjectKeys: "strip",
|
|
77
213
|
}),
|
|
214
|
+
responseType: "streaming",
|
|
78
215
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
216
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
217
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
218
|
+
if (_response.ok) {
|
|
219
|
+
return new core.Stream({
|
|
220
|
+
stream: _response.body,
|
|
221
|
+
terminator: "\n",
|
|
222
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
return yield serializers.WorkflowStreamEvent.parseOrThrow(data, {
|
|
224
|
+
unrecognizedObjectKeys: "passthrough",
|
|
225
|
+
allowUnrecognizedUnionMembers: true,
|
|
226
|
+
allowUnrecognizedEnumValues: true,
|
|
227
|
+
breadcrumbsPrefix: ["response"],
|
|
228
|
+
});
|
|
229
|
+
}),
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
if (_response.error.reason === "status-code") {
|
|
233
|
+
switch (_response.error.statusCode) {
|
|
234
|
+
case 400:
|
|
235
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
236
|
+
case 404:
|
|
237
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
238
|
+
case 500:
|
|
239
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
240
|
+
default:
|
|
241
|
+
throw new errors.VellumError({
|
|
242
|
+
statusCode: _response.error.statusCode,
|
|
243
|
+
body: _response.error.body,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
switch (_response.error.reason) {
|
|
248
|
+
case "non-json":
|
|
249
|
+
throw new errors.VellumError({
|
|
250
|
+
statusCode: _response.error.statusCode,
|
|
251
|
+
body: _response.error.rawBody,
|
|
89
252
|
});
|
|
90
|
-
|
|
91
|
-
|
|
253
|
+
case "timeout":
|
|
254
|
+
throw new errors.VellumTimeoutError();
|
|
255
|
+
case "unknown":
|
|
256
|
+
throw new errors.VellumError({
|
|
257
|
+
message: _response.error.errorMessage,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
92
260
|
});
|
|
93
261
|
}
|
|
94
262
|
/**
|
|
@@ -99,6 +267,16 @@ class VellumClient {
|
|
|
99
267
|
* @throws {@link Vellum.ForbiddenError}
|
|
100
268
|
* @throws {@link Vellum.NotFoundError}
|
|
101
269
|
* @throws {@link Vellum.InternalServerError}
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* await vellum.generate({
|
|
273
|
+
* requests: [{
|
|
274
|
+
* inputValues: {}
|
|
275
|
+
* }],
|
|
276
|
+
* options: {
|
|
277
|
+
* logprobs: Vellum.LogprobsEnum.All
|
|
278
|
+
* }
|
|
279
|
+
* })
|
|
102
280
|
*/
|
|
103
281
|
generate(request, requestOptions) {
|
|
104
282
|
var _a;
|
|
@@ -111,7 +289,7 @@ class VellumClient {
|
|
|
111
289
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
290
|
"X-Fern-Language": "JavaScript",
|
|
113
291
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "
|
|
292
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
115
293
|
},
|
|
116
294
|
contentType: "application/json",
|
|
117
295
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -131,12 +309,7 @@ class VellumClient {
|
|
|
131
309
|
case 400:
|
|
132
310
|
throw new Vellum.BadRequestError(_response.error.body);
|
|
133
311
|
case 403:
|
|
134
|
-
throw new Vellum.ForbiddenError(
|
|
135
|
-
unrecognizedObjectKeys: "passthrough",
|
|
136
|
-
allowUnrecognizedUnionMembers: true,
|
|
137
|
-
allowUnrecognizedEnumValues: true,
|
|
138
|
-
breadcrumbsPrefix: ["response"],
|
|
139
|
-
}));
|
|
312
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
140
313
|
case 404:
|
|
141
314
|
throw new Vellum.NotFoundError(_response.error.body);
|
|
142
315
|
case 500:
|
|
@@ -171,7 +344,7 @@ class VellumClient {
|
|
|
171
344
|
generateStream(request, requestOptions) {
|
|
172
345
|
var _a;
|
|
173
346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
-
const _response = yield core.
|
|
347
|
+
const _response = yield core.fetcher({
|
|
175
348
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
176
349
|
.predict, "v1/generate-stream"),
|
|
177
350
|
method: "POST",
|
|
@@ -179,23 +352,58 @@ class VellumClient {
|
|
|
179
352
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
180
353
|
"X-Fern-Language": "JavaScript",
|
|
181
354
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
182
|
-
"X-Fern-SDK-Version": "
|
|
355
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
183
356
|
},
|
|
357
|
+
contentType: "application/json",
|
|
184
358
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
359
|
+
responseType: "streaming",
|
|
185
360
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
361
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
186
362
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
363
|
+
if (_response.ok) {
|
|
364
|
+
return new core.Stream({
|
|
365
|
+
stream: _response.body,
|
|
366
|
+
terminator: "\n",
|
|
367
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
return yield serializers.GenerateStreamResponse.parseOrThrow(data, {
|
|
369
|
+
unrecognizedObjectKeys: "passthrough",
|
|
370
|
+
allowUnrecognizedUnionMembers: true,
|
|
371
|
+
allowUnrecognizedEnumValues: true,
|
|
372
|
+
breadcrumbsPrefix: ["response"],
|
|
373
|
+
});
|
|
374
|
+
}),
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
if (_response.error.reason === "status-code") {
|
|
378
|
+
switch (_response.error.statusCode) {
|
|
379
|
+
case 400:
|
|
380
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
381
|
+
case 403:
|
|
382
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
383
|
+
case 404:
|
|
384
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
385
|
+
case 500:
|
|
386
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
387
|
+
default:
|
|
388
|
+
throw new errors.VellumError({
|
|
389
|
+
statusCode: _response.error.statusCode,
|
|
390
|
+
body: _response.error.body,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
switch (_response.error.reason) {
|
|
395
|
+
case "non-json":
|
|
396
|
+
throw new errors.VellumError({
|
|
397
|
+
statusCode: _response.error.statusCode,
|
|
398
|
+
body: _response.error.rawBody,
|
|
196
399
|
});
|
|
197
|
-
|
|
198
|
-
|
|
400
|
+
case "timeout":
|
|
401
|
+
throw new errors.VellumTimeoutError();
|
|
402
|
+
case "unknown":
|
|
403
|
+
throw new errors.VellumError({
|
|
404
|
+
message: _response.error.errorMessage,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
199
407
|
});
|
|
200
408
|
}
|
|
201
409
|
/**
|
|
@@ -217,7 +425,7 @@ class VellumClient {
|
|
|
217
425
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
218
426
|
"X-Fern-Language": "JavaScript",
|
|
219
427
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
220
|
-
"X-Fern-SDK-Version": "
|
|
428
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
221
429
|
},
|
|
222
430
|
contentType: "application/json",
|
|
223
431
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -269,6 +477,11 @@ class VellumClient {
|
|
|
269
477
|
* @throws {@link Vellum.BadRequestError}
|
|
270
478
|
* @throws {@link Vellum.NotFoundError}
|
|
271
479
|
* @throws {@link Vellum.InternalServerError}
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* await vellum.submitCompletionActuals({
|
|
483
|
+
* actuals: []
|
|
484
|
+
* })
|
|
272
485
|
*/
|
|
273
486
|
submitCompletionActuals(request, requestOptions) {
|
|
274
487
|
var _a;
|
|
@@ -281,7 +494,7 @@ class VellumClient {
|
|
|
281
494
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
282
495
|
"X-Fern-Language": "JavaScript",
|
|
283
496
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
284
|
-
"X-Fern-SDK-Version": "
|
|
497
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
285
498
|
},
|
|
286
499
|
contentType: "application/json",
|
|
287
500
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -327,6 +540,11 @@ class VellumClient {
|
|
|
327
540
|
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
328
541
|
*
|
|
329
542
|
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* await vellum.submitWorkflowExecutionActuals({
|
|
546
|
+
* actuals: []
|
|
547
|
+
* })
|
|
330
548
|
*/
|
|
331
549
|
submitWorkflowExecutionActuals(request, requestOptions) {
|
|
332
550
|
var _a;
|
|
@@ -339,7 +557,7 @@ class VellumClient {
|
|
|
339
557
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
340
558
|
"X-Fern-Language": "JavaScript",
|
|
341
559
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
342
|
-
"X-Fern-SDK-Version": "
|
|
560
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
343
561
|
},
|
|
344
562
|
contentType: "application/json",
|
|
345
563
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../..";
|
|
5
|
+
export interface ExecutePromptRequest {
|
|
6
|
+
inputs: Vellum.PromptDeploymentInputRequest[];
|
|
7
|
+
/** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
|
|
8
|
+
promptDeploymentId?: string;
|
|
9
|
+
/** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
|
|
10
|
+
promptDeploymentName?: string;
|
|
11
|
+
/** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
|
|
12
|
+
releaseTag?: string;
|
|
13
|
+
externalId?: string;
|
|
14
|
+
/** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
|
|
15
|
+
expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
|
|
16
|
+
rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
|
|
17
|
+
/** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
|
|
18
|
+
expandRaw?: string[];
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../..";
|
|
5
|
+
export interface ExecutePromptStreamRequest {
|
|
6
|
+
inputs: Vellum.PromptDeploymentInputRequest[];
|
|
7
|
+
/** The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name. */
|
|
8
|
+
promptDeploymentId?: string;
|
|
9
|
+
/** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
|
|
10
|
+
promptDeploymentName?: string;
|
|
11
|
+
/** Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment */
|
|
12
|
+
releaseTag?: string;
|
|
13
|
+
externalId?: string;
|
|
14
|
+
/** The name of the Prompt Deployment. Must provide either this or prompt_deployment_id. */
|
|
15
|
+
expandMeta?: Vellum.PromptDeploymentExpandMetaRequestRequest;
|
|
16
|
+
rawOverrides?: Vellum.RawPromptExecutionOverridesRequest;
|
|
17
|
+
/** Returns the raw API response data sent from the model host. Combined with `raw_overrides`, it can be used to access new features from models. */
|
|
18
|
+
expandRaw?: string[];
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../..";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* requests: [{
|
|
9
|
+
* inputValues: {}
|
|
10
|
+
* }],
|
|
11
|
+
* options: {
|
|
12
|
+
* logprobs: Vellum.LogprobsEnum.All
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
5
16
|
export interface GenerateBodyRequest {
|
|
6
17
|
/** The ID of the deployment. Must provide either this or deployment_name. */
|
|
7
18
|
deploymentId?: string;
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../..";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* actuals: []
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
5
11
|
export interface SubmitCompletionActualsRequest {
|
|
6
12
|
/** The ID of the deployment. Must provide either this or deployment_name. */
|
|
7
13
|
deploymentId?: string;
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../..";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* actuals: []
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
5
11
|
export interface SubmitWorkflowExecutionActualsRequest {
|
|
6
12
|
/** Feedback regarding the quality of an output on a previously executed workflow. */
|
|
7
13
|
actuals: Vellum.SubmitWorkflowExecutionActualRequest[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { ExecutePromptRequest } from "./ExecutePromptRequest";
|
|
2
|
+
export { ExecutePromptStreamRequest } from "./ExecutePromptStreamRequest";
|
|
1
3
|
export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
|
|
2
4
|
export { GenerateBodyRequest } from "./GenerateBodyRequest";
|
|
3
5
|
export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as errors from "../../errors";
|
|
5
|
-
import * as Vellum from "..";
|
|
6
5
|
export declare class ForbiddenError extends errors.VellumError {
|
|
7
|
-
constructor(body
|
|
6
|
+
constructor(body?: unknown);
|
|
8
7
|
}
|
|
@@ -62,7 +62,7 @@ class Deployments {
|
|
|
62
62
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
65
|
-
"X-Fern-SDK-Version": "
|
|
65
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -108,7 +108,7 @@ class Deployments {
|
|
|
108
108
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
109
109
|
"X-Fern-Language": "JavaScript",
|
|
110
110
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
111
|
-
"X-Fern-SDK-Version": "
|
|
111
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
112
112
|
},
|
|
113
113
|
contentType: "application/json",
|
|
114
114
|
body: yield serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Vellum from "../../../..";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* inputs: []
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
5
11
|
export interface DeploymentProviderPayloadRequest {
|
|
6
12
|
/** The ID of the deployment. Must provide either this or deployment_name. */
|
|
7
13
|
deploymentId?: string;
|
|
@@ -62,7 +62,7 @@ class DocumentIndexes {
|
|
|
62
62
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
65
|
-
"X-Fern-SDK-Version": "
|
|
65
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
|
|
@@ -114,7 +114,7 @@ class DocumentIndexes {
|
|
|
114
114
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
115
115
|
"X-Fern-Language": "JavaScript",
|
|
116
116
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
117
|
-
"X-Fern-SDK-Version": "
|
|
117
|
+
"X-Fern-SDK-Version": "v0.1.9",
|
|
118
118
|
},
|
|
119
119
|
contentType: "application/json",
|
|
120
120
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -21,6 +21,9 @@ export declare class Documents {
|
|
|
21
21
|
constructor(_options: Documents.Options);
|
|
22
22
|
/**
|
|
23
23
|
* Used to list documents. Optionally filter on supported fields.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await vellum.documents.list({})
|
|
24
27
|
*/
|
|
25
28
|
list(request?: Vellum.DocumentsListRequest, requestOptions?: Documents.RequestOptions): Promise<Vellum.PaginatedSlimDocumentList>;
|
|
26
29
|
destroy(id: string, requestOptions?: Documents.RequestOptions): Promise<void>;
|