feat: DIA-1360: Add token cost KPI to the Prompt aggregate-level subset metrics #300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @niklub!
This PR was automaticaly generated via Follow Merge.
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.
Summary:
This PR adds handling for batch failed predictions and includes token cost metrics in batch predictions, updating types, methods, and tests accordingly.
Key points:
PromptsBatchFailedPredictionsRequestFailedPredictionsItem
andPromptsBatchFailedPredictionsResponse
types insrc/label_studio_sdk/prompts/types/
.batch_failed_predictions
method insrc/label_studio_sdk/prompts/client.py
for handling failed predictions.batch_predictions
method to include token cost metrics insrc/label_studio_sdk/prompts/client.py
.PromptsBatchPredictionsRequestResultsItem
to include token and cost fields.tests/test_prompts.py
to cover new methods and fields.Generated with ❤️ by ellipsis.dev