scorecard-ai 0.5.3 → 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/run/client/requests/RunCreateParams.d.ts +1 -0
- 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/score/client/requests/ScoreCreateParams.d.ts +3 -0
- package/api/resources/score/client/requests/ScoreUpdateParams.d.ts +3 -0
- 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/TestcaseCreateParams.d.ts +2 -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 +9 -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 +8 -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/Grade.d.ts +11 -0
- package/api/types/IngestionMethod.d.ts +8 -0
- package/api/types/IngestionMethod.js +10 -0
- package/api/types/PaginatedTestcaseResponse.d.ts +2 -0
- package/api/types/Prompt.d.ts +2 -0
- package/api/types/Run.d.ts +14 -0
- package/api/types/ScoringConfig.d.ts +16 -0
- package/api/types/ScoringConfig.js +5 -0
- package/api/types/TestCase.d.ts +4 -0
- package/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
- package/api/types/TestcaseBatchDeletionResponse.js +5 -0
- package/api/types/Testrecord.d.ts +14 -0
- package/api/types/Testset.d.ts +11 -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/run/client/requests/RunCreateParams.d.ts +1 -0
- 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/score/client/requests/ScoreCreateParams.d.ts +3 -0
- package/dist/api/resources/score/client/requests/ScoreUpdateParams.d.ts +3 -0
- 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/TestcaseCreateParams.d.ts +2 -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 +9 -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 +8 -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/Grade.d.ts +11 -0
- package/dist/api/types/IngestionMethod.d.ts +8 -0
- package/dist/api/types/IngestionMethod.js +10 -0
- package/dist/api/types/PaginatedTestcaseResponse.d.ts +2 -0
- package/dist/api/types/Prompt.d.ts +2 -0
- package/dist/api/types/Run.d.ts +14 -0
- package/dist/api/types/ScoringConfig.d.ts +16 -0
- package/dist/api/types/ScoringConfig.js +5 -0
- package/dist/api/types/TestCase.d.ts +4 -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 +14 -0
- package/dist/api/types/Testset.d.ts +11 -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/dist/telemetry.d.ts +0 -5
- package/dist/telemetry.js +25 -7
- package/dist/wrapper/ScorecardClient.d.ts +3 -0
- package/dist/wrapper/ScorecardClient.js +11 -0
- package/package.json +13 -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/telemetry.d.ts +0 -5
- package/telemetry.js +25 -7
- package/wrapper/ScorecardClient.d.ts +3 -0
- package/wrapper/ScorecardClient.js +11 -0
- 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/telemetry.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
declare const trace: any;
|
|
2
|
-
declare const OTLPTraceExporter: any;
|
|
3
|
-
declare const Resource: any;
|
|
4
|
-
declare const BatchSpanProcessor: any, ConsoleSpanExporter: any, NodeTracerProvider: any;
|
|
5
|
-
declare const SEMRESATTRS_SERVICE_NAME: any;
|
|
6
1
|
declare function checkInstalled(...modules: string[]): boolean;
|
package/telemetry.js
CHANGED
|
@@ -8,11 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
const { trace } = require('@opentelemetry/api');
|
|
12
|
-
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
|
|
13
|
-
const { Resource } = require('@opentelemetry/resources');
|
|
14
|
-
const { BatchSpanProcessor, ConsoleSpanExporter, NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
|
|
15
|
-
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
|
|
16
11
|
function checkInstalled(...modules) {
|
|
17
12
|
for (let i = 0; i < modules.length; i++) {
|
|
18
13
|
let module = modules[i];
|
|
@@ -27,6 +22,23 @@ function checkInstalled(...modules) {
|
|
|
27
22
|
}
|
|
28
23
|
module.exports = {
|
|
29
24
|
setup(name, scorecardConfig, debug = false) {
|
|
25
|
+
const required = [
|
|
26
|
+
'@opentelemetry/api',
|
|
27
|
+
'@opentelemetry/core',
|
|
28
|
+
'@opentelemetry/exporter-trace-otlp-http',
|
|
29
|
+
'@opentelemetry/resources',
|
|
30
|
+
'@opentelemetry/sdk-trace-node',
|
|
31
|
+
'@opentelemetry/semantic-conventions'
|
|
32
|
+
];
|
|
33
|
+
if (!checkInstalled(...required)) {
|
|
34
|
+
throw new Error(`Required OpenTelemetry packages not installed. Please ensure that all necessary peerDependencies are installed:\n${required.map(module => `- ${module}`).join('\n')}`);
|
|
35
|
+
}
|
|
36
|
+
const { propagation, trace } = require('@opentelemetry/api');
|
|
37
|
+
const { CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator } = require('@opentelemetry/core');
|
|
38
|
+
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
|
|
39
|
+
const { Resource } = require('@opentelemetry/resources');
|
|
40
|
+
const { BatchSpanProcessor, ConsoleSpanExporter, NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
|
|
41
|
+
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
|
|
30
42
|
const resource = Resource.default().merge(new Resource({
|
|
31
43
|
[SEMRESATTRS_SERVICE_NAME]: name,
|
|
32
44
|
}));
|
|
@@ -38,6 +50,12 @@ module.exports = {
|
|
|
38
50
|
const processor = new BatchSpanProcessor(consoleExporter);
|
|
39
51
|
provider.addSpanProcessor(processor);
|
|
40
52
|
}
|
|
53
|
+
propagation.setGlobalPropagator(new CompositePropagator({
|
|
54
|
+
propagators: [
|
|
55
|
+
new W3CTraceContextPropagator(),
|
|
56
|
+
new W3CBaggagePropagator()
|
|
57
|
+
]
|
|
58
|
+
}));
|
|
41
59
|
const url = scorecardConfig.telemetryUrl ? scorecardConfig.telemetryUrl : 'https://telemetry.getscorecard.ai';
|
|
42
60
|
const otlpExporter = new OTLPTraceExporter({
|
|
43
61
|
url: `${url}/v1/traces`,
|
|
@@ -48,11 +66,11 @@ module.exports = {
|
|
|
48
66
|
const processor = new BatchSpanProcessor(otlpExporter);
|
|
49
67
|
provider.addSpanProcessor(processor);
|
|
50
68
|
provider.register();
|
|
51
|
-
if (checkInstalled('@langchain/core')) {
|
|
69
|
+
if (checkInstalled('@langchain/core', '@arizeai/openinference-instrumentation-langchain', '@opentelemetry/instrumentation')) {
|
|
52
70
|
const { LangChainInstrumentation } = require('@arizeai/openinference-instrumentation-langchain');
|
|
53
71
|
new LangChainInstrumentation().manuallyInstrument(require('@langchain/core/callbacks/manager'));
|
|
54
72
|
}
|
|
55
|
-
if (checkInstalled('openai')) {
|
|
73
|
+
if (checkInstalled('openai', '@arizeai/openinference-instrumentation-openai', '@opentelemetry/instrumentation')) {
|
|
56
74
|
const { OpenAIInstrumentation } = require('@arizeai/openinference-instrumentation-openai');
|
|
57
75
|
new OpenAIInstrumentation().manuallyInstrument(require('openai'));
|
|
58
76
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ScorecardClient as FernClient } from "../Client";
|
|
2
2
|
export declare namespace ScorecardClient {
|
|
3
|
+
interface Options extends Omit<FernClient.Options, "fetcher"> {
|
|
4
|
+
}
|
|
3
5
|
interface RequestOptions extends FernClient.RequestOptions {
|
|
4
6
|
}
|
|
5
7
|
interface RunTestArgs {
|
|
@@ -18,6 +20,7 @@ export declare namespace ScorecardClient {
|
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
export declare class ScorecardClient extends FernClient {
|
|
23
|
+
constructor(options: ScorecardClient.Options);
|
|
21
24
|
/**
|
|
22
25
|
* Runs all tests within a testset
|
|
23
26
|
*/
|
|
@@ -33,9 +33,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.ScorecardClient = void 0;
|
|
36
|
+
const api_1 = require("@opentelemetry/api");
|
|
36
37
|
const Client_1 = require("../Client");
|
|
38
|
+
const core_1 = require("../core");
|
|
37
39
|
const errors = __importStar(require("../errors"));
|
|
38
40
|
class ScorecardClient extends Client_1.ScorecardClient {
|
|
41
|
+
constructor(options) {
|
|
42
|
+
const fetcher = (args) => {
|
|
43
|
+
var _a;
|
|
44
|
+
args.headers = (_a = args.headers) !== null && _a !== void 0 ? _a : {};
|
|
45
|
+
api_1.propagation.inject(api_1.context.active(), args.headers);
|
|
46
|
+
return (0, core_1.fetcher)(args);
|
|
47
|
+
};
|
|
48
|
+
super(Object.assign(Object.assign({}, options), { fetcher }));
|
|
49
|
+
}
|
|
39
50
|
/**
|
|
40
51
|
* Runs all tests within a testset
|
|
41
52
|
*/
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../environments";
|
|
5
|
-
import * as core from "../../../../core";
|
|
6
|
-
import * as Scorecard from "../../../index";
|
|
7
|
-
export declare namespace Traces {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.ScorecardEnvironment | string>;
|
|
10
|
-
apiKey: core.Supplier<string>;
|
|
11
|
-
fetcher?: core.FetchFunction;
|
|
12
|
-
}
|
|
13
|
-
interface RequestOptions {
|
|
14
|
-
timeoutInSeconds?: number;
|
|
15
|
-
maxRetries?: number;
|
|
16
|
-
abortSignal?: AbortSignal;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export declare class Traces {
|
|
20
|
-
protected readonly _options: Traces.Options;
|
|
21
|
-
constructor(_options: Traces.Options);
|
|
22
|
-
/**
|
|
23
|
-
* Retrieve trace spans
|
|
24
|
-
*
|
|
25
|
-
* @param {string} traceId - The ID of the trace to retrieve spans from.
|
|
26
|
-
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
-
*
|
|
28
|
-
* @throws {@link Scorecard.UnauthorizedError}
|
|
29
|
-
* @throws {@link Scorecard.ForbiddenError}
|
|
30
|
-
* @throws {@link Scorecard.NotFoundError}
|
|
31
|
-
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* await scorecard.traces.get("trace_id")
|
|
35
|
-
*/
|
|
36
|
-
get(traceId: string, requestOptions?: Traces.RequestOptions): Promise<Scorecard.Span[]>;
|
|
37
|
-
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
38
|
-
"X-API-Key": string;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../environments";
|
|
5
|
-
import * as core from "../../../../core";
|
|
6
|
-
import * as Scorecard from "../../../index";
|
|
7
|
-
export declare namespace Traces {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.ScorecardEnvironment | string>;
|
|
10
|
-
apiKey: core.Supplier<string>;
|
|
11
|
-
fetcher?: core.FetchFunction;
|
|
12
|
-
}
|
|
13
|
-
interface RequestOptions {
|
|
14
|
-
timeoutInSeconds?: number;
|
|
15
|
-
maxRetries?: number;
|
|
16
|
-
abortSignal?: AbortSignal;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export declare class Traces {
|
|
20
|
-
protected readonly _options: Traces.Options;
|
|
21
|
-
constructor(_options: Traces.Options);
|
|
22
|
-
/**
|
|
23
|
-
* Retrieve trace spans
|
|
24
|
-
*
|
|
25
|
-
* @param {string} traceId - The ID of the trace to retrieve spans from.
|
|
26
|
-
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
-
*
|
|
28
|
-
* @throws {@link Scorecard.UnauthorizedError}
|
|
29
|
-
* @throws {@link Scorecard.ForbiddenError}
|
|
30
|
-
* @throws {@link Scorecard.NotFoundError}
|
|
31
|
-
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* await scorecard.traces.get("trace_id")
|
|
35
|
-
*/
|
|
36
|
-
get(traceId: string, requestOptions?: Traces.RequestOptions): Promise<Scorecard.Span[]>;
|
|
37
|
-
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
38
|
-
"X-API-Key": string;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as get from "./get";
|
|
@@ -1,16 +0,0 @@
|
|
|
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 TestCaseCreate: core.serialization.ObjectSchema<serializers.TestCaseCreate.Raw, Scorecard.TestCaseCreate>;
|
|
8
|
-
export declare namespace TestCaseCreate {
|
|
9
|
-
interface Raw {
|
|
10
|
-
testset_id: number;
|
|
11
|
-
user_query: string;
|
|
12
|
-
context?: string | null;
|
|
13
|
-
response?: string | null;
|
|
14
|
-
ideal?: string | null;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as get from "./get";
|
|
@@ -1,16 +0,0 @@
|
|
|
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 TestCaseCreate: core.serialization.ObjectSchema<serializers.TestCaseCreate.Raw, Scorecard.TestCaseCreate>;
|
|
8
|
-
export declare namespace TestCaseCreate {
|
|
9
|
-
interface Raw {
|
|
10
|
-
testset_id: number;
|
|
11
|
-
user_query: string;
|
|
12
|
-
context?: string | null;
|
|
13
|
-
response?: string | null;
|
|
14
|
-
ideal?: string | null;
|
|
15
|
-
}
|
|
16
|
-
}
|
/package/api/{types/TestCaseCreate.js → resources/prompt/client/requests/PromptGetByNameRequest.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|