Skip to content

Commit 0c4e7d4

Browse files
chore: add missing docstrings
1 parent b89d4ce commit 0c4e7d4

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

src/isaacus/types/classifications/universal_classification_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,17 @@ class Classification(BaseModel):
6868

6969

7070
class Usage(BaseModel):
71+
"""Statistics about the usage of resources in the process of classifying the text."""
72+
7173
input_tokens: int
7274
"""The number of tokens inputted to the model."""
7375

7476

7577
class UniversalClassificationResponse(BaseModel):
78+
"""
79+
Classifications of the relevance of legal documents to a query produced by an Isaacus universal legal AI classifier.
80+
"""
81+
7682
classifications: List[Classification]
7783
"""
7884
The classifications of the texts, by relevance to the query, in order from

src/isaacus/types/classifications/universal_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class UniversalCreateParams(TypedDict, total=False):
5959

6060

6161
class ChunkingOptions(TypedDict, total=False):
62+
"""Options for how to split text into smaller chunks."""
63+
6264
overlap_ratio: Optional[float]
6365
"""A number greater than or equal to 0 and less than 1."""
6466

src/isaacus/types/embedding_response.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ class Embedding(BaseModel):
1919

2020

2121
class Usage(BaseModel):
22+
"""Statistics about the usage of resources in the process of embedding the inputs."""
23+
2224
input_tokens: int
2325
"""The number of tokens inputted to the model."""
2426

2527

2628
class EmbeddingResponse(BaseModel):
29+
"""Embeddings of legal texts produced by an Isaacus legal AI embedder."""
30+
2731
embeddings: List[Embedding]
2832
"""The embeddings of the inputs."""
2933

src/isaacus/types/extractions/answer_extraction_response.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class ExtractionAnswer(BaseModel):
11+
"""An answer extracted from a text."""
12+
1113
end: int
1214
"""
1315
The index of the character immediately after the last character of the answer in
@@ -31,6 +33,8 @@ class ExtractionAnswer(BaseModel):
3133

3234

3335
class Extraction(BaseModel):
36+
"""The result of extracting answers from a text."""
37+
3438
answers: List[ExtractionAnswer]
3539
"""Answers extracted from the text, ordered from highest to lowest score."""
3640

@@ -53,11 +57,17 @@ class Extraction(BaseModel):
5357

5458

5559
class Usage(BaseModel):
60+
"""
61+
Statistics about the usage of resources in the process of extracting answers from the texts.
62+
"""
63+
5664
input_tokens: int
5765
"""The number of tokens inputted to the model."""
5866

5967

6068
class AnswerExtractionResponse(BaseModel):
69+
"""The results of extracting answers from texts."""
70+
6171
extractions: List[Extraction]
6272
"""
6373
The results of extracting answers from the texts, ordered from highest to lowest

src/isaacus/types/extractions/qa_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class QaCreateParams(TypedDict, total=False):
5757

5858

5959
class ChunkingOptions(TypedDict, total=False):
60+
"""Options for how to split text into smaller chunks."""
61+
6062
overlap_ratio: Optional[float]
6163
"""A number greater than or equal to 0 and less than 1."""
6264

src/isaacus/types/reranking_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class RerankingCreateParams(TypedDict, total=False):
6767

6868

6969
class ChunkingOptions(TypedDict, total=False):
70+
"""Options for how to split text into smaller chunks."""
71+
7072
overlap_ratio: Optional[float]
7173
"""A number greater than or equal to 0 and less than 1."""
7274

src/isaacus/types/reranking_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ class Result(BaseModel):
2222

2323

2424
class Usage(BaseModel):
25+
"""Statistics about the usage of resources in the process of reranking the texts."""
26+
2527
input_tokens: int
2628
"""The number of tokens inputted to the model."""
2729

2830

2931
class RerankingResponse(BaseModel):
32+
"""
33+
The reranking of texts, by relevance to a query, out of an input array of texts.
34+
"""
35+
3036
results: List[Result]
3137
"""
3238
The rerankings of the texts, by relevance to the query, in order from highest to

0 commit comments

Comments
 (0)