isaacus 0.11.0__py3-none-any.whl → 0.13.0__py3-none-any.whl

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.
Files changed (35) hide show
  1. isaacus/_version.py +1 -1
  2. isaacus/resources/classifications/universal.py +8 -8
  3. isaacus/resources/embeddings.py +24 -24
  4. isaacus/resources/extractions/__init__.py +12 -12
  5. isaacus/resources/extractions/extractions.py +18 -18
  6. isaacus/resources/extractions/qa.py +29 -29
  7. isaacus/resources/rerankings.py +12 -12
  8. isaacus/types/__init__.py +14 -0
  9. isaacus/types/classifications/universal_classification_response.py +22 -22
  10. isaacus/types/classifications/universal_create_params.py +6 -6
  11. isaacus/types/crossreference.py +42 -0
  12. isaacus/types/date.py +70 -0
  13. isaacus/types/document.py +172 -0
  14. isaacus/types/email.py +27 -0
  15. isaacus/types/embedding_create_params.py +11 -11
  16. isaacus/types/embedding_response.py +3 -3
  17. isaacus/types/enrichment_response.py +6 -1404
  18. isaacus/types/external_document.py +101 -0
  19. isaacus/types/extractions/__init__.py +1 -1
  20. isaacus/types/extractions/answer_extraction_response.py +12 -12
  21. isaacus/types/extractions/qa_create_params.py +8 -8
  22. isaacus/types/id_number.py +27 -0
  23. isaacus/types/location.py +53 -0
  24. isaacus/types/person.py +195 -0
  25. isaacus/types/phone_number.py +30 -0
  26. isaacus/types/quote.py +52 -0
  27. isaacus/types/reranking_create_params.py +7 -7
  28. isaacus/types/segment.py +205 -0
  29. isaacus/types/span.py +28 -0
  30. isaacus/types/term.py +59 -0
  31. isaacus/types/website.py +28 -0
  32. {isaacus-0.11.0.dist-info → isaacus-0.13.0.dist-info}/METADATA +1 -1
  33. {isaacus-0.11.0.dist-info → isaacus-0.13.0.dist-info}/RECORD +35 -21
  34. {isaacus-0.11.0.dist-info → isaacus-0.13.0.dist-info}/WHEEL +0 -0
  35. {isaacus-0.11.0.dist-info → isaacus-0.13.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,101 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .span import Span
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["ExternalDocument"]
10
+
11
+
12
+ class ExternalDocument(BaseModel):
13
+ """A document identified within another document."""
14
+
15
+ id: str
16
+ """
17
+ The unique identifier of the external document in the format `exd:{index}` where
18
+ `{index}` is a non-negative incrementing integer starting from zero.
19
+ """
20
+
21
+ name: Span
22
+ """A zero-based, half-open span into the Unicode code point space of input text.
23
+
24
+ All spans are globally laminar and well-nested similar to XML—it is impossible
25
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
26
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
27
+ duplicated.
28
+
29
+ A span cannot be empty and will never start or end at whitespace.
30
+
31
+ Note that, when using programming languages other than Python (which uses
32
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
33
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
34
+ code units instead of Unicode code points).
35
+ """
36
+
37
+ type: Literal["statute", "regulation", "decision", "contract", "other"]
38
+ """
39
+ The type of the external document, being one of `statute`, `regulation`,
40
+ `decision`, `contract`, or `other`.
41
+
42
+ `statute` denotes primary legislation such as acts, bills, codes, and
43
+ constitutions.
44
+
45
+ `regulation` denotes secondary legislation such as rules, statutory instruments,
46
+ and ordinances.
47
+
48
+ `decision` denotes judicial or quasi-judicial decisions such as court judgments,
49
+ judicial opinions, and tribunal rulings.
50
+
51
+ `other` is used for all other types of legal documents that do not fit into any
52
+ of the predefined types.
53
+ """
54
+
55
+ jurisdiction: Optional[str] = None
56
+ """
57
+ A jurisdiction code representing a country (via an initial country code) and,
58
+ optionally, a subdivision within that country (via a subsequent subdivision code
59
+ prefixed by a hyphen).
60
+
61
+ All 249 ISO 3166-1 alpha-2 country codes are representable in addition to
62
+ special `INT` and `EU` codes for international and European Union law,
63
+ respectively.
64
+
65
+ All 5,046 ISO 3166-2 codes are also representable in addition to a special `FED`
66
+ code for federal law.
67
+ """
68
+
69
+ reception: Literal["positive", "mixed", "negative", "neutral"]
70
+ """
71
+ The sentiment of the document towards the external document, being one of
72
+ `positive`, `mixed`, `negative`, or `neutral`.
73
+
74
+ `positive` indicates that the document expresses a favorable view of the
75
+ external document whether by endorsing or approving it.
76
+
77
+ `mixed` indicates that the document expresses both favorable and unfavorable
78
+ views of the external document, for example, by affirming parts of it and
79
+ disapproving others.
80
+
81
+ `negative` indicates that the document expresses an unfavorable view of the
82
+ external document whether by criticizing, repealing, overruling, or explicitly
83
+ contradicting it.
84
+
85
+ `neutral` indicates that the document references the external document without
86
+ expressing any particular sentiment towards it.
87
+ """
88
+
89
+ mentions: List[Span]
90
+ """
91
+ An array of one or more spans within the document's text where the external
92
+ document is mentioned by name, for example, 'the US Constitution' in 'the Second
93
+ Amendment to the US Constitution protects freedom of speech'.
94
+ """
95
+
96
+ pinpoints: List[Span]
97
+ """
98
+ An array of spans within the document's text where specific parts of the
99
+ external document are referenced, for example, 'Section 2' in 'as defined in
100
+ Section 2 of the US Constitution'.
101
+ """
@@ -2,5 +2,5 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from .qa_create_params import QaCreateParams as QaCreateParams
5
+ from .qa_create_params import QACreateParams as QACreateParams
6
6
  from .answer_extraction_response import AnswerExtractionResponse as AnswerExtractionResponse
@@ -10,6 +10,15 @@ __all__ = ["AnswerExtractionResponse", "Extraction", "ExtractionAnswer", "Usage"
10
10
  class ExtractionAnswer(BaseModel):
11
11
  """An answer extracted from a text."""
12
12
 
13
+ text: str
14
+ """The text of the answer."""
15
+
16
+ start: int
17
+ """
18
+ The index of the first character of the answer in the text, starting from `0`
19
+ (and, therefore, ending at the number of characters in the text minus `1`).
20
+ """
21
+
13
22
  end: int
14
23
  """
15
24
  The index of the character immediately after the last character of the answer in
@@ -22,28 +31,19 @@ class ExtractionAnswer(BaseModel):
22
31
  A score between `0` and `1`, inclusive, representing the strength of the answer.
23
32
  """
24
33
 
25
- start: int
26
- """
27
- The index of the first character of the answer in the text, starting from `0`
28
- (and, therefore, ending at the number of characters in the text minus `1`).
29
- """
30
-
31
- text: str
32
- """The text of the answer."""
33
-
34
34
 
35
35
  class Extraction(BaseModel):
36
36
  """The result of extracting answers from a text."""
37
37
 
38
- answers: List[ExtractionAnswer]
39
- """Answers extracted from the text, ordered from highest to lowest score."""
40
-
41
38
  index: int
42
39
  """
43
40
  The index of the text in the input array of texts that this result represents,
44
41
  starting from `0` (and, therefore, ending at the number of texts minus `1`).
45
42
  """
46
43
 
44
+ answers: List[ExtractionAnswer]
45
+ """Answers extracted from the text, ordered from highest to lowest score."""
46
+
47
47
  inextractability_score: float
48
48
  """
49
49
  A score between `0` and `1`, inclusive, representing the likelihood that an
@@ -7,10 +7,10 @@ from typing_extensions import Literal, Required, TypedDict
7
7
 
8
8
  from ..._types import SequenceNotStr
9
9
 
10
- __all__ = ["QaCreateParams", "ChunkingOptions"]
10
+ __all__ = ["QACreateParams", "ChunkingOptions"]
11
11
 
12
12
 
13
- class QaCreateParams(TypedDict, total=False):
13
+ class QACreateParams(TypedDict, total=False):
14
14
  model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
15
15
  """
16
16
  The ID of the
@@ -35,9 +35,6 @@ class QaCreateParams(TypedDict, total=False):
35
35
  Each text must contain at least one non-whitespace character.
36
36
  """
37
37
 
38
- chunking_options: Optional[ChunkingOptions]
39
- """Options for how to split text into smaller chunks."""
40
-
41
38
  ignore_inextractability: bool
42
39
  """
43
40
  Whether to, if the model's score of the likelihood that an answer can not be
@@ -55,15 +52,18 @@ class QaCreateParams(TypedDict, total=False):
55
52
  If `null`, which is the default, all answers will be returned.
56
53
  """
57
54
 
55
+ chunking_options: Optional[ChunkingOptions]
56
+ """Options for how to split text into smaller chunks."""
57
+
58
58
 
59
59
  class ChunkingOptions(TypedDict, total=False):
60
60
  """Options for how to split text into smaller chunks."""
61
61
 
62
+ size: Optional[int]
63
+ """A whole number greater than or equal to 1."""
64
+
62
65
  overlap_ratio: Optional[float]
63
66
  """A number greater than or equal to 0 and less than 1."""
64
67
 
65
68
  overlap_tokens: Optional[int]
66
69
  """A whole number greater than or equal to 0."""
67
-
68
- size: Optional[int]
69
- """A whole number greater than or equal to 1."""
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .span import Span
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["IDNumber"]
9
+
10
+
11
+ class IDNumber(BaseModel):
12
+ """An identification number mentioned in a document belonging to a legal person.
13
+
14
+ If an identification number was mentioned in the document but is not attributable to a legal person, it will not be extracted.
15
+ """
16
+
17
+ number: str
18
+ """The identification number."""
19
+
20
+ person: str
21
+ """The unique identifier of the person that this identification number belongs to."""
22
+
23
+ mentions: List[Span]
24
+ """
25
+ An array of one or more spans within the document's text where the
26
+ identification number is mentioned.
27
+ """
@@ -0,0 +1,53 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .span import Span
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["Location"]
10
+
11
+
12
+ class Location(BaseModel):
13
+ """A location identified within a document."""
14
+
15
+ id: str
16
+ """
17
+ The unique identifier of the location in the format `loc:{index}` where
18
+ `{index}` is a non-negative incrementing integer starting from zero.
19
+ """
20
+
21
+ name: Span
22
+ """A zero-based, half-open span into the Unicode code point space of input text.
23
+
24
+ All spans are globally laminar and well-nested similar to XML—it is impossible
25
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
26
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
27
+ duplicated.
28
+
29
+ A span cannot be empty and will never start or end at whitespace.
30
+
31
+ Note that, when using programming languages other than Python (which uses
32
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
33
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
34
+ code units instead of Unicode code points).
35
+ """
36
+
37
+ type: Literal["country", "state", "city", "address", "other"]
38
+ """
39
+ The type of the location, being one of `country`, `state`, `city`, `address`, or
40
+ `other`.
41
+ """
42
+
43
+ parent: Optional[str] = None
44
+ """
45
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
46
+ is a non-negative incrementing integer starting from zero.
47
+ """
48
+
49
+ mentions: List[Span]
50
+ """
51
+ An array of one or more spans within the document's text where the location is
52
+ mentioned.
53
+ """
@@ -0,0 +1,195 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .span import Span
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["Person"]
10
+
11
+
12
+ class Person(BaseModel):
13
+ """A legal person identified in a document."""
14
+
15
+ id: str
16
+ """
17
+ The unique identifier of the person in the format `per:{index}` where `{index}`
18
+ is a non-negative incrementing integer starting from zero.
19
+ """
20
+
21
+ name: Span
22
+ """A zero-based, half-open span into the Unicode code point space of input text.
23
+
24
+ All spans are globally laminar and well-nested similar to XML—it is impossible
25
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
26
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
27
+ duplicated.
28
+
29
+ A span cannot be empty and will never start or end at whitespace.
30
+
31
+ Note that, when using programming languages other than Python (which uses
32
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
33
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
34
+ code units instead of Unicode code points).
35
+ """
36
+
37
+ type: Literal["natural", "corporate", "politic"]
38
+ """
39
+ The legal entity type of the person, being one of `natural`, `corporate`, or
40
+ `politic`.
41
+
42
+ `natural` denotes a human being in their capacity as a natural legal person,
43
+ including when representing unincorporated entities such as partnerships and
44
+ trusts.
45
+
46
+ `corporate` denotes a body corporate such as a company, incorporated
47
+ partnership, or statutory corporation.
48
+
49
+ `politic` denotes a body politic such as a court, state, government, or
50
+ intergovernmental organization.
51
+ """
52
+
53
+ role: Literal[
54
+ "plaintiff",
55
+ "petitioner",
56
+ "applicant",
57
+ "appellant",
58
+ "appellee",
59
+ "claimant",
60
+ "complainant",
61
+ "defendant",
62
+ "respondent",
63
+ "prior_authority",
64
+ "prosecutor",
65
+ "defense_counsel",
66
+ "amicus",
67
+ "intervener",
68
+ "borrower",
69
+ "lender",
70
+ "guarantor",
71
+ "lessee",
72
+ "lessor",
73
+ "employer",
74
+ "employee",
75
+ "licensor",
76
+ "licensee",
77
+ "franchisor",
78
+ "franchisee",
79
+ "buyer",
80
+ "seller",
81
+ "contractor",
82
+ "shareholder",
83
+ "joint_venturer",
84
+ "investor",
85
+ "insurer",
86
+ "insured",
87
+ "enacting_authority",
88
+ "empowered_authority",
89
+ "settlor",
90
+ "trustee",
91
+ "beneficiary",
92
+ "debater",
93
+ "director",
94
+ "governing_jurisdiction",
95
+ "clerk",
96
+ "witness",
97
+ "other",
98
+ "non_party",
99
+ ]
100
+ """The role of the person in relation to the subject of the document.
101
+
102
+ The following roles are currently supported: | | | | ------------------------ |
103
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
104
+ | | `plaintiff` | A party initiating the case that is the subject of the
105
+ document. | | `petitioner` | A party initiating the petition that is the subject
106
+ of the document. | | `applicant` | A party initiating the application that is
107
+ the subject of the document. | | `appellant` | A party appealing the decision
108
+ that is the subject of the document. | | `appellee` | A party responding to the
109
+ appeal that is the subject of the document if they are explicitly referred to as
110
+ an 'appellee'. | | `claimant` | A party making a claim in the case that is the
111
+ subject of the document. | | `complainant` | A party making a complaint in the
112
+ case that is the subject of the document. | | `defendant` | A party defending
113
+ against the case that is the subject of the document. | | `respondent` | A party
114
+ responding to the petition, appeal, or application that is the subject of the
115
+ document. | | `prior_authority` | An authority (e.g., judge, tribunal, court)
116
+ that made a prior decision in the case that is the subject of the document. Both
117
+ individual judges and courts should be annotated with this role where
118
+ applicable. This is not to be used for authorities cited as precedent, only for
119
+ those that made prior decisions in the same case. | | `prosecutor` | A lawyer
120
+ prosecuting the case that is the subject of the document. | | `defense_counsel`
121
+ | A lawyer defending the case that is the subject of the document. | | `amicus`
122
+ | A party filing an amicus curiae brief in the case that is the subject of the
123
+ document. | | `intervener` | A party attempting to or that has intervened in the
124
+ case that is the subject of the document. | | `borrower` | A party borrowing
125
+ money or other assets under the agreement that is the subject of the document,
126
+ including 'mortgagors' and 'debtors'. | | `lender` | A party lending money or
127
+ other assets under the agreement that is the subject of the document, including
128
+ 'mortgagees' and 'creditors'. | | `guarantor` | A party guaranteeing obligations
129
+ under the agreement that is the subject of the document, including 'sureties'. |
130
+ | `lessee` | A party leasing goods or services under the agreement that is the
131
+ subject of the document, including 'tenants'. | | `lessor` | A party leasing
132
+ goods or services under the agreement that is the subject of the document,
133
+ including 'landlords'. | | `employer` | A party employing personnel under the
134
+ agreement that is the subject of the document. | | `employee` | A party employed
135
+ under the agreement that is the subject of the document. | | `licensor` | A
136
+ party licensing intellectual property or other rights under the agreement that
137
+ are the subject of the document. | | `licensee` | A party licensed to use
138
+ intellectual property or other rights under the agreement that are the subject
139
+ of the document. | | `franchisor` | A party granting a franchise under the
140
+ agreement that is the subject of the document. | | `franchisee` | A party
141
+ granted a franchise under the agreement that is the subject of the document. | |
142
+ `buyer` | A party purchasing goods or services under the agreement that is the
143
+ subject of the document, including 'purchasers', 'customers', and 'clients'. | |
144
+ `seller` | A party selling or providing goods or services under the agreement
145
+ that is the subject of the document, including 'Vendors', 'Suppliers', and
146
+ 'Service Providers' (where such parties are actually providing goods or services
147
+ under the agreement). | | `contractor` | A party contracted to perform work or
148
+ services under the agreement that is the subject of the document, including
149
+ 'consultants'. | | `shareholder` | A party holding shares or equity under the
150
+ agreement that is the subject of the document. | | `joint_venturer` | A party
151
+ participating in a joint venture under the agreement that is the subject of the
152
+ document. | | `investor` | A party investing money or assets under the agreement
153
+ that is the subject of the document. | | `insurer` | A party providing insurance
154
+ under the agreement that is the subject of the document. | | `insured` | A party
155
+ insured under the agreement that is the subject of the document. | | `settlor` |
156
+ A party establishing the trust that is the subject of the document. | |
157
+ `trustee` | A party managing the trust that is the subject of the document. | |
158
+ `beneficiary` | A party benefiting from the trust that is the subject of the
159
+ document. | | `enacting_authority` | An authority (e.g., legislature, regulator,
160
+ Minister/Secretary, President/Prime Minister, tribunal, court, judge) giving
161
+ legal effect to or authorizing the document. All relevant individuals and bodies
162
+ should be annotated with this role where applicable. | | `empowered_authority` |
163
+ An authority (e.g., government agency, regulator, Minister/Secretary,
164
+ President/Prime Minister, tribunal, court) empowered by the document to carry
165
+ out functions or duties. | | `debater` | A person participating in the debate
166
+ that is the subject of the document. | | `governing_jurisdiction` | The
167
+ jurisdiction whose laws govern the document. | | `director` | A director or
168
+ other officer of a corporate legal person mentioned in the document. | | `clerk`
169
+ | A clerk, notary, or other official certifying, witnessing, filing, recording,
170
+ registering, or otherwise administering the document. | | `witness` | A witness
171
+ witnessing the signing of the document, or whose testimony is part of the case
172
+ that is the subject of the document. | | `other` | A party to the case,
173
+ agreement, legislation, or regulation that is the subject of the document that
174
+ does not fit into any of the other roles. | | `non_party` | A legal person
175
+ mentioned in the document that is not a party to the case, agreement,
176
+ legislation, or regulation that is the subject of the document. |
177
+ """
178
+
179
+ parent: Optional[str] = None
180
+ """
181
+ A unique identifier for a legal person in the format `per:{index}` where
182
+ `{index}` is a non-negative incrementing integer starting from zero.
183
+ """
184
+
185
+ residence: Optional[str] = None
186
+ """
187
+ A unique identifier for a location in the format `loc:{index}` where `{index}`
188
+ is a non-negative incrementing integer starting from zero.
189
+ """
190
+
191
+ mentions: List[Span]
192
+ """
193
+ An array of one or more spans within the document's text where the person is
194
+ mentioned.
195
+ """
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .span import Span
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["PhoneNumber"]
9
+
10
+
11
+ class PhoneNumber(BaseModel):
12
+ """A valid phone number identified in a document belonging to a legal person.
13
+
14
+ If a phone number was mentioned in the document but is not valid, possible, or attributable to a legal person, it will not be extracted.
15
+ """
16
+
17
+ number: str
18
+ """
19
+ The normalized phone number in E.123 international notation conforming with
20
+ local conventions on the use of spaces and hyphens as separators.
21
+ """
22
+
23
+ person: str
24
+ """The unique identifier of the person that this phone number belongs to."""
25
+
26
+ mentions: List[Span]
27
+ """
28
+ An array of one or more spans within the document's text where the phone number
29
+ is mentioned.
30
+ """
isaacus/types/quote.py ADDED
@@ -0,0 +1,52 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .span import Span
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["Quote"]
9
+
10
+
11
+ class Quote(BaseModel):
12
+ """A quotation within a document."""
13
+
14
+ source_segment: Optional[str] = None
15
+ """
16
+ A unique identifier for a segment in the format `seg:{index}` where `{index}` is
17
+ a non-negative incrementing integer starting from zero.
18
+ """
19
+
20
+ source_document: Optional[str] = None
21
+ """
22
+ A unique identifier for an external document in the format `exd:{index}` where
23
+ `{index}` is a non-negative incrementing integer starting from zero.
24
+ """
25
+
26
+ source_person: Optional[str] = None
27
+ """
28
+ A unique identifier for a legal person in the format `per:{index}` where
29
+ `{index}` is a non-negative incrementing integer starting from zero.
30
+ """
31
+
32
+ amending: bool
33
+ """
34
+ Whether the quote is being used to amend or modify content, typically in other
35
+ documents.
36
+ """
37
+
38
+ span: Span
39
+ """A zero-based, half-open span into the Unicode code point space of input text.
40
+
41
+ All spans are globally laminar and well-nested similar to XML—it is impossible
42
+ for any two spans to partially overlap; they can only be disjoint, adjacent, or
43
+ wholly nested. Spans of the exact same type (e.g., segments) will never be
44
+ duplicated.
45
+
46
+ A span cannot be empty and will never start or end at whitespace.
47
+
48
+ Note that, when using programming languages other than Python (which uses
49
+ zero-based, half-open, Unicode code point-spaced string indexing), indices may
50
+ need to be translated accordingly (for example, JavaScript slices into UTF-16
51
+ code units instead of Unicode code points).
52
+ """
@@ -34,8 +34,8 @@ class RerankingCreateParams(TypedDict, total=False):
34
34
  Each text must contain at least one non-whitespace character.
35
35
  """
36
36
 
37
- chunking_options: Optional[ChunkingOptions]
38
- """Options for how to split text into smaller chunks."""
37
+ top_n: Optional[int]
38
+ """A whole number greater than or equal to 1."""
39
39
 
40
40
  is_iql: bool
41
41
  """
@@ -62,18 +62,18 @@ class RerankingCreateParams(TypedDict, total=False):
62
62
  `chunk_min` uses the lowest relevance score of all of a text's chunks.
63
63
  """
64
64
 
65
- top_n: Optional[int]
66
- """A whole number greater than or equal to 1."""
65
+ chunking_options: Optional[ChunkingOptions]
66
+ """Options for how to split text into smaller chunks."""
67
67
 
68
68
 
69
69
  class ChunkingOptions(TypedDict, total=False):
70
70
  """Options for how to split text into smaller chunks."""
71
71
 
72
+ size: Optional[int]
73
+ """A whole number greater than or equal to 1."""
74
+
72
75
  overlap_ratio: Optional[float]
73
76
  """A number greater than or equal to 0 and less than 1."""
74
77
 
75
78
  overlap_tokens: Optional[int]
76
79
  """A whole number greater than or equal to 0."""
77
-
78
- size: Optional[int]
79
- """A whole number greater than or equal to 1."""