vellum-ai 0.1.8 → 0.1.10
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 +38 -0
- package/Client.js +260 -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 +38 -0
- package/dist/Client.js +260 -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,24 @@ 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
|
+
*
|
|
30
|
+
* Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
|
|
31
|
+
* In the meantime, we recommend still using the `/generate` endpoint for prompts with function calling.
|
|
32
|
+
* @throws {@link Vellum.BadRequestError}
|
|
33
|
+
* @throws {@link Vellum.ForbiddenError}
|
|
34
|
+
* @throws {@link Vellum.NotFoundError}
|
|
35
|
+
* @throws {@link Vellum.InternalServerError}
|
|
36
|
+
*/
|
|
37
|
+
executePrompt(request: Vellum.ExecutePromptRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.ExecutePromptResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Executes a deployed Prompt and streams back the results.
|
|
40
|
+
*
|
|
41
|
+
* Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
|
|
42
|
+
* In the meantime, we recommend still using the `/generate-stream` endpoint for prompts with function calling
|
|
43
|
+
*/
|
|
44
|
+
executePromptStream(request: Vellum.ExecutePromptStreamRequest, requestOptions?: VellumClient.RequestOptions): Promise<core.Stream<Vellum.ExecutePromptEvent>>;
|
|
27
45
|
/**
|
|
28
46
|
* Executes a deployed Workflow and streams back its results.
|
|
29
47
|
*/
|
|
@@ -36,6 +54,16 @@ export declare class VellumClient {
|
|
|
36
54
|
* @throws {@link Vellum.ForbiddenError}
|
|
37
55
|
* @throws {@link Vellum.NotFoundError}
|
|
38
56
|
* @throws {@link Vellum.InternalServerError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await vellum.generate({
|
|
60
|
+
* requests: [{
|
|
61
|
+
* inputValues: {}
|
|
62
|
+
* }],
|
|
63
|
+
* options: {
|
|
64
|
+
* logprobs: Vellum.LogprobsEnum.All
|
|
65
|
+
* }
|
|
66
|
+
* })
|
|
39
67
|
*/
|
|
40
68
|
generate(request: Vellum.GenerateBodyRequest, requestOptions?: VellumClient.RequestOptions): Promise<Vellum.GenerateResponse>;
|
|
41
69
|
/**
|
|
@@ -60,12 +88,22 @@ export declare class VellumClient {
|
|
|
60
88
|
* @throws {@link Vellum.BadRequestError}
|
|
61
89
|
* @throws {@link Vellum.NotFoundError}
|
|
62
90
|
* @throws {@link Vellum.InternalServerError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await vellum.submitCompletionActuals({
|
|
94
|
+
* actuals: []
|
|
95
|
+
* })
|
|
63
96
|
*/
|
|
64
97
|
submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest, requestOptions?: VellumClient.RequestOptions): Promise<void>;
|
|
65
98
|
/**
|
|
66
99
|
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
67
100
|
*
|
|
68
101
|
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await vellum.submitWorkflowExecutionActuals({
|
|
105
|
+
* actuals: []
|
|
106
|
+
* })
|
|
69
107
|
*/
|
|
70
108
|
submitWorkflowExecutionActuals(request: Vellum.SubmitWorkflowExecutionActualsRequest, requestOptions?: VellumClient.RequestOptions): Promise<void>;
|
|
71
109
|
protected _deployments: Deployments | undefined;
|
package/Client.js
CHANGED
|
@@ -56,13 +56,154 @@ class VellumClient {
|
|
|
56
56
|
constructor(_options) {
|
|
57
57
|
this._options = _options;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Executes a deployed Prompt and returns the result.
|
|
61
|
+
*
|
|
62
|
+
* Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
|
|
63
|
+
* In the meantime, we recommend still using the `/generate` endpoint for prompts with function calling.
|
|
64
|
+
* @throws {@link Vellum.BadRequestError}
|
|
65
|
+
* @throws {@link Vellum.ForbiddenError}
|
|
66
|
+
* @throws {@link Vellum.NotFoundError}
|
|
67
|
+
* @throws {@link Vellum.InternalServerError}
|
|
68
|
+
*/
|
|
69
|
+
executePrompt(request, requestOptions) {
|
|
70
|
+
var _a;
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const _response = yield core.fetcher({
|
|
73
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
74
|
+
.predict, "v1/execute-prompt"),
|
|
75
|
+
method: "POST",
|
|
76
|
+
headers: {
|
|
77
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
78
|
+
"X-Fern-Language": "JavaScript",
|
|
79
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
80
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
81
|
+
},
|
|
82
|
+
contentType: "application/json",
|
|
83
|
+
body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
84
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
85
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
86
|
+
});
|
|
87
|
+
if (_response.ok) {
|
|
88
|
+
return yield serializers.ExecutePromptResponse.parseOrThrow(_response.body, {
|
|
89
|
+
unrecognizedObjectKeys: "passthrough",
|
|
90
|
+
allowUnrecognizedUnionMembers: true,
|
|
91
|
+
allowUnrecognizedEnumValues: true,
|
|
92
|
+
breadcrumbsPrefix: ["response"],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (_response.error.reason === "status-code") {
|
|
96
|
+
switch (_response.error.statusCode) {
|
|
97
|
+
case 400:
|
|
98
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
99
|
+
case 403:
|
|
100
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
101
|
+
case 404:
|
|
102
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
103
|
+
case 500:
|
|
104
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
105
|
+
default:
|
|
106
|
+
throw new errors.VellumError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.body,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
switch (_response.error.reason) {
|
|
113
|
+
case "non-json":
|
|
114
|
+
throw new errors.VellumError({
|
|
115
|
+
statusCode: _response.error.statusCode,
|
|
116
|
+
body: _response.error.rawBody,
|
|
117
|
+
});
|
|
118
|
+
case "timeout":
|
|
119
|
+
throw new errors.VellumTimeoutError();
|
|
120
|
+
case "unknown":
|
|
121
|
+
throw new errors.VellumError({
|
|
122
|
+
message: _response.error.errorMessage,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Executes a deployed Prompt and streams back the results.
|
|
129
|
+
*
|
|
130
|
+
* Note: This endpoint temporarily does not support prompts with function calling, support is coming soon.
|
|
131
|
+
* In the meantime, we recommend still using the `/generate-stream` endpoint for prompts with function calling
|
|
132
|
+
*/
|
|
133
|
+
executePromptStream(request, requestOptions) {
|
|
134
|
+
var _a;
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const _response = yield core.fetcher({
|
|
137
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
138
|
+
.predict, "v1/execute-prompt-stream"),
|
|
139
|
+
method: "POST",
|
|
140
|
+
headers: {
|
|
141
|
+
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
142
|
+
"X-Fern-Language": "JavaScript",
|
|
143
|
+
"X-Fern-SDK-Name": "vellum-ai",
|
|
144
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
145
|
+
},
|
|
146
|
+
contentType: "application/json",
|
|
147
|
+
body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
|
|
148
|
+
unrecognizedObjectKeys: "strip",
|
|
149
|
+
}),
|
|
150
|
+
responseType: "streaming",
|
|
151
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
152
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
153
|
+
});
|
|
154
|
+
if (_response.ok) {
|
|
155
|
+
return new core.Stream({
|
|
156
|
+
stream: _response.body,
|
|
157
|
+
terminator: "\n",
|
|
158
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
return yield serializers.ExecutePromptEvent.parseOrThrow(data, {
|
|
160
|
+
unrecognizedObjectKeys: "passthrough",
|
|
161
|
+
allowUnrecognizedUnionMembers: true,
|
|
162
|
+
allowUnrecognizedEnumValues: true,
|
|
163
|
+
breadcrumbsPrefix: ["response"],
|
|
164
|
+
});
|
|
165
|
+
}),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
if (_response.error.reason === "status-code") {
|
|
169
|
+
switch (_response.error.statusCode) {
|
|
170
|
+
case 400:
|
|
171
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
172
|
+
case 403:
|
|
173
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
174
|
+
case 404:
|
|
175
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
176
|
+
case 500:
|
|
177
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
178
|
+
default:
|
|
179
|
+
throw new errors.VellumError({
|
|
180
|
+
statusCode: _response.error.statusCode,
|
|
181
|
+
body: _response.error.body,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
switch (_response.error.reason) {
|
|
186
|
+
case "non-json":
|
|
187
|
+
throw new errors.VellumError({
|
|
188
|
+
statusCode: _response.error.statusCode,
|
|
189
|
+
body: _response.error.rawBody,
|
|
190
|
+
});
|
|
191
|
+
case "timeout":
|
|
192
|
+
throw new errors.VellumTimeoutError();
|
|
193
|
+
case "unknown":
|
|
194
|
+
throw new errors.VellumError({
|
|
195
|
+
message: _response.error.errorMessage,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
59
200
|
/**
|
|
60
201
|
* Executes a deployed Workflow and streams back its results.
|
|
61
202
|
*/
|
|
62
203
|
executeWorkflowStream(request, requestOptions) {
|
|
63
204
|
var _a;
|
|
64
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const _response = yield core.
|
|
206
|
+
const _response = yield core.fetcher({
|
|
66
207
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
67
208
|
.predict, "v1/execute-workflow-stream"),
|
|
68
209
|
method: "POST",
|
|
@@ -70,25 +211,58 @@ class VellumClient {
|
|
|
70
211
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
71
212
|
"X-Fern-Language": "JavaScript",
|
|
72
213
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
73
|
-
"X-Fern-SDK-Version": "
|
|
214
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
74
215
|
},
|
|
216
|
+
contentType: "application/json",
|
|
75
217
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
76
218
|
unrecognizedObjectKeys: "strip",
|
|
77
219
|
}),
|
|
220
|
+
responseType: "streaming",
|
|
78
221
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
222
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
223
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
224
|
+
if (_response.ok) {
|
|
225
|
+
return new core.Stream({
|
|
226
|
+
stream: _response.body,
|
|
227
|
+
terminator: "\n",
|
|
228
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
return yield serializers.WorkflowStreamEvent.parseOrThrow(data, {
|
|
230
|
+
unrecognizedObjectKeys: "passthrough",
|
|
231
|
+
allowUnrecognizedUnionMembers: true,
|
|
232
|
+
allowUnrecognizedEnumValues: true,
|
|
233
|
+
breadcrumbsPrefix: ["response"],
|
|
234
|
+
});
|
|
235
|
+
}),
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
if (_response.error.reason === "status-code") {
|
|
239
|
+
switch (_response.error.statusCode) {
|
|
240
|
+
case 400:
|
|
241
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
242
|
+
case 404:
|
|
243
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
244
|
+
case 500:
|
|
245
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
246
|
+
default:
|
|
247
|
+
throw new errors.VellumError({
|
|
248
|
+
statusCode: _response.error.statusCode,
|
|
249
|
+
body: _response.error.body,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
switch (_response.error.reason) {
|
|
254
|
+
case "non-json":
|
|
255
|
+
throw new errors.VellumError({
|
|
256
|
+
statusCode: _response.error.statusCode,
|
|
257
|
+
body: _response.error.rawBody,
|
|
89
258
|
});
|
|
90
|
-
|
|
91
|
-
|
|
259
|
+
case "timeout":
|
|
260
|
+
throw new errors.VellumTimeoutError();
|
|
261
|
+
case "unknown":
|
|
262
|
+
throw new errors.VellumError({
|
|
263
|
+
message: _response.error.errorMessage,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
92
266
|
});
|
|
93
267
|
}
|
|
94
268
|
/**
|
|
@@ -99,6 +273,16 @@ class VellumClient {
|
|
|
99
273
|
* @throws {@link Vellum.ForbiddenError}
|
|
100
274
|
* @throws {@link Vellum.NotFoundError}
|
|
101
275
|
* @throws {@link Vellum.InternalServerError}
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* await vellum.generate({
|
|
279
|
+
* requests: [{
|
|
280
|
+
* inputValues: {}
|
|
281
|
+
* }],
|
|
282
|
+
* options: {
|
|
283
|
+
* logprobs: Vellum.LogprobsEnum.All
|
|
284
|
+
* }
|
|
285
|
+
* })
|
|
102
286
|
*/
|
|
103
287
|
generate(request, requestOptions) {
|
|
104
288
|
var _a;
|
|
@@ -111,7 +295,7 @@ class VellumClient {
|
|
|
111
295
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
112
296
|
"X-Fern-Language": "JavaScript",
|
|
113
297
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
114
|
-
"X-Fern-SDK-Version": "
|
|
298
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
115
299
|
},
|
|
116
300
|
contentType: "application/json",
|
|
117
301
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -131,12 +315,7 @@ class VellumClient {
|
|
|
131
315
|
case 400:
|
|
132
316
|
throw new Vellum.BadRequestError(_response.error.body);
|
|
133
317
|
case 403:
|
|
134
|
-
throw new Vellum.ForbiddenError(
|
|
135
|
-
unrecognizedObjectKeys: "passthrough",
|
|
136
|
-
allowUnrecognizedUnionMembers: true,
|
|
137
|
-
allowUnrecognizedEnumValues: true,
|
|
138
|
-
breadcrumbsPrefix: ["response"],
|
|
139
|
-
}));
|
|
318
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
140
319
|
case 404:
|
|
141
320
|
throw new Vellum.NotFoundError(_response.error.body);
|
|
142
321
|
case 500:
|
|
@@ -171,7 +350,7 @@ class VellumClient {
|
|
|
171
350
|
generateStream(request, requestOptions) {
|
|
172
351
|
var _a;
|
|
173
352
|
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
-
const _response = yield core.
|
|
353
|
+
const _response = yield core.fetcher({
|
|
175
354
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
176
355
|
.predict, "v1/generate-stream"),
|
|
177
356
|
method: "POST",
|
|
@@ -179,23 +358,58 @@ class VellumClient {
|
|
|
179
358
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
180
359
|
"X-Fern-Language": "JavaScript",
|
|
181
360
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
182
|
-
"X-Fern-SDK-Version": "
|
|
361
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
183
362
|
},
|
|
363
|
+
contentType: "application/json",
|
|
184
364
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
365
|
+
responseType: "streaming",
|
|
185
366
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
367
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
186
368
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
369
|
+
if (_response.ok) {
|
|
370
|
+
return new core.Stream({
|
|
371
|
+
stream: _response.body,
|
|
372
|
+
terminator: "\n",
|
|
373
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
return yield serializers.GenerateStreamResponse.parseOrThrow(data, {
|
|
375
|
+
unrecognizedObjectKeys: "passthrough",
|
|
376
|
+
allowUnrecognizedUnionMembers: true,
|
|
377
|
+
allowUnrecognizedEnumValues: true,
|
|
378
|
+
breadcrumbsPrefix: ["response"],
|
|
379
|
+
});
|
|
380
|
+
}),
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
if (_response.error.reason === "status-code") {
|
|
384
|
+
switch (_response.error.statusCode) {
|
|
385
|
+
case 400:
|
|
386
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
387
|
+
case 403:
|
|
388
|
+
throw new Vellum.ForbiddenError(_response.error.body);
|
|
389
|
+
case 404:
|
|
390
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
391
|
+
case 500:
|
|
392
|
+
throw new Vellum.InternalServerError(_response.error.body);
|
|
393
|
+
default:
|
|
394
|
+
throw new errors.VellumError({
|
|
395
|
+
statusCode: _response.error.statusCode,
|
|
396
|
+
body: _response.error.body,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
switch (_response.error.reason) {
|
|
401
|
+
case "non-json":
|
|
402
|
+
throw new errors.VellumError({
|
|
403
|
+
statusCode: _response.error.statusCode,
|
|
404
|
+
body: _response.error.rawBody,
|
|
196
405
|
});
|
|
197
|
-
|
|
198
|
-
|
|
406
|
+
case "timeout":
|
|
407
|
+
throw new errors.VellumTimeoutError();
|
|
408
|
+
case "unknown":
|
|
409
|
+
throw new errors.VellumError({
|
|
410
|
+
message: _response.error.errorMessage,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
199
413
|
});
|
|
200
414
|
}
|
|
201
415
|
/**
|
|
@@ -217,7 +431,7 @@ class VellumClient {
|
|
|
217
431
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
218
432
|
"X-Fern-Language": "JavaScript",
|
|
219
433
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
220
|
-
"X-Fern-SDK-Version": "
|
|
434
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
221
435
|
},
|
|
222
436
|
contentType: "application/json",
|
|
223
437
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -269,6 +483,11 @@ class VellumClient {
|
|
|
269
483
|
* @throws {@link Vellum.BadRequestError}
|
|
270
484
|
* @throws {@link Vellum.NotFoundError}
|
|
271
485
|
* @throws {@link Vellum.InternalServerError}
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* await vellum.submitCompletionActuals({
|
|
489
|
+
* actuals: []
|
|
490
|
+
* })
|
|
272
491
|
*/
|
|
273
492
|
submitCompletionActuals(request, requestOptions) {
|
|
274
493
|
var _a;
|
|
@@ -281,7 +500,7 @@ class VellumClient {
|
|
|
281
500
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
282
501
|
"X-Fern-Language": "JavaScript",
|
|
283
502
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
284
|
-
"X-Fern-SDK-Version": "
|
|
503
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
285
504
|
},
|
|
286
505
|
contentType: "application/json",
|
|
287
506
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
@@ -327,6 +546,11 @@ class VellumClient {
|
|
|
327
546
|
* Used to submit feedback regarding the quality of previous workflow execution and its outputs.
|
|
328
547
|
*
|
|
329
548
|
* **Note:** Uses a base url of `https://predict.vellum.ai`.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* await vellum.submitWorkflowExecutionActuals({
|
|
552
|
+
* actuals: []
|
|
553
|
+
* })
|
|
330
554
|
*/
|
|
331
555
|
submitWorkflowExecutionActuals(request, requestOptions) {
|
|
332
556
|
var _a;
|
|
@@ -339,7 +563,7 @@ class VellumClient {
|
|
|
339
563
|
X_API_KEY: yield core.Supplier.get(this._options.apiKey),
|
|
340
564
|
"X-Fern-Language": "JavaScript",
|
|
341
565
|
"X-Fern-SDK-Name": "vellum-ai",
|
|
342
|
-
"X-Fern-SDK-Version": "
|
|
566
|
+
"X-Fern-SDK-Version": "v0.1.10",
|
|
343
567
|
},
|
|
344
568
|
contentType: "application/json",
|
|
345
569
|
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.10",
|
|
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.10",
|
|
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.10",
|
|
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.10",
|
|
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>;
|