scorecard-ai 0.5.4 → 0.6.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 -3
- package/Client.js +8 -3
- package/api/resources/index.d.ts +3 -1
- package/api/resources/index.js +4 -2
- package/api/resources/prompt/client/Client.d.ts +27 -22
- package/api/resources/prompt/client/Client.js +110 -99
- package/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +15 -0
- package/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/api/resources/run/client/Client.d.ts +6 -3
- package/api/resources/run/client/Client.js +26 -23
- package/api/resources/runMetric/client/Client.d.ts +4 -1
- package/api/resources/runMetric/client/Client.js +8 -7
- package/api/resources/score/client/Client.d.ts +5 -2
- package/api/resources/score/client/Client.js +18 -16
- package/api/resources/scoringConfig/client/Client.d.ts +62 -0
- package/{dist/api/resources/traces → api/resources/scoringConfig}/client/Client.js +114 -16
- package/api/resources/scoringConfig/client/index.d.ts +1 -0
- package/api/resources/scoringConfig/client/index.js +17 -0
- package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +16 -0
- package/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/api/resources/testcase/client/Client.d.ts +55 -3
- package/api/resources/testcase/client/Client.js +308 -22
- package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
- package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
- package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
- package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
- package/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
- package/api/resources/testcase/client/requests/index.d.ts +3 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
- package/api/resources/testcase/types/index.d.ts +2 -0
- package/api/resources/testcase/types/index.js +2 -0
- package/api/resources/testrecord/client/Client.d.ts +5 -2
- package/api/resources/testrecord/client/Client.js +17 -15
- package/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
- package/api/resources/testset/client/Client.d.ts +24 -5
- package/api/resources/testset/client/Client.js +135 -36
- package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +6 -0
- package/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
- package/api/resources/testset/client/requests/index.d.ts +1 -0
- package/api/resources/tracing/client/Client.d.ts +72 -0
- package/api/resources/tracing/client/Client.js +327 -0
- package/api/types/IngestionMethod.d.ts +8 -0
- package/api/types/IngestionMethod.js +10 -0
- package/api/types/ScoringConfig.d.ts +16 -0
- package/api/types/ScoringConfig.js +5 -0
- package/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
- package/api/types/TestcaseBatchDeletionResponse.js +5 -0
- package/api/types/Testrecord.d.ts +2 -0
- package/api/types/Trace.d.ts +2 -0
- package/api/types/index.d.ts +6 -4
- package/api/types/index.js +6 -4
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +19 -176
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +7 -4
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +9 -3
- package/dist/Client.js +8 -3
- package/dist/api/resources/index.d.ts +3 -1
- package/dist/api/resources/index.js +4 -2
- package/dist/api/resources/prompt/client/Client.d.ts +27 -22
- package/dist/api/resources/prompt/client/Client.js +110 -99
- package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +15 -0
- package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.js +5 -0
- package/dist/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/dist/api/resources/run/client/Client.d.ts +6 -3
- package/dist/api/resources/run/client/Client.js +26 -23
- package/dist/api/resources/runMetric/client/Client.d.ts +4 -1
- package/dist/api/resources/runMetric/client/Client.js +8 -7
- package/dist/api/resources/score/client/Client.d.ts +5 -2
- package/dist/api/resources/score/client/Client.js +18 -16
- package/dist/api/resources/scoringConfig/client/Client.d.ts +62 -0
- package/{api/resources/traces → dist/api/resources/scoringConfig}/client/Client.js +114 -16
- package/dist/api/resources/scoringConfig/client/index.d.ts +1 -0
- package/dist/api/resources/scoringConfig/client/index.js +17 -0
- package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +16 -0
- package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +5 -0
- package/dist/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/dist/api/resources/scoringConfig/client/requests/index.js +2 -0
- package/dist/api/resources/testcase/client/Client.d.ts +55 -3
- package/dist/api/resources/testcase/client/Client.js +308 -22
- package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/index.d.ts +3 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
- package/dist/api/resources/testcase/types/index.d.ts +2 -0
- package/dist/api/resources/testcase/types/index.js +2 -0
- package/dist/api/resources/testrecord/client/Client.d.ts +5 -2
- package/dist/api/resources/testrecord/client/Client.js +17 -15
- package/dist/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
- package/dist/api/resources/testset/client/Client.d.ts +24 -5
- package/dist/api/resources/testset/client/Client.js +135 -36
- package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +6 -0
- package/dist/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/dist/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
- package/dist/api/resources/testset/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tracing/client/Client.d.ts +72 -0
- package/dist/api/resources/tracing/client/Client.js +327 -0
- package/dist/api/resources/tracing/client/index.js +2 -0
- package/dist/api/types/IngestionMethod.d.ts +8 -0
- package/dist/api/types/IngestionMethod.js +10 -0
- package/dist/api/types/ScoringConfig.d.ts +16 -0
- package/dist/api/types/ScoringConfig.js +5 -0
- package/dist/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
- package/dist/api/types/TestcaseBatchDeletionResponse.js +5 -0
- package/dist/api/types/Testrecord.d.ts +2 -0
- package/dist/api/types/Trace.d.ts +2 -0
- package/dist/api/types/index.d.ts +6 -4
- package/dist/api/types/index.js +6 -4
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +19 -176
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +7 -4
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/index.d.ts +3 -1
- package/dist/serialization/resources/index.js +4 -2
- package/dist/serialization/resources/scoringConfig/client/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/client/index.js +17 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +14 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +35 -0
- package/dist/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/client/requests/index.js +5 -0
- package/dist/serialization/resources/scoringConfig/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/index.js +17 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
- package/dist/serialization/resources/testcase/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/testcase/client/requests/index.js +7 -1
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
- package/dist/serialization/resources/testcase/types/index.d.ts +2 -0
- package/dist/serialization/resources/testcase/types/index.js +2 -0
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -0
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +4 -0
- package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
- package/dist/serialization/resources/testset/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/testset/client/requests/index.js +3 -1
- package/dist/serialization/resources/tracing/client/index.d.ts +1 -0
- package/{serialization/resources/traces → dist/serialization/resources/tracing}/client/index.js +2 -2
- package/dist/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
- package/dist/serialization/resources/tracing/client/traces.js +32 -0
- package/dist/serialization/resources/tracing/index.d.ts +1 -0
- package/dist/serialization/resources/tracing/index.js +17 -0
- package/dist/serialization/types/IngestionMethod.d.ts +10 -0
- package/dist/serialization/types/IngestionMethod.js +31 -0
- package/dist/serialization/types/JsonObject.js +2 -10
- package/dist/serialization/types/JsonObjectInputValue.js +3 -11
- package/dist/serialization/types/JsonObjectOutputValue.js +3 -11
- package/dist/serialization/types/ScoringConfig.d.ts +20 -0
- package/dist/serialization/types/ScoringConfig.js +41 -0
- package/dist/serialization/types/Span.js +2 -10
- package/dist/serialization/types/TestCaseCustomInputsValue.js +2 -10
- package/dist/serialization/types/TestCaseCustomLabelsValue.js +2 -10
- package/dist/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
- package/dist/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
- package/dist/serialization/types/Testrecord.d.ts +1 -0
- package/dist/serialization/types/Testrecord.js +1 -0
- package/dist/serialization/types/TestrecordCustomInputsValue.js +2 -10
- package/dist/serialization/types/TestrecordCustomLabelsValue.js +2 -10
- package/dist/serialization/types/TestrecordCustomOutputsValue.js +2 -10
- package/dist/serialization/types/Trace.d.ts +1 -0
- package/dist/serialization/types/Trace.js +2 -0
- package/dist/serialization/types/index.d.ts +6 -4
- package/dist/serialization/types/index.js +6 -4
- package/package.json +8 -2
- package/reference.md +657 -569
- package/serialization/resources/index.d.ts +3 -1
- package/serialization/resources/index.js +4 -2
- package/serialization/resources/scoringConfig/client/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/client/index.js +17 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +14 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +35 -0
- package/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/client/requests/index.js +5 -0
- package/serialization/resources/scoringConfig/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/index.js +17 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
- package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
- package/serialization/resources/testcase/client/requests/index.d.ts +3 -0
- package/serialization/resources/testcase/client/requests/index.js +7 -1
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
- package/serialization/resources/testcase/types/index.d.ts +2 -0
- package/serialization/resources/testcase/types/index.js +2 -0
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
- package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -0
- package/serialization/resources/testset/client/requests/TestsetCreateParams.js +4 -0
- package/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
- package/serialization/resources/testset/client/requests/index.d.ts +1 -0
- package/serialization/resources/testset/client/requests/index.js +3 -1
- package/serialization/resources/tracing/client/index.d.ts +1 -0
- package/{dist/serialization/resources/traces → serialization/resources/tracing}/client/index.js +2 -2
- package/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
- package/serialization/resources/tracing/client/traces.js +32 -0
- package/serialization/resources/tracing/index.d.ts +1 -0
- package/serialization/resources/tracing/index.js +17 -0
- package/serialization/types/IngestionMethod.d.ts +10 -0
- package/serialization/types/IngestionMethod.js +31 -0
- package/serialization/types/JsonObject.js +2 -10
- package/serialization/types/JsonObjectInputValue.js +3 -11
- package/serialization/types/JsonObjectOutputValue.js +3 -11
- package/serialization/types/ScoringConfig.d.ts +20 -0
- package/serialization/types/ScoringConfig.js +41 -0
- package/serialization/types/Span.js +2 -10
- package/serialization/types/TestCaseCustomInputsValue.js +2 -10
- package/serialization/types/TestCaseCustomLabelsValue.js +2 -10
- package/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
- package/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
- package/serialization/types/Testrecord.d.ts +1 -0
- package/serialization/types/Testrecord.js +1 -0
- package/serialization/types/TestrecordCustomInputsValue.js +2 -10
- package/serialization/types/TestrecordCustomLabelsValue.js +2 -10
- package/serialization/types/TestrecordCustomOutputsValue.js +2 -10
- package/serialization/types/Trace.d.ts +1 -0
- package/serialization/types/Trace.js +2 -0
- package/serialization/types/index.d.ts +6 -4
- package/serialization/types/index.js +6 -4
- package/api/resources/traces/client/Client.d.ts +0 -40
- package/api/types/TestCaseCreate.d.ts +0 -10
- package/dist/api/resources/traces/client/Client.d.ts +0 -40
- package/dist/api/types/TestCaseCreate.d.ts +0 -10
- package/dist/serialization/resources/traces/client/index.d.ts +0 -1
- package/dist/serialization/types/TestCaseCreate.d.ts +0 -16
- package/serialization/resources/traces/client/index.d.ts +0 -1
- package/serialization/types/TestCaseCreate.d.ts +0 -16
- /package/api/{types/TestCaseCreate.js → resources/prompt/client/requests/PromptGetByNameRequest.js} +0 -0
- /package/{dist/api/types/TestCaseCreate.js → api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js} +0 -0
- /package/api/resources/{traces/client → scoringConfig/client/requests}/index.js +0 -0
- /package/api/resources/{traces → scoringConfig}/index.d.ts +0 -0
- /package/api/resources/{traces → scoringConfig}/index.js +0 -0
- /package/api/resources/{traces → tracing}/client/index.d.ts +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/client/index.js +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/index.d.ts +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/index.js +0 -0
- /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.d.ts +0 -0
- /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.js +0 -0
- /package/dist/api/resources/{traces → tracing}/client/index.d.ts +0 -0
- /package/{serialization/resources/traces → dist/api/resources/tracing}/index.d.ts +0 -0
- /package/{serialization/resources/traces → dist/api/resources/tracing}/index.js +0 -0
package/Client.d.ts
CHANGED
|
@@ -9,8 +9,9 @@ import { Testrecord } from "./api/resources/testrecord/client/Client";
|
|
|
9
9
|
import { Run } from "./api/resources/run/client/Client";
|
|
10
10
|
import { Score } from "./api/resources/score/client/Client";
|
|
11
11
|
import { RunMetric } from "./api/resources/runMetric/client/Client";
|
|
12
|
-
import {
|
|
12
|
+
import { Tracing } from "./api/resources/tracing/client/Client";
|
|
13
13
|
import { Prompt } from "./api/resources/prompt/client/Client";
|
|
14
|
+
import { ScoringConfig } from "./api/resources/scoringConfig/client/Client";
|
|
14
15
|
export declare namespace ScorecardClient {
|
|
15
16
|
interface Options {
|
|
16
17
|
environment?: core.Supplier<environments.ScorecardEnvironment | string>;
|
|
@@ -18,8 +19,11 @@ export declare namespace ScorecardClient {
|
|
|
18
19
|
fetcher?: core.FetchFunction;
|
|
19
20
|
}
|
|
20
21
|
interface RequestOptions {
|
|
22
|
+
/** The maximum time to wait for a response in seconds. */
|
|
21
23
|
timeoutInSeconds?: number;
|
|
24
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
25
|
maxRetries?: number;
|
|
26
|
+
/** A hook to abort the request. */
|
|
23
27
|
abortSignal?: AbortSignal;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -38,8 +42,10 @@ export declare class ScorecardClient {
|
|
|
38
42
|
get score(): Score;
|
|
39
43
|
protected _runMetric: RunMetric | undefined;
|
|
40
44
|
get runMetric(): RunMetric;
|
|
41
|
-
protected
|
|
42
|
-
get
|
|
45
|
+
protected _tracing: Tracing | undefined;
|
|
46
|
+
get tracing(): Tracing;
|
|
43
47
|
protected _prompt: Prompt | undefined;
|
|
44
48
|
get prompt(): Prompt;
|
|
49
|
+
protected _scoringConfig: ScoringConfig | undefined;
|
|
50
|
+
get scoringConfig(): ScoringConfig;
|
|
45
51
|
}
|
package/Client.js
CHANGED
|
@@ -10,8 +10,9 @@ const Client_3 = require("./api/resources/testrecord/client/Client");
|
|
|
10
10
|
const Client_4 = require("./api/resources/run/client/Client");
|
|
11
11
|
const Client_5 = require("./api/resources/score/client/Client");
|
|
12
12
|
const Client_6 = require("./api/resources/runMetric/client/Client");
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
13
|
+
const Client_7 = require("./api/resources/tracing/client/Client");
|
|
14
14
|
const Client_8 = require("./api/resources/prompt/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/scoringConfig/client/Client");
|
|
15
16
|
class ScorecardClient {
|
|
16
17
|
constructor(_options) {
|
|
17
18
|
this._options = _options;
|
|
@@ -40,13 +41,17 @@ class ScorecardClient {
|
|
|
40
41
|
var _a;
|
|
41
42
|
return ((_a = this._runMetric) !== null && _a !== void 0 ? _a : (this._runMetric = new Client_6.RunMetric(this._options)));
|
|
42
43
|
}
|
|
43
|
-
get
|
|
44
|
+
get tracing() {
|
|
44
45
|
var _a;
|
|
45
|
-
return ((_a = this.
|
|
46
|
+
return ((_a = this._tracing) !== null && _a !== void 0 ? _a : (this._tracing = new Client_7.Tracing(this._options)));
|
|
46
47
|
}
|
|
47
48
|
get prompt() {
|
|
48
49
|
var _a;
|
|
49
50
|
return ((_a = this._prompt) !== null && _a !== void 0 ? _a : (this._prompt = new Client_8.Prompt(this._options)));
|
|
50
51
|
}
|
|
52
|
+
get scoringConfig() {
|
|
53
|
+
var _a;
|
|
54
|
+
return ((_a = this._scoringConfig) !== null && _a !== void 0 ? _a : (this._scoringConfig = new Client_9.ScoringConfig(this._options)));
|
|
55
|
+
}
|
|
51
56
|
}
|
|
52
57
|
exports.ScorecardClient = ScorecardClient;
|
package/api/resources/index.d.ts
CHANGED
|
@@ -8,10 +8,12 @@ export * as testset from "./testset";
|
|
|
8
8
|
export * as run from "./run";
|
|
9
9
|
export * as score from "./score";
|
|
10
10
|
export * as runMetric from "./runMetric";
|
|
11
|
-
export * as
|
|
11
|
+
export * as tracing from "./tracing";
|
|
12
|
+
export * as scoringConfig from "./scoringConfig";
|
|
12
13
|
export * from "./testset/client/requests";
|
|
13
14
|
export * from "./testcase/client/requests";
|
|
14
15
|
export * from "./testrecord/client/requests";
|
|
15
16
|
export * from "./run/client/requests";
|
|
16
17
|
export * from "./score/client/requests";
|
|
17
18
|
export * from "./prompt/client/requests";
|
|
19
|
+
export * from "./scoringConfig/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -26,7 +26,7 @@ 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.
|
|
29
|
+
exports.scoringConfig = exports.tracing = exports.runMetric = exports.score = exports.run = exports.testset = 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"));
|
|
@@ -37,10 +37,12 @@ exports.testset = __importStar(require("./testset"));
|
|
|
37
37
|
exports.run = __importStar(require("./run"));
|
|
38
38
|
exports.score = __importStar(require("./score"));
|
|
39
39
|
exports.runMetric = __importStar(require("./runMetric"));
|
|
40
|
-
exports.
|
|
40
|
+
exports.tracing = __importStar(require("./tracing"));
|
|
41
|
+
exports.scoringConfig = __importStar(require("./scoringConfig"));
|
|
41
42
|
__exportStar(require("./testset/client/requests"), exports);
|
|
42
43
|
__exportStar(require("./testcase/client/requests"), exports);
|
|
43
44
|
__exportStar(require("./testrecord/client/requests"), exports);
|
|
44
45
|
__exportStar(require("./run/client/requests"), exports);
|
|
45
46
|
__exportStar(require("./score/client/requests"), exports);
|
|
46
47
|
__exportStar(require("./prompt/client/requests"), exports);
|
|
48
|
+
__exportStar(require("./scoringConfig/client/requests"), exports);
|
|
@@ -11,14 +11,34 @@ export declare namespace Prompt {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
export declare class Prompt {
|
|
20
23
|
protected readonly _options: Prompt.Options;
|
|
21
24
|
constructor(_options: Prompt.Options);
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve a prod prompt by name
|
|
27
|
+
*
|
|
28
|
+
* @param {Scorecard.PromptGetByNameRequest} request
|
|
29
|
+
* @param {Prompt.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @throws {@link Scorecard.UnauthorizedError}
|
|
32
|
+
* @throws {@link Scorecard.ForbiddenError}
|
|
33
|
+
* @throws {@link Scorecard.NotFoundError}
|
|
34
|
+
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.prompt.getByName({
|
|
38
|
+
* name: "name"
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
getByName(request: Scorecard.PromptGetByNameRequest, requestOptions?: Prompt.RequestOptions): Promise<Scorecard.Prompt>;
|
|
22
42
|
/**
|
|
23
43
|
* Two types of prompts can be created - a root prompt or a child prompt (aka Prompt Version in app).
|
|
24
44
|
*
|
|
@@ -35,7 +55,7 @@ export declare class Prompt {
|
|
|
35
55
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
36
56
|
*
|
|
37
57
|
* @example
|
|
38
|
-
* await
|
|
58
|
+
* await client.prompt.create({
|
|
39
59
|
* promptTemplate: "<system>\nYou are a helpful assistant. Use the provided context to answer the user's query.\n\nContext: {context}\n</system>\n\n<user>\n{user_query}\n</user>",
|
|
40
60
|
* name: "Prompt Name",
|
|
41
61
|
* description: "Description of the prompt",
|
|
@@ -48,7 +68,7 @@ export declare class Prompt {
|
|
|
48
68
|
* })
|
|
49
69
|
*
|
|
50
70
|
* @example
|
|
51
|
-
* await
|
|
71
|
+
* await client.prompt.create({
|
|
52
72
|
* promptTemplate: "<system>\nYou are a helpful assistant. Use the provided context to answer the user's query.\n\nContext: {context}\n</system>\n\n<user>\n{user_query}\n</user>",
|
|
53
73
|
* parentId: "7ac3cbd5-3b99-4e72-97f3-9cd2e749cace",
|
|
54
74
|
* description: "Description of the prompt",
|
|
@@ -74,13 +94,13 @@ export declare class Prompt {
|
|
|
74
94
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
75
95
|
*
|
|
76
96
|
* @example
|
|
77
|
-
* await
|
|
97
|
+
* await client.prompt.get("id")
|
|
78
98
|
*/
|
|
79
99
|
get(id: string, requestOptions?: Prompt.RequestOptions): Promise<Scorecard.Prompt>;
|
|
80
100
|
/**
|
|
81
|
-
* Delete a
|
|
101
|
+
* Delete a scoring config.
|
|
82
102
|
*
|
|
83
|
-
* @param {string} id - The id of the
|
|
103
|
+
* @param {string} id - The id of the scoring config to delete.
|
|
84
104
|
* @param {Prompt.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
105
|
*
|
|
86
106
|
* @throws {@link Scorecard.UnauthorizedError}
|
|
@@ -89,7 +109,7 @@ export declare class Prompt {
|
|
|
89
109
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
90
110
|
*
|
|
91
111
|
* @example
|
|
92
|
-
* await
|
|
112
|
+
* await client.prompt.delete("id")
|
|
93
113
|
*/
|
|
94
114
|
delete(id: string, requestOptions?: Prompt.RequestOptions): Promise<unknown>;
|
|
95
115
|
/**
|
|
@@ -107,26 +127,11 @@ export declare class Prompt {
|
|
|
107
127
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
108
128
|
*
|
|
109
129
|
* @example
|
|
110
|
-
* await
|
|
130
|
+
* await client.prompt.update("id", {
|
|
111
131
|
* isProd: true
|
|
112
132
|
* })
|
|
113
133
|
*/
|
|
114
134
|
update(id: string, request?: Scorecard.PromptUpdateParams, requestOptions?: Prompt.RequestOptions): Promise<Scorecard.Prompt>;
|
|
115
|
-
/**
|
|
116
|
-
* Retrieve a prod prompt by name
|
|
117
|
-
*
|
|
118
|
-
* @param {string} name - Name of the prompt.
|
|
119
|
-
* @param {Prompt.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
|
-
*
|
|
121
|
-
* @throws {@link Scorecard.UnauthorizedError}
|
|
122
|
-
* @throws {@link Scorecard.ForbiddenError}
|
|
123
|
-
* @throws {@link Scorecard.NotFoundError}
|
|
124
|
-
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* await scorecard.prompt.getByName("name")
|
|
128
|
-
*/
|
|
129
|
-
getByName(name: string, requestOptions?: Prompt.RequestOptions): Promise<Scorecard.Prompt>;
|
|
130
135
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
131
136
|
"X-API-Key": string;
|
|
132
137
|
}>;
|