Skip to content

Commit c9999cd

Browse files
feat(api)!: started sorting chunks by score and added index field (#45)
1 parent 8384fd4 commit c9999cd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-ec269bff43481aeb5c72d3074aa31815ef915d435e78bc62b0290437a7b2992a.yml
3-
openapi_spec_hash: 8471a8ba4cb4ccf1a7724d65b57eb029
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-435aa8d67bf720d46273e05839fecdc34ae2968b1bd3c35c33a42f144f9e5395.yml
3+
openapi_spec_hash: 55f30f53ce7ef4f7481444a635e9ab8a
44
config_hash: 8a781867f31df68b9c6fba04c165c647

src/isaacus/types/classifications/universal_classification.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class Chunk(BaseModel):
1111
end: int
1212
"""The end index of the chunk in the original text."""
1313

14+
index: int
15+
"""The index of the chunk in the list of chunks."""
16+
1417
score: float
1518
"""
1619
The model's score of the likelihood that the query expressed about the chunk is
@@ -37,7 +40,7 @@ class UniversalClassification(BaseModel):
3740
"""
3841
The text as broken into chunks by
3942
[semchunk](https://github.com/isaacus-dev/semchunk), each chunk with its own
40-
confidence score.
43+
confidence score, ordered from highest to lowest score.
4144
4245
If no chunking occurred, this will be `null`.
4346
"""

0 commit comments

Comments
 (0)