scorecard-ai 0.2.0 → 0.3.0
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 +9 -0
- package/Client.js +15 -0
- package/api/errors/ForbiddenError.d.ts +2 -2
- package/api/errors/ForbiddenError.js +1 -1
- package/api/errors/NotFoundError.d.ts +2 -2
- package/api/errors/NotFoundError.js +1 -1
- package/api/errors/UnauthorizedError.d.ts +2 -2
- package/api/errors/UnauthorizedError.js +1 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/api/errors/UnprocessableEntityError.js +1 -1
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +6 -1
- package/api/resources/prompt/client/Client.d.ts +151 -0
- package/api/resources/prompt/client/Client.js +699 -0
- package/api/resources/prompt/client/index.d.ts +1 -0
- package/api/resources/prompt/client/index.js +17 -0
- package/api/resources/prompt/client/requests/PromptCreateParams.d.ts +40 -0
- package/api/resources/prompt/client/requests/PromptUpdateParams.d.ts +13 -0
- package/api/resources/prompt/client/requests/index.d.ts +2 -0
- package/api/resources/prompt/client/requests/index.js +2 -0
- package/api/resources/prompt/index.d.ts +2 -0
- package/api/resources/prompt/index.js +18 -0
- package/api/resources/prompt/types/PromptCreateParamsModelParamsValue.d.ts +4 -0
- package/api/resources/prompt/types/index.d.ts +1 -0
- package/api/resources/prompt/types/index.js +17 -0
- package/api/resources/run/client/Client.d.ts +19 -3
- package/api/resources/run/client/Client.js +30 -25
- package/api/resources/run/client/requests/RunCreateParams.d.ts +3 -2
- package/api/resources/run/client/requests/UpdateStatusParams.d.ts +1 -1
- package/api/resources/run/client/requests/index.d.ts +2 -2
- package/api/resources/runMetric/client/Client.d.ts +38 -0
- package/api/resources/runMetric/client/Client.js +150 -0
- package/api/resources/runMetric/client/index.d.ts +1 -0
- package/api/resources/runMetric/client/index.js +2 -0
- package/api/resources/runMetric/index.d.ts +1 -0
- package/api/resources/runMetric/index.js +17 -0
- package/api/resources/score/client/Client.d.ts +18 -2
- package/api/resources/score/client/Client.js +28 -18
- package/api/resources/score/client/requests/index.d.ts +2 -2
- package/api/resources/testcase/client/Client.d.ts +19 -1
- package/api/resources/testcase/client/Client.js +31 -24
- package/api/resources/testcase/client/requests/TestcaseCreateParams.d.ts +1 -1
- package/api/resources/testcase/client/requests/index.d.ts +1 -1
- package/api/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.d.ts +1 -1
- package/api/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.d.ts +1 -1
- package/api/resources/testrecord/client/Client.d.ts +15 -2
- package/api/resources/testrecord/client/Client.js +25 -18
- package/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -1
- package/api/resources/testrecord/client/requests/index.d.ts +1 -1
- package/api/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.d.ts +1 -1
- package/api/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.d.ts +1 -1
- package/api/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.d.ts +1 -1
- package/api/resources/testset/client/Client.d.ts +26 -2
- package/api/resources/testset/client/Client.js +41 -38
- package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -1
- package/api/resources/testset/client/requests/index.d.ts +2 -2
- package/api/resources/traces/client/Client.d.ts +38 -0
- package/api/resources/traces/client/Client.js +150 -0
- package/api/resources/traces/client/index.d.ts +1 -0
- package/api/resources/traces/client/index.js +2 -0
- package/api/resources/traces/index.d.ts +1 -0
- package/api/resources/traces/index.js +17 -0
- package/api/types/CustomSchema.d.ts +1 -1
- package/api/types/CustomVariable.d.ts +1 -1
- package/api/types/Grade.d.ts +4 -2
- package/api/types/HttpValidationError.d.ts +1 -1
- package/api/types/JsonObject.d.ts +1 -1
- package/api/types/JsonObjectInputValue.d.ts +1 -1
- package/api/types/JsonObjectOutputValue.d.ts +1 -1
- package/api/types/PaginatedTestcaseResponse.d.ts +1 -1
- package/api/types/Prompt.d.ts +18 -0
- package/api/types/{AppCreateRunParams.d.ts → PromptModelParamsValue.d.ts} +1 -1
- package/api/types/RunMetric.d.ts +9 -0
- package/api/types/Span.d.ts +29 -0
- package/api/types/TestCase.d.ts +1 -1
- package/api/types/TestCaseCustomInputsValue.d.ts +1 -1
- package/api/types/TestCaseCustomLabelsValue.d.ts +1 -1
- package/api/types/Testrecord.d.ts +1 -1
- package/api/types/TestrecordCustomInputsValue.d.ts +1 -1
- package/api/types/TestrecordCustomLabelsValue.d.ts +1 -1
- package/api/types/TestrecordCustomOutputsValue.d.ts +1 -1
- package/api/types/Testset.d.ts +1 -1
- package/api/types/Trace.d.ts +8 -0
- package/api/types/ValidationError.d.ts +1 -1
- package/api/types/index.d.ts +5 -8
- package/api/types/index.js +5 -8
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +78 -23
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +82 -0
- package/core/schemas/builders/object/object.js +11 -15
- package/dist/Client.d.ts +9 -0
- package/dist/Client.js +15 -0
- package/dist/api/errors/ForbiddenError.d.ts +2 -2
- package/dist/api/errors/ForbiddenError.js +1 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -2
- package/dist/api/errors/NotFoundError.js +1 -1
- package/dist/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/api/errors/UnauthorizedError.js +1 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/dist/api/errors/UnprocessableEntityError.js +1 -1
- package/dist/api/resources/index.d.ts +5 -0
- package/dist/api/resources/index.js +6 -1
- package/dist/api/resources/prompt/client/Client.d.ts +151 -0
- package/dist/api/resources/prompt/client/Client.js +699 -0
- package/dist/api/resources/prompt/client/index.d.ts +1 -0
- package/dist/api/resources/prompt/client/index.js +17 -0
- package/dist/api/resources/prompt/client/requests/PromptCreateParams.d.ts +40 -0
- package/dist/api/resources/prompt/client/requests/PromptUpdateParams.d.ts +13 -0
- package/dist/api/resources/prompt/client/requests/index.d.ts +2 -0
- package/dist/api/resources/prompt/client/requests/index.js +2 -0
- package/dist/api/resources/prompt/index.d.ts +2 -0
- package/dist/api/resources/prompt/index.js +18 -0
- package/dist/api/resources/prompt/types/PromptCreateParamsModelParamsValue.d.ts +4 -0
- package/dist/api/resources/prompt/types/index.d.ts +1 -0
- package/dist/api/resources/prompt/types/index.js +17 -0
- package/dist/api/resources/run/client/Client.d.ts +19 -3
- package/dist/api/resources/run/client/Client.js +30 -25
- package/dist/api/resources/run/client/requests/RunCreateParams.d.ts +3 -2
- package/dist/api/resources/run/client/requests/UpdateStatusParams.d.ts +1 -1
- package/dist/api/resources/run/client/requests/index.d.ts +2 -2
- package/dist/api/resources/runMetric/client/Client.d.ts +38 -0
- package/dist/api/resources/runMetric/client/Client.js +150 -0
- package/dist/api/resources/runMetric/client/index.d.ts +1 -0
- package/dist/api/resources/runMetric/client/index.js +2 -0
- package/dist/api/resources/runMetric/index.d.ts +1 -0
- package/dist/api/resources/runMetric/index.js +17 -0
- package/dist/api/resources/score/client/Client.d.ts +18 -2
- package/dist/api/resources/score/client/Client.js +28 -18
- package/dist/api/resources/score/client/requests/index.d.ts +2 -2
- package/dist/api/resources/testcase/client/Client.d.ts +19 -1
- package/dist/api/resources/testcase/client/Client.js +31 -24
- package/dist/api/resources/testcase/client/requests/TestcaseCreateParams.d.ts +1 -1
- package/dist/api/resources/testcase/client/requests/index.d.ts +1 -1
- package/dist/api/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.d.ts +1 -1
- package/dist/api/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.d.ts +1 -1
- package/dist/api/resources/testrecord/client/Client.d.ts +15 -2
- package/dist/api/resources/testrecord/client/Client.js +25 -18
- package/dist/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -1
- package/dist/api/resources/testrecord/client/requests/index.d.ts +1 -1
- package/dist/api/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.d.ts +1 -1
- package/dist/api/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.d.ts +1 -1
- package/dist/api/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.d.ts +1 -1
- package/dist/api/resources/testset/client/Client.d.ts +26 -2
- package/dist/api/resources/testset/client/Client.js +41 -38
- package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -1
- package/dist/api/resources/testset/client/requests/index.d.ts +2 -2
- package/dist/api/resources/traces/client/Client.d.ts +38 -0
- package/dist/api/resources/traces/client/Client.js +150 -0
- package/dist/api/resources/traces/client/index.d.ts +1 -0
- package/dist/api/resources/traces/client/index.js +2 -0
- package/dist/api/resources/traces/index.d.ts +1 -0
- package/dist/api/resources/traces/index.js +17 -0
- package/dist/api/types/CustomSchema.d.ts +1 -1
- package/dist/api/types/CustomVariable.d.ts +1 -1
- package/dist/api/types/Grade.d.ts +4 -2
- package/dist/api/types/HttpValidationError.d.ts +1 -1
- package/dist/api/types/JsonObject.d.ts +1 -1
- package/dist/api/types/JsonObjectInputValue.d.ts +1 -1
- package/dist/api/types/JsonObjectOutputValue.d.ts +1 -1
- package/dist/api/types/PaginatedTestcaseResponse.d.ts +1 -1
- package/dist/api/types/Prompt.d.ts +18 -0
- package/{api/types/AppTestSetCreate.d.ts → dist/api/types/PromptModelParamsValue.d.ts} +1 -1
- package/dist/api/types/RunMetric.d.ts +9 -0
- package/dist/api/types/Span.d.ts +29 -0
- package/dist/api/types/TestCase.d.ts +1 -1
- package/dist/api/types/TestCaseCustomInputsValue.d.ts +1 -1
- package/dist/api/types/TestCaseCustomLabelsValue.d.ts +1 -1
- package/dist/api/types/Testrecord.d.ts +1 -1
- package/dist/api/types/TestrecordCustomInputsValue.d.ts +1 -1
- package/dist/api/types/TestrecordCustomLabelsValue.d.ts +1 -1
- package/dist/api/types/TestrecordCustomOutputsValue.d.ts +1 -1
- package/dist/api/types/Testset.d.ts +1 -1
- package/dist/api/types/Trace.d.ts +8 -0
- package/dist/api/types/ValidationError.d.ts +1 -1
- package/dist/api/types/index.d.ts +5 -8
- package/dist/api/types/index.js +5 -8
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +78 -23
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +82 -0
- package/dist/core/schemas/builders/object/object.js +11 -15
- package/dist/serialization/resources/index.d.ts +5 -0
- package/dist/serialization/resources/index.js +6 -1
- package/dist/serialization/resources/prompt/client/getGraph.d.ts +11 -0
- package/dist/serialization/{types/AppCreateRunParams.js → resources/prompt/client/getGraph.js} +4 -3
- package/dist/serialization/resources/prompt/client/getProds.d.ts +11 -0
- package/dist/serialization/{types/AppTestRecordCreate.js → resources/prompt/client/getProds.js} +4 -3
- package/dist/serialization/resources/prompt/client/getRoots.d.ts +11 -0
- package/dist/serialization/{types/AppTestSetCreate.js → resources/prompt/client/getRoots.js} +4 -3
- package/dist/serialization/resources/prompt/client/index.d.ts +4 -0
- package/dist/serialization/resources/prompt/client/index.js +33 -0
- package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +18 -0
- package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.js +39 -0
- package/dist/serialization/resources/prompt/client/requests/PromptUpdateParams.d.ts +13 -0
- package/dist/serialization/resources/prompt/client/requests/PromptUpdateParams.js +34 -0
- package/dist/serialization/resources/prompt/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/prompt/client/requests/index.js +7 -0
- package/dist/serialization/resources/prompt/index.d.ts +2 -0
- package/dist/serialization/resources/prompt/index.js +18 -0
- package/dist/serialization/resources/prompt/types/PromptCreateParamsModelParamsValue.d.ts +10 -0
- package/dist/serialization/resources/prompt/types/PromptCreateParamsModelParamsValue.js +36 -0
- package/dist/serialization/resources/prompt/types/index.d.ts +1 -0
- package/dist/serialization/resources/prompt/types/index.js +17 -0
- package/dist/serialization/resources/run/client/requests/RunCreateParams.d.ts +3 -2
- package/dist/serialization/resources/run/client/requests/RunCreateParams.js +1 -0
- package/dist/serialization/resources/run/client/requests/UpdateStatusParams.d.ts +4 -3
- package/dist/serialization/resources/run/client/requests/UpdateStatusParams.js +2 -10
- package/dist/serialization/resources/runMetric/client/get.d.ts +11 -0
- package/dist/serialization/resources/runMetric/client/get.js +32 -0
- package/dist/serialization/resources/runMetric/client/index.d.ts +1 -0
- package/dist/serialization/{types/ModelParams.js → resources/runMetric/client/index.js} +2 -6
- package/dist/serialization/resources/runMetric/index.d.ts +1 -0
- package/dist/serialization/resources/runMetric/index.js +17 -0
- package/dist/serialization/resources/score/client/requests/ScoreCreateParams.d.ts +2 -2
- package/dist/serialization/resources/score/client/requests/ScoreUpdateParams.d.ts +2 -2
- package/dist/serialization/resources/testcase/client/requests/TestcaseCreateParams.d.ts +6 -4
- package/dist/serialization/resources/testcase/client/requests/TestcaseCreateParams.js +4 -15
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.d.ts +4 -3
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -1
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.d.ts +4 -3
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -1
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +12 -7
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +10 -24
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.d.ts +4 -3
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -1
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.d.ts +4 -3
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -1
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.d.ts +4 -3
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -1
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsModelDebugInfoValue.d.ts +2 -2
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsModelParamsValue.d.ts +2 -2
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -3
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +2 -10
- package/dist/serialization/resources/traces/client/get.d.ts +10 -0
- package/dist/serialization/resources/traces/client/get.js +40 -0
- package/dist/serialization/resources/traces/client/index.d.ts +1 -0
- package/{serialization/types/ModelParams.js → dist/serialization/resources/traces/client/index.js} +2 -6
- package/dist/serialization/resources/traces/index.d.ts +1 -0
- package/dist/serialization/resources/traces/index.js +17 -0
- package/dist/serialization/types/CreateGithubWorkflowParams.d.ts +2 -2
- package/dist/serialization/types/CreateRunParams.d.ts +2 -2
- package/dist/serialization/types/CustomSchema.d.ts +4 -3
- package/dist/serialization/types/CustomSchema.js +2 -12
- package/dist/serialization/types/CustomVariable.d.ts +6 -4
- package/dist/serialization/types/CustomVariable.js +4 -11
- package/dist/serialization/types/DataTypeEnum.d.ts +2 -2
- package/dist/serialization/types/FileUrl.d.ts +2 -2
- package/dist/serialization/types/Grade.d.ts +7 -4
- package/dist/serialization/types/Grade.js +5 -11
- package/dist/serialization/types/HttpValidationError.d.ts +4 -3
- package/dist/serialization/types/HttpValidationError.js +2 -12
- package/dist/serialization/types/JsonObject.d.ts +2 -2
- package/dist/serialization/types/JsonObjectInputValue.d.ts +2 -2
- package/dist/serialization/types/JsonObjectOutputValue.d.ts +2 -2
- package/dist/serialization/types/NotFoundErrorBody.d.ts +2 -2
- package/dist/serialization/types/PaginatedTestcaseResponse.d.ts +4 -3
- package/dist/serialization/types/PaginatedTestcaseResponse.js +2 -10
- package/dist/serialization/types/Prompt.d.ts +24 -0
- package/dist/serialization/types/Prompt.js +45 -0
- package/dist/serialization/types/PromptModelParamsValue.d.ts +10 -0
- package/dist/serialization/types/PromptModelParamsValue.js +35 -0
- package/dist/serialization/types/RoleEnum.d.ts +2 -2
- package/dist/serialization/types/Run.d.ts +2 -2
- package/dist/serialization/types/RunMetric.d.ts +15 -0
- package/dist/serialization/types/RunMetric.js +36 -0
- package/dist/serialization/types/RunStatus.d.ts +2 -2
- package/dist/serialization/types/ScoreStatus.d.ts +2 -2
- package/dist/serialization/types/Span.d.ts +34 -0
- package/dist/serialization/types/Span.js +64 -0
- package/dist/serialization/types/TestCase.d.ts +6 -4
- package/dist/serialization/types/TestCase.js +4 -15
- package/dist/serialization/types/TestCaseCreate.d.ts +2 -2
- package/dist/serialization/types/TestCaseCustomInputsValue.d.ts +4 -3
- package/dist/serialization/types/TestCaseCustomInputsValue.js +2 -1
- package/dist/serialization/types/TestCaseCustomLabelsValue.d.ts +4 -3
- package/dist/serialization/types/TestCaseCustomLabelsValue.js +2 -1
- package/dist/serialization/types/TestRecordCreate.d.ts +2 -2
- package/dist/serialization/types/TestSetCreate.d.ts +2 -2
- package/dist/serialization/types/Testrecord.d.ts +12 -7
- package/dist/serialization/types/Testrecord.js +10 -24
- package/dist/serialization/types/TestrecordCustomInputsValue.d.ts +4 -3
- package/dist/serialization/types/TestrecordCustomInputsValue.js +2 -1
- package/dist/serialization/types/TestrecordCustomLabelsValue.d.ts +4 -3
- package/dist/serialization/types/TestrecordCustomLabelsValue.js +2 -1
- package/dist/serialization/types/TestrecordCustomOutputsValue.d.ts +4 -3
- package/dist/serialization/types/TestrecordCustomOutputsValue.js +2 -1
- package/dist/serialization/types/TestrecordModelDebugInfoValue.d.ts +2 -2
- package/dist/serialization/types/TestrecordModelParamsValue.d.ts +2 -2
- package/dist/serialization/types/Testset.d.ts +4 -3
- package/dist/serialization/types/Testset.js +2 -10
- package/dist/serialization/types/Trace.d.ts +14 -0
- package/dist/serialization/types/Trace.js +35 -0
- package/dist/serialization/types/UnauthenticatedError.d.ts +2 -2
- package/dist/serialization/types/UnauthorizedErrorBody.d.ts +2 -2
- package/dist/serialization/types/ValidationError.d.ts +4 -3
- package/dist/serialization/types/ValidationError.js +2 -10
- package/dist/serialization/types/ValidationErrorLocItem.d.ts +2 -2
- package/dist/serialization/types/index.d.ts +5 -8
- package/dist/serialization/types/index.js +5 -8
- package/jest.config.js +5 -0
- package/package.json +11 -4
- package/reference.md +2145 -0
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +6 -1
- package/serialization/resources/prompt/client/getGraph.d.ts +11 -0
- package/{dist/serialization/types/ExecutionParams.js → serialization/resources/prompt/client/getGraph.js} +4 -3
- package/serialization/resources/prompt/client/getProds.d.ts +11 -0
- package/serialization/resources/prompt/client/getProds.js +32 -0
- package/serialization/resources/prompt/client/getRoots.d.ts +11 -0
- package/serialization/resources/prompt/client/getRoots.js +32 -0
- package/serialization/resources/prompt/client/index.d.ts +4 -0
- package/serialization/resources/prompt/client/index.js +33 -0
- package/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +18 -0
- package/serialization/resources/prompt/client/requests/PromptCreateParams.js +39 -0
- package/serialization/resources/prompt/client/requests/PromptUpdateParams.d.ts +13 -0
- package/serialization/resources/prompt/client/requests/PromptUpdateParams.js +34 -0
- package/serialization/resources/prompt/client/requests/index.d.ts +2 -0
- package/serialization/resources/prompt/client/requests/index.js +7 -0
- package/serialization/resources/prompt/index.d.ts +2 -0
- package/serialization/resources/prompt/index.js +18 -0
- package/serialization/resources/prompt/types/PromptCreateParamsModelParamsValue.d.ts +10 -0
- package/serialization/resources/prompt/types/PromptCreateParamsModelParamsValue.js +36 -0
- package/serialization/resources/prompt/types/index.d.ts +1 -0
- package/serialization/resources/prompt/types/index.js +17 -0
- package/serialization/resources/run/client/requests/RunCreateParams.d.ts +3 -2
- package/serialization/resources/run/client/requests/RunCreateParams.js +1 -0
- package/serialization/resources/run/client/requests/UpdateStatusParams.d.ts +4 -3
- package/serialization/resources/run/client/requests/UpdateStatusParams.js +2 -10
- package/serialization/resources/runMetric/client/get.d.ts +11 -0
- package/serialization/resources/runMetric/client/get.js +32 -0
- package/serialization/resources/runMetric/client/index.d.ts +1 -0
- package/{dist/serialization/types/ScoringParams.js → serialization/resources/runMetric/client/index.js} +2 -6
- package/serialization/resources/runMetric/index.d.ts +1 -0
- package/serialization/resources/runMetric/index.js +17 -0
- package/serialization/resources/score/client/requests/ScoreCreateParams.d.ts +2 -2
- package/serialization/resources/score/client/requests/ScoreUpdateParams.d.ts +2 -2
- package/serialization/resources/testcase/client/requests/TestcaseCreateParams.d.ts +6 -4
- package/serialization/resources/testcase/client/requests/TestcaseCreateParams.js +4 -15
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.d.ts +4 -3
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -1
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.d.ts +4 -3
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -1
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +12 -7
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +10 -24
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.d.ts +4 -3
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -1
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.d.ts +4 -3
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -1
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.d.ts +4 -3
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -1
- package/serialization/resources/testrecord/types/TestrecordCreateParamsModelDebugInfoValue.d.ts +2 -2
- package/serialization/resources/testrecord/types/TestrecordCreateParamsModelParamsValue.d.ts +2 -2
- package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -3
- package/serialization/resources/testset/client/requests/TestsetCreateParams.js +2 -10
- package/serialization/resources/traces/client/get.d.ts +10 -0
- package/serialization/resources/traces/client/get.js +40 -0
- package/serialization/resources/traces/client/index.d.ts +1 -0
- package/serialization/{types/ScoringParams.js → resources/traces/client/index.js} +2 -6
- package/serialization/resources/traces/index.d.ts +1 -0
- package/serialization/resources/traces/index.js +17 -0
- package/serialization/types/CreateGithubWorkflowParams.d.ts +2 -2
- package/serialization/types/CreateRunParams.d.ts +2 -2
- package/serialization/types/CustomSchema.d.ts +4 -3
- package/serialization/types/CustomSchema.js +2 -12
- package/serialization/types/CustomVariable.d.ts +6 -4
- package/serialization/types/CustomVariable.js +4 -11
- package/serialization/types/DataTypeEnum.d.ts +2 -2
- package/serialization/types/FileUrl.d.ts +2 -2
- package/serialization/types/Grade.d.ts +7 -4
- package/serialization/types/Grade.js +5 -11
- package/serialization/types/HttpValidationError.d.ts +4 -3
- package/serialization/types/HttpValidationError.js +2 -12
- package/serialization/types/JsonObject.d.ts +2 -2
- package/serialization/types/JsonObjectInputValue.d.ts +2 -2
- package/serialization/types/JsonObjectOutputValue.d.ts +2 -2
- package/serialization/types/NotFoundErrorBody.d.ts +2 -2
- package/serialization/types/PaginatedTestcaseResponse.d.ts +4 -3
- package/serialization/types/PaginatedTestcaseResponse.js +2 -10
- package/serialization/types/Prompt.d.ts +24 -0
- package/serialization/types/Prompt.js +45 -0
- package/serialization/types/PromptModelParamsValue.d.ts +10 -0
- package/serialization/types/PromptModelParamsValue.js +35 -0
- package/serialization/types/RoleEnum.d.ts +2 -2
- package/serialization/types/Run.d.ts +2 -2
- package/serialization/types/RunMetric.d.ts +15 -0
- package/serialization/types/RunMetric.js +36 -0
- package/serialization/types/RunStatus.d.ts +2 -2
- package/serialization/types/ScoreStatus.d.ts +2 -2
- package/serialization/types/Span.d.ts +34 -0
- package/serialization/types/Span.js +64 -0
- package/serialization/types/TestCase.d.ts +6 -4
- package/serialization/types/TestCase.js +4 -15
- package/serialization/types/TestCaseCreate.d.ts +2 -2
- package/serialization/types/TestCaseCustomInputsValue.d.ts +4 -3
- package/serialization/types/TestCaseCustomInputsValue.js +2 -1
- package/serialization/types/TestCaseCustomLabelsValue.d.ts +4 -3
- package/serialization/types/TestCaseCustomLabelsValue.js +2 -1
- package/serialization/types/TestRecordCreate.d.ts +2 -2
- package/serialization/types/TestSetCreate.d.ts +2 -2
- package/serialization/types/Testrecord.d.ts +12 -7
- package/serialization/types/Testrecord.js +10 -24
- package/serialization/types/TestrecordCustomInputsValue.d.ts +4 -3
- package/serialization/types/TestrecordCustomInputsValue.js +2 -1
- package/serialization/types/TestrecordCustomLabelsValue.d.ts +4 -3
- package/serialization/types/TestrecordCustomLabelsValue.js +2 -1
- package/serialization/types/TestrecordCustomOutputsValue.d.ts +4 -3
- package/serialization/types/TestrecordCustomOutputsValue.js +2 -1
- package/serialization/types/TestrecordModelDebugInfoValue.d.ts +2 -2
- package/serialization/types/TestrecordModelParamsValue.d.ts +2 -2
- package/serialization/types/Testset.d.ts +4 -3
- package/serialization/types/Testset.js +2 -10
- package/serialization/types/Trace.d.ts +14 -0
- package/serialization/types/Trace.js +35 -0
- package/serialization/types/UnauthenticatedError.d.ts +2 -2
- package/serialization/types/UnauthorizedErrorBody.d.ts +2 -2
- package/serialization/types/ValidationError.d.ts +4 -3
- package/serialization/types/ValidationError.js +2 -10
- package/serialization/types/ValidationErrorLocItem.d.ts +2 -2
- package/serialization/types/index.d.ts +5 -8
- package/serialization/types/index.js +5 -8
- package/api/types/AppTestRecordCreate.d.ts +0 -4
- package/api/types/ExecutionParams.d.ts +0 -4
- package/api/types/ModelParams.d.ts +0 -4
- package/api/types/ScoreExecutionParams.d.ts +0 -4
- package/api/types/ScoringParams.d.ts +0 -4
- package/api/types/TestCaseCreateInput.d.ts +0 -4
- package/dist/api/types/AppCreateRunParams.d.ts +0 -4
- package/dist/api/types/AppTestRecordCreate.d.ts +0 -4
- package/dist/api/types/AppTestSetCreate.d.ts +0 -4
- package/dist/api/types/ExecutionParams.d.ts +0 -4
- package/dist/api/types/ModelParams.d.ts +0 -4
- package/dist/api/types/ScoreExecutionParams.d.ts +0 -4
- package/dist/api/types/ScoringParams.d.ts +0 -4
- package/dist/api/types/TestCaseCreateInput.d.ts +0 -4
- package/dist/serialization/types/AppCreateRunParams.d.ts +0 -10
- package/dist/serialization/types/AppTestRecordCreate.d.ts +0 -10
- package/dist/serialization/types/AppTestSetCreate.d.ts +0 -10
- package/dist/serialization/types/ExecutionParams.d.ts +0 -10
- package/dist/serialization/types/ModelParams.d.ts +0 -10
- package/dist/serialization/types/ScoreExecutionParams.d.ts +0 -10
- package/dist/serialization/types/ScoreExecutionParams.js +0 -31
- package/dist/serialization/types/ScoringParams.d.ts +0 -10
- package/dist/serialization/types/TestCaseCreateInput.d.ts +0 -10
- package/dist/serialization/types/TestCaseCreateInput.js +0 -31
- package/serialization/types/AppCreateRunParams.d.ts +0 -10
- package/serialization/types/AppCreateRunParams.js +0 -31
- package/serialization/types/AppTestRecordCreate.d.ts +0 -10
- package/serialization/types/AppTestRecordCreate.js +0 -31
- package/serialization/types/AppTestSetCreate.d.ts +0 -10
- package/serialization/types/AppTestSetCreate.js +0 -31
- package/serialization/types/ExecutionParams.d.ts +0 -10
- package/serialization/types/ExecutionParams.js +0 -31
- package/serialization/types/ModelParams.d.ts +0 -10
- package/serialization/types/ScoreExecutionParams.d.ts +0 -10
- package/serialization/types/ScoreExecutionParams.js +0 -31
- package/serialization/types/ScoringParams.d.ts +0 -10
- package/serialization/types/TestCaseCreateInput.d.ts +0 -10
- package/serialization/types/TestCaseCreateInput.js +0 -31
- /package/api/{types/AppCreateRunParams.js → resources/prompt/client/requests/PromptCreateParams.js} +0 -0
- /package/api/{types/AppTestRecordCreate.js → resources/prompt/client/requests/PromptUpdateParams.js} +0 -0
- /package/api/{types/AppTestSetCreate.js → resources/prompt/types/PromptCreateParamsModelParamsValue.js} +0 -0
- /package/api/types/{ExecutionParams.js → Prompt.js} +0 -0
- /package/api/types/{ModelParams.js → PromptModelParamsValue.js} +0 -0
- /package/api/types/{ScoreExecutionParams.js → RunMetric.js} +0 -0
- /package/api/types/{ScoringParams.js → Span.js} +0 -0
- /package/api/types/{TestCaseCreateInput.js → Trace.js} +0 -0
- /package/dist/api/{types/AppCreateRunParams.js → resources/prompt/client/requests/PromptCreateParams.js} +0 -0
- /package/dist/api/{types/AppTestRecordCreate.js → resources/prompt/client/requests/PromptUpdateParams.js} +0 -0
- /package/dist/api/{types/AppTestSetCreate.js → resources/prompt/types/PromptCreateParamsModelParamsValue.js} +0 -0
- /package/dist/api/types/{ExecutionParams.js → Prompt.js} +0 -0
- /package/dist/api/types/{ModelParams.js → PromptModelParamsValue.js} +0 -0
- /package/dist/api/types/{ScoreExecutionParams.js → RunMetric.js} +0 -0
- /package/dist/api/types/{ScoringParams.js → Span.js} +0 -0
- /package/dist/api/types/{TestCaseCreateInput.js → Trace.js} +0 -0
|
@@ -10,10 +10,14 @@ export * from "./JsonObject";
|
|
|
10
10
|
export * from "./JsonObjectOutputValue";
|
|
11
11
|
export * from "./NotFoundErrorBody";
|
|
12
12
|
export * from "./PaginatedTestcaseResponse";
|
|
13
|
+
export * from "./PromptModelParamsValue";
|
|
14
|
+
export * from "./Prompt";
|
|
13
15
|
export * from "./RoleEnum";
|
|
14
16
|
export * from "./Run";
|
|
17
|
+
export * from "./RunMetric";
|
|
15
18
|
export * from "./RunStatus";
|
|
16
19
|
export * from "./ScoreStatus";
|
|
20
|
+
export * from "./Span";
|
|
17
21
|
export * from "./TestCaseCustomInputsValue";
|
|
18
22
|
export * from "./TestCaseCustomLabelsValue";
|
|
19
23
|
export * from "./TestCase";
|
|
@@ -27,16 +31,9 @@ export * from "./TestrecordModelParamsValue";
|
|
|
27
31
|
export * from "./TestrecordModelDebugInfoValue";
|
|
28
32
|
export * from "./Testrecord";
|
|
29
33
|
export * from "./Testset";
|
|
34
|
+
export * from "./Trace";
|
|
30
35
|
export * from "./UnauthenticatedError";
|
|
31
36
|
export * from "./UnauthorizedErrorBody";
|
|
32
37
|
export * from "./ValidationErrorLocItem";
|
|
33
38
|
export * from "./ValidationError";
|
|
34
39
|
export * from "./CreateGithubWorkflowParams";
|
|
35
|
-
export * from "./ExecutionParams";
|
|
36
|
-
export * from "./ModelParams";
|
|
37
|
-
export * from "./ScoreExecutionParams";
|
|
38
|
-
export * from "./ScoringParams";
|
|
39
|
-
export * from "./TestCaseCreateInput";
|
|
40
|
-
export * from "./AppCreateRunParams";
|
|
41
|
-
export * from "./AppTestRecordCreate";
|
|
42
|
-
export * from "./AppTestSetCreate";
|
package/dist/api/types/index.js
CHANGED
|
@@ -26,10 +26,14 @@ __exportStar(require("./JsonObject"), exports);
|
|
|
26
26
|
__exportStar(require("./JsonObjectOutputValue"), exports);
|
|
27
27
|
__exportStar(require("./NotFoundErrorBody"), exports);
|
|
28
28
|
__exportStar(require("./PaginatedTestcaseResponse"), exports);
|
|
29
|
+
__exportStar(require("./PromptModelParamsValue"), exports);
|
|
30
|
+
__exportStar(require("./Prompt"), exports);
|
|
29
31
|
__exportStar(require("./RoleEnum"), exports);
|
|
30
32
|
__exportStar(require("./Run"), exports);
|
|
33
|
+
__exportStar(require("./RunMetric"), exports);
|
|
31
34
|
__exportStar(require("./RunStatus"), exports);
|
|
32
35
|
__exportStar(require("./ScoreStatus"), exports);
|
|
36
|
+
__exportStar(require("./Span"), exports);
|
|
33
37
|
__exportStar(require("./TestCaseCustomInputsValue"), exports);
|
|
34
38
|
__exportStar(require("./TestCaseCustomLabelsValue"), exports);
|
|
35
39
|
__exportStar(require("./TestCase"), exports);
|
|
@@ -43,16 +47,9 @@ __exportStar(require("./TestrecordModelParamsValue"), exports);
|
|
|
43
47
|
__exportStar(require("./TestrecordModelDebugInfoValue"), exports);
|
|
44
48
|
__exportStar(require("./Testrecord"), exports);
|
|
45
49
|
__exportStar(require("./Testset"), exports);
|
|
50
|
+
__exportStar(require("./Trace"), exports);
|
|
46
51
|
__exportStar(require("./UnauthenticatedError"), exports);
|
|
47
52
|
__exportStar(require("./UnauthorizedErrorBody"), exports);
|
|
48
53
|
__exportStar(require("./ValidationErrorLocItem"), exports);
|
|
49
54
|
__exportStar(require("./ValidationError"), exports);
|
|
50
55
|
__exportStar(require("./CreateGithubWorkflowParams"), exports);
|
|
51
|
-
__exportStar(require("./ExecutionParams"), exports);
|
|
52
|
-
__exportStar(require("./ModelParams"), exports);
|
|
53
|
-
__exportStar(require("./ScoreExecutionParams"), exports);
|
|
54
|
-
__exportStar(require("./ScoringParams"), exports);
|
|
55
|
-
__exportStar(require("./TestCaseCreateInput"), exports);
|
|
56
|
-
__exportStar(require("./AppCreateRunParams"), exports);
|
|
57
|
-
__exportStar(require("./AppTestRecordCreate"), exports);
|
|
58
|
-
__exportStar(require("./AppTestSetCreate"), exports);
|
|
@@ -6,12 +6,12 @@ export declare namespace Fetcher {
|
|
|
6
6
|
method: string;
|
|
7
7
|
contentType?: string;
|
|
8
8
|
headers?: Record<string, string | undefined>;
|
|
9
|
-
queryParameters?: Record<string, string | string[]>;
|
|
9
|
+
queryParameters?: Record<string, string | string[] | object | object[]>;
|
|
10
10
|
body?: unknown;
|
|
11
11
|
timeoutMs?: number;
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
|
-
responseType?: "json" | "blob" | "streaming";
|
|
14
|
+
responseType?: "json" | "blob" | "streaming" | "text";
|
|
15
15
|
}
|
|
16
16
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
17
17
|
interface FailedStatusCodeError {
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -13,11 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
36
|
};
|
|
14
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
38
|
exports.fetcher = void 0;
|
|
16
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
17
39
|
const qs_1 = __importDefault(require("qs"));
|
|
18
|
-
|
|
19
|
-
global.fetch = require("node-fetch");
|
|
20
|
-
}
|
|
40
|
+
const runtime_1 = require("../runtime");
|
|
21
41
|
const INITIAL_RETRY_DELAY = 1;
|
|
22
42
|
const MAX_RETRY_DELAY = 60;
|
|
23
43
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -39,25 +59,54 @@ function fetcherImpl(args) {
|
|
|
39
59
|
? `${args.url}?${qs_1.default.stringify(args.queryParameters, { arrayFormat: "repeat" })}`
|
|
40
60
|
: args.url;
|
|
41
61
|
let body = undefined;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
const maybeStringifyBody = (body) => {
|
|
63
|
+
if (body instanceof Uint8Array) {
|
|
64
|
+
return body;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return JSON.stringify(body);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
if (runtime_1.RUNTIME.type === "node") {
|
|
71
|
+
if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("formdata-node")))).FormData) {
|
|
72
|
+
// @ts-expect-error
|
|
73
|
+
body = args.body;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
body = maybeStringifyBody(args.body);
|
|
77
|
+
}
|
|
45
78
|
}
|
|
46
79
|
else {
|
|
47
|
-
body
|
|
80
|
+
if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("form-data")))).default) {
|
|
81
|
+
// @ts-expect-error
|
|
82
|
+
body = args.body;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
body = maybeStringifyBody(args.body);
|
|
86
|
+
}
|
|
48
87
|
}
|
|
88
|
+
// In Node.js environments, the SDK always uses`node-fetch`.
|
|
89
|
+
// If not in Node.js the SDK uses global fetch if available,
|
|
90
|
+
// and falls back to node-fetch.
|
|
91
|
+
const fetchFn = runtime_1.RUNTIME.type === "node"
|
|
92
|
+
? // `.default` is required due to this issue:
|
|
93
|
+
// https://github.com/node-fetch/node-fetch/issues/450#issuecomment-387045223
|
|
94
|
+
(yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default
|
|
95
|
+
: typeof fetch == "function"
|
|
96
|
+
? fetch
|
|
97
|
+
: (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
49
98
|
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
50
99
|
const controller = new AbortController();
|
|
51
100
|
let abortId = undefined;
|
|
52
101
|
if (args.timeoutMs != null) {
|
|
53
102
|
abortId = setTimeout(() => controller.abort(), args.timeoutMs);
|
|
54
103
|
}
|
|
55
|
-
const response = yield
|
|
104
|
+
const response = yield fetchFn(url, {
|
|
56
105
|
method: args.method,
|
|
57
106
|
headers,
|
|
58
107
|
body,
|
|
59
108
|
signal: controller.signal,
|
|
60
|
-
credentials: args.withCredentials ? "
|
|
109
|
+
credentials: args.withCredentials ? "include" : undefined,
|
|
61
110
|
});
|
|
62
111
|
if (abortId != null) {
|
|
63
112
|
clearTimeout(abortId);
|
|
@@ -86,19 +135,25 @@ function fetcherImpl(args) {
|
|
|
86
135
|
else if (response.body != null && args.responseType === "streaming") {
|
|
87
136
|
body = response.body;
|
|
88
137
|
}
|
|
89
|
-
else if (response.body != null) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
138
|
+
else if (response.body != null && args.responseType === "text") {
|
|
139
|
+
body = yield response.text();
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
const text = yield response.text();
|
|
143
|
+
if (text.length > 0) {
|
|
144
|
+
try {
|
|
145
|
+
body = JSON.parse(text);
|
|
146
|
+
}
|
|
147
|
+
catch (err) {
|
|
148
|
+
return {
|
|
149
|
+
ok: false,
|
|
150
|
+
error: {
|
|
151
|
+
reason: "non-json",
|
|
152
|
+
statusCode: response.status,
|
|
153
|
+
rawBody: text,
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
102
157
|
}
|
|
103
158
|
}
|
|
104
159
|
if (response.status >= 200 && response.status < 400) {
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.js
CHANGED
|
@@ -28,4 +28,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.serialization = void 0;
|
|
30
30
|
__exportStar(require("./fetcher"), exports);
|
|
31
|
+
__exportStar(require("./runtime"), exports);
|
|
31
32
|
exports.serialization = __importStar(require("./schemas"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RUNTIME } from "./runtime";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
3
|
+
*/
|
|
4
|
+
export declare const RUNTIME: Runtime;
|
|
5
|
+
export interface Runtime {
|
|
6
|
+
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown";
|
|
7
|
+
version?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a, _b, _c, _d;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RUNTIME = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* A constant that indicates whether the environment the code is running is a Web Browser.
|
|
7
|
+
*/
|
|
8
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
9
|
+
/**
|
|
10
|
+
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
11
|
+
*/
|
|
12
|
+
const isWebWorker = typeof self === "object" &&
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
15
|
+
(((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
|
|
16
|
+
((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
|
|
17
|
+
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
|
|
18
|
+
/**
|
|
19
|
+
* A constant that indicates whether the environment the code is running is Deno.
|
|
20
|
+
*/
|
|
21
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
22
|
+
/**
|
|
23
|
+
* A constant that indicates whether the environment the code is running is Bun.sh.
|
|
24
|
+
*/
|
|
25
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
26
|
+
/**
|
|
27
|
+
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
28
|
+
*/
|
|
29
|
+
const isNode = typeof process !== "undefined" &&
|
|
30
|
+
Boolean(process.version) &&
|
|
31
|
+
Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&
|
|
32
|
+
// Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
|
|
33
|
+
!isDeno &&
|
|
34
|
+
!isBun;
|
|
35
|
+
/**
|
|
36
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
37
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
38
|
+
*/
|
|
39
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
40
|
+
/**
|
|
41
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
42
|
+
*/
|
|
43
|
+
exports.RUNTIME = evaluateRuntime();
|
|
44
|
+
function evaluateRuntime() {
|
|
45
|
+
if (isBrowser) {
|
|
46
|
+
return {
|
|
47
|
+
type: "browser",
|
|
48
|
+
version: window.navigator.userAgent,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (isWebWorker) {
|
|
52
|
+
return {
|
|
53
|
+
type: "web-worker",
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (isDeno) {
|
|
57
|
+
return {
|
|
58
|
+
type: "deno",
|
|
59
|
+
version: Deno.version.deno,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (isBun) {
|
|
63
|
+
return {
|
|
64
|
+
type: "bun",
|
|
65
|
+
version: Bun.version,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (isNode) {
|
|
69
|
+
return {
|
|
70
|
+
type: "node",
|
|
71
|
+
version: process.versions.node,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (isReactNative) {
|
|
75
|
+
return {
|
|
76
|
+
type: "react-native",
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
type: "unknown",
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -39,7 +39,7 @@ function object(schemas) {
|
|
|
39
39
|
valueSchema,
|
|
40
40
|
};
|
|
41
41
|
rawKeyToProperty[rawKey] = property;
|
|
42
|
-
if (
|
|
42
|
+
if (isSchemaRequired(valueSchema)) {
|
|
43
43
|
requiredKeys.push(rawKey);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -70,7 +70,7 @@ function object(schemas) {
|
|
|
70
70
|
const valueSchema = (0, property_1.isProperty)(schemaOrObjectProperty)
|
|
71
71
|
? schemaOrObjectProperty.valueSchema
|
|
72
72
|
: schemaOrObjectProperty;
|
|
73
|
-
if (
|
|
73
|
+
if (isSchemaRequired(valueSchema)) {
|
|
74
74
|
requiredKeys.push(parsedKey);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -240,19 +240,15 @@ function validateAndTransformExtendedObject({ extensionKeys, value, transformBas
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
function isSchemaRequired(schema) {
|
|
243
|
-
return
|
|
244
|
-
return !(yield isSchemaOptional(schema));
|
|
245
|
-
});
|
|
243
|
+
return !isSchemaOptional(schema);
|
|
246
244
|
}
|
|
247
245
|
function isSchemaOptional(schema) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
});
|
|
246
|
+
switch (schema.getType()) {
|
|
247
|
+
case Schema_1.SchemaType.ANY:
|
|
248
|
+
case Schema_1.SchemaType.UNKNOWN:
|
|
249
|
+
case Schema_1.SchemaType.OPTIONAL:
|
|
250
|
+
return true;
|
|
251
|
+
default:
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
258
254
|
}
|
|
@@ -2,6 +2,10 @@ export * as testcase from "./testcase";
|
|
|
2
2
|
export * from "./testcase/types";
|
|
3
3
|
export * as testrecord from "./testrecord";
|
|
4
4
|
export * from "./testrecord/types";
|
|
5
|
+
export * as prompt from "./prompt";
|
|
6
|
+
export * from "./prompt/types";
|
|
7
|
+
export * as runMetric from "./runMetric";
|
|
8
|
+
export * as traces from "./traces";
|
|
5
9
|
export * as testset from "./testset";
|
|
6
10
|
export * from "./testset/client/requests";
|
|
7
11
|
export * from "./testcase/client/requests";
|
|
@@ -10,3 +14,4 @@ export * as run from "./run";
|
|
|
10
14
|
export * from "./run/client/requests";
|
|
11
15
|
export * as score from "./score";
|
|
12
16
|
export * from "./score/client/requests";
|
|
17
|
+
export * from "./prompt/client/requests";
|
|
@@ -26,11 +26,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.score = exports.run = exports.testset = exports.testrecord = exports.testcase = void 0;
|
|
29
|
+
exports.score = exports.run = exports.testset = exports.traces = exports.runMetric = exports.prompt = exports.testrecord = exports.testcase = void 0;
|
|
30
30
|
exports.testcase = __importStar(require("./testcase"));
|
|
31
31
|
__exportStar(require("./testcase/types"), exports);
|
|
32
32
|
exports.testrecord = __importStar(require("./testrecord"));
|
|
33
33
|
__exportStar(require("./testrecord/types"), exports);
|
|
34
|
+
exports.prompt = __importStar(require("./prompt"));
|
|
35
|
+
__exportStar(require("./prompt/types"), exports);
|
|
36
|
+
exports.runMetric = __importStar(require("./runMetric"));
|
|
37
|
+
exports.traces = __importStar(require("./traces"));
|
|
34
38
|
exports.testset = __importStar(require("./testset"));
|
|
35
39
|
__exportStar(require("./testset/client/requests"), exports);
|
|
36
40
|
__exportStar(require("./testcase/client/requests"), exports);
|
|
@@ -39,3 +43,4 @@ exports.run = __importStar(require("./run"));
|
|
|
39
43
|
__exportStar(require("./run/client/requests"), exports);
|
|
40
44
|
exports.score = __importStar(require("./score"));
|
|
41
45
|
__exportStar(require("./score/client/requests"), exports);
|
|
46
|
+
__exportStar(require("./prompt/client/requests"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { Prompt } from "../../../types/Prompt";
|
|
8
|
+
export declare const Response: core.serialization.Schema<serializers.prompt.getGraph.Response.Raw, Scorecard.Prompt[]>;
|
|
9
|
+
export declare namespace Response {
|
|
10
|
+
type Raw = Prompt.Raw[];
|
|
11
|
+
}
|
package/dist/serialization/{types/AppCreateRunParams.js → resources/prompt/client/getGraph.js}
RENAMED
|
@@ -26,6 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const core = __importStar(require("
|
|
31
|
-
|
|
29
|
+
exports.Response = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const Prompt_1 = require("../../../types/Prompt");
|
|
32
|
+
exports.Response = core.serialization.list(Prompt_1.Prompt);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { Prompt } from "../../../types/Prompt";
|
|
8
|
+
export declare const Response: core.serialization.Schema<serializers.prompt.getProds.Response.Raw, Scorecard.Prompt[]>;
|
|
9
|
+
export declare namespace Response {
|
|
10
|
+
type Raw = Prompt.Raw[];
|
|
11
|
+
}
|
package/dist/serialization/{types/AppTestRecordCreate.js → resources/prompt/client/getProds.js}
RENAMED
|
@@ -26,6 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const core = __importStar(require("
|
|
31
|
-
|
|
29
|
+
exports.Response = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const Prompt_1 = require("../../../types/Prompt");
|
|
32
|
+
exports.Response = core.serialization.list(Prompt_1.Prompt);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { Prompt } from "../../../types/Prompt";
|
|
8
|
+
export declare const Response: core.serialization.Schema<serializers.prompt.getRoots.Response.Raw, Scorecard.Prompt[]>;
|
|
9
|
+
export declare namespace Response {
|
|
10
|
+
type Raw = Prompt.Raw[];
|
|
11
|
+
}
|
package/dist/serialization/{types/AppTestSetCreate.js → resources/prompt/client/getRoots.js}
RENAMED
|
@@ -26,6 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const core = __importStar(require("
|
|
31
|
-
|
|
29
|
+
exports.Response = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const Prompt_1 = require("../../../types/Prompt");
|
|
32
|
+
exports.Response = core.serialization.list(Prompt_1.Prompt);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.getGraph = exports.getProds = exports.getRoots = void 0;
|
|
30
|
+
exports.getRoots = __importStar(require("./getRoots"));
|
|
31
|
+
exports.getProds = __importStar(require("./getProds"));
|
|
32
|
+
exports.getGraph = __importStar(require("./getGraph"));
|
|
33
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../../api/index";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
import { PromptCreateParamsModelParamsValue } from "../../types/PromptCreateParamsModelParamsValue";
|
|
8
|
+
export declare const PromptCreateParams: core.serialization.Schema<serializers.PromptCreateParams.Raw, Scorecard.PromptCreateParams>;
|
|
9
|
+
export declare namespace PromptCreateParams {
|
|
10
|
+
interface Raw {
|
|
11
|
+
prompt_template: string;
|
|
12
|
+
name?: string | null;
|
|
13
|
+
parent_id?: string | null;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
model_params?: Record<string, PromptCreateParamsModelParamsValue.Raw | null | undefined> | null;
|
|
16
|
+
is_prod?: boolean | null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.PromptCreateParams = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
const PromptCreateParamsModelParamsValue_1 = require("../../types/PromptCreateParamsModelParamsValue");
|
|
32
|
+
exports.PromptCreateParams = core.serialization.object({
|
|
33
|
+
promptTemplate: core.serialization.property("prompt_template", core.serialization.string()),
|
|
34
|
+
name: core.serialization.string().optional(),
|
|
35
|
+
parentId: core.serialization.property("parent_id", core.serialization.string().optional()),
|
|
36
|
+
description: core.serialization.string().optional(),
|
|
37
|
+
modelParams: core.serialization.property("model_params", core.serialization.record(core.serialization.string(), PromptCreateParamsModelParamsValue_1.PromptCreateParamsModelParamsValue.optional()).optional()),
|
|
38
|
+
isProd: core.serialization.property("is_prod", core.serialization.boolean().optional()),
|
|
39
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../../api/index";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
export declare const PromptUpdateParams: core.serialization.Schema<serializers.PromptUpdateParams.Raw, Scorecard.PromptUpdateParams>;
|
|
8
|
+
export declare namespace PromptUpdateParams {
|
|
9
|
+
interface Raw {
|
|
10
|
+
is_archived?: boolean | null;
|
|
11
|
+
is_prod?: boolean | null;
|
|
12
|
+
}
|
|
13
|
+
}
|