isaacus 0.10.1__py3-none-any.whl → 0.12.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 (38) 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/enrichments.py +2 -2
  5. isaacus/resources/extractions/__init__.py +12 -12
  6. isaacus/resources/extractions/extractions.py +18 -18
  7. isaacus/resources/extractions/qa.py +29 -29
  8. isaacus/resources/rerankings.py +12 -12
  9. isaacus/types/__init__.py +14 -0
  10. isaacus/types/classifications/universal_classification_response.py +22 -22
  11. isaacus/types/classifications/universal_create_params.py +6 -6
  12. isaacus/types/embedding_create_params.py +11 -11
  13. isaacus/types/embedding_response.py +3 -3
  14. isaacus/types/enrichment_create_params.py +1 -1
  15. isaacus/types/enrichment_response.py +6 -1404
  16. isaacus/types/extractions/__init__.py +1 -1
  17. isaacus/types/extractions/answer_extraction_response.py +12 -12
  18. isaacus/types/extractions/qa_create_params.py +8 -8
  19. isaacus/types/ilgs_v1_crossreference.py +42 -0
  20. isaacus/types/ilgs_v1_date.py +70 -0
  21. isaacus/types/ilgs_v1_document.py +172 -0
  22. isaacus/types/ilgs_v1_email.py +27 -0
  23. isaacus/types/ilgs_v1_external_document.py +101 -0
  24. isaacus/types/ilgs_v1_id_number.py +27 -0
  25. isaacus/types/ilgs_v1_location.py +53 -0
  26. isaacus/types/ilgs_v1_person.py +195 -0
  27. isaacus/types/ilgs_v1_phone_number.py +30 -0
  28. isaacus/types/ilgs_v1_quote.py +52 -0
  29. isaacus/types/ilgs_v1_segment.py +205 -0
  30. isaacus/types/ilgs_v1_span.py +28 -0
  31. isaacus/types/ilgs_v1_term.py +59 -0
  32. isaacus/types/ilgs_v1_website.py +28 -0
  33. isaacus/types/reranking_create_params.py +7 -7
  34. {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/METADATA +1 -1
  35. isaacus-0.12.0.dist-info/RECORD +70 -0
  36. isaacus-0.10.1.dist-info/RECORD +0 -56
  37. {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/WHEEL +0 -0
  38. {isaacus-0.10.1.dist-info → isaacus-0.12.0.dist-info}/licenses/LICENSE +0 -0
isaacus/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "isaacus"
4
- __version__ = "0.10.1" # x-release-please-version
4
+ __version__ = "0.12.0" # x-release-please-version
@@ -50,9 +50,9 @@ class UniversalResource(SyncAPIResource):
50
50
  model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
51
51
  query: str,
52
52
  texts: SequenceNotStr[str],
53
- chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
54
53
  is_iql: bool | Omit = omit,
55
54
  scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
55
+ chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
56
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
58
  extra_headers: Headers | None = None,
@@ -80,8 +80,6 @@ class UniversalResource(SyncAPIResource):
80
80
 
81
81
  Each text must contain at least one non-whitespace character.
82
82
 
83
- chunking_options: Options for how to split text into smaller chunks.
84
-
85
83
  is_iql: Whether the query should be interpreted as an
86
84
  [IQL](https://docs.isaacus.com/iql) query or else as a statement.
87
85
 
@@ -97,6 +95,8 @@ class UniversalResource(SyncAPIResource):
97
95
 
98
96
  `chunk_min` uses the lowest confidence score of all of the texts' chunks.
99
97
 
98
+ chunking_options: Options for how to split text into smaller chunks.
99
+
100
100
  extra_headers: Send extra headers
101
101
 
102
102
  extra_query: Add additional query parameters to the request
@@ -112,9 +112,9 @@ class UniversalResource(SyncAPIResource):
112
112
  "model": model,
113
113
  "query": query,
114
114
  "texts": texts,
115
- "chunking_options": chunking_options,
116
115
  "is_iql": is_iql,
117
116
  "scoring_method": scoring_method,
117
+ "chunking_options": chunking_options,
118
118
  },
119
119
  universal_create_params.UniversalCreateParams,
120
120
  ),
@@ -151,9 +151,9 @@ class AsyncUniversalResource(AsyncAPIResource):
151
151
  model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
152
152
  query: str,
153
153
  texts: SequenceNotStr[str],
154
- chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
155
154
  is_iql: bool | Omit = omit,
156
155
  scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
156
+ chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
157
157
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
158
158
  # The extra values given here take precedence over values defined on the client or passed to this method.
159
159
  extra_headers: Headers | None = None,
@@ -181,8 +181,6 @@ class AsyncUniversalResource(AsyncAPIResource):
181
181
 
182
182
  Each text must contain at least one non-whitespace character.
183
183
 
184
- chunking_options: Options for how to split text into smaller chunks.
185
-
186
184
  is_iql: Whether the query should be interpreted as an
187
185
  [IQL](https://docs.isaacus.com/iql) query or else as a statement.
188
186
 
@@ -198,6 +196,8 @@ class AsyncUniversalResource(AsyncAPIResource):
198
196
 
199
197
  `chunk_min` uses the lowest confidence score of all of the texts' chunks.
200
198
 
199
+ chunking_options: Options for how to split text into smaller chunks.
200
+
201
201
  extra_headers: Send extra headers
202
202
 
203
203
  extra_query: Add additional query parameters to the request
@@ -213,9 +213,9 @@ class AsyncUniversalResource(AsyncAPIResource):
213
213
  "model": model,
214
214
  "query": query,
215
215
  "texts": texts,
216
- "chunking_options": chunking_options,
217
216
  "is_iql": is_iql,
218
217
  "scoring_method": scoring_method,
218
+ "chunking_options": chunking_options,
219
219
  },
220
220
  universal_create_params.UniversalCreateParams,
221
221
  ),
@@ -49,9 +49,9 @@ class EmbeddingsResource(SyncAPIResource):
49
49
  *,
50
50
  model: Literal["kanon-2-embedder"],
51
51
  texts: Union[SequenceNotStr[str], str],
52
- dimensions: Optional[int] | Omit = omit,
53
- overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
54
52
  task: Optional[Literal["retrieval/query", "retrieval/document"]] | Omit = omit,
53
+ overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
54
+ dimensions: Optional[int] | Omit = omit,
55
55
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
56
  # The extra values given here take precedence over values defined on the client or passed to this method.
57
57
  extra_headers: Headers | None = None,
@@ -72,7 +72,13 @@ class EmbeddingsResource(SyncAPIResource):
72
72
 
73
73
  No more than 128 texts can be embedded in a single request.
74
74
 
75
- dimensions: A whole number greater than or equal to 1.
75
+ task: The task the embeddings will be used for.
76
+
77
+ `retrieval/query` is meant for queries and statements, and `retrieval/document`
78
+ is meant for anything to be retrieved using query embeddings.
79
+
80
+ If `null`, which is the default setting, embeddings will not be optimized for
81
+ any particular task.
76
82
 
77
83
  overflow_strategy: The strategy to employ when content exceeds the model's maximum input length.
78
84
 
@@ -82,13 +88,7 @@ class EmbeddingsResource(SyncAPIResource):
82
88
  If `null`, an error will be raised if any content exceeds the model's maximum
83
89
  input length.
84
90
 
85
- task: The task the embeddings will be used for.
86
-
87
- `retrieval/query` is meant for queries and statements, and `retrieval/document`
88
- is meant for anything to be retrieved using query embeddings.
89
-
90
- If `null`, which is the default setting, embeddings will not be optimized for
91
- any particular task.
91
+ dimensions: A whole number greater than or equal to 1.
92
92
 
93
93
  extra_headers: Send extra headers
94
94
 
@@ -104,9 +104,9 @@ class EmbeddingsResource(SyncAPIResource):
104
104
  {
105
105
  "model": model,
106
106
  "texts": texts,
107
- "dimensions": dimensions,
108
- "overflow_strategy": overflow_strategy,
109
107
  "task": task,
108
+ "overflow_strategy": overflow_strategy,
109
+ "dimensions": dimensions,
110
110
  },
111
111
  embedding_create_params.EmbeddingCreateParams,
112
112
  ),
@@ -142,9 +142,9 @@ class AsyncEmbeddingsResource(AsyncAPIResource):
142
142
  *,
143
143
  model: Literal["kanon-2-embedder"],
144
144
  texts: Union[SequenceNotStr[str], str],
145
- dimensions: Optional[int] | Omit = omit,
146
- overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
147
145
  task: Optional[Literal["retrieval/query", "retrieval/document"]] | Omit = omit,
146
+ overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
147
+ dimensions: Optional[int] | Omit = omit,
148
148
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
149
149
  # The extra values given here take precedence over values defined on the client or passed to this method.
150
150
  extra_headers: Headers | None = None,
@@ -165,7 +165,13 @@ class AsyncEmbeddingsResource(AsyncAPIResource):
165
165
 
166
166
  No more than 128 texts can be embedded in a single request.
167
167
 
168
- dimensions: A whole number greater than or equal to 1.
168
+ task: The task the embeddings will be used for.
169
+
170
+ `retrieval/query` is meant for queries and statements, and `retrieval/document`
171
+ is meant for anything to be retrieved using query embeddings.
172
+
173
+ If `null`, which is the default setting, embeddings will not be optimized for
174
+ any particular task.
169
175
 
170
176
  overflow_strategy: The strategy to employ when content exceeds the model's maximum input length.
171
177
 
@@ -175,13 +181,7 @@ class AsyncEmbeddingsResource(AsyncAPIResource):
175
181
  If `null`, an error will be raised if any content exceeds the model's maximum
176
182
  input length.
177
183
 
178
- task: The task the embeddings will be used for.
179
-
180
- `retrieval/query` is meant for queries and statements, and `retrieval/document`
181
- is meant for anything to be retrieved using query embeddings.
182
-
183
- If `null`, which is the default setting, embeddings will not be optimized for
184
- any particular task.
184
+ dimensions: A whole number greater than or equal to 1.
185
185
 
186
186
  extra_headers: Send extra headers
187
187
 
@@ -197,9 +197,9 @@ class AsyncEmbeddingsResource(AsyncAPIResource):
197
197
  {
198
198
  "model": model,
199
199
  "texts": texts,
200
- "dimensions": dimensions,
201
- "overflow_strategy": overflow_strategy,
202
200
  "task": task,
201
+ "overflow_strategy": overflow_strategy,
202
+ "dimensions": dimensions,
203
203
  },
204
204
  embedding_create_params.EmbeddingCreateParams,
205
205
  ),
@@ -47,7 +47,7 @@ class EnrichmentsResource(SyncAPIResource):
47
47
  def create(
48
48
  self,
49
49
  *,
50
- model: Literal["kanon-2-enricher-preview"],
50
+ model: Literal["kanon-2-enricher"],
51
51
  texts: Union[SequenceNotStr[str], str],
52
52
  overflow_strategy: Optional[Literal["auto", "drop_end"]] | Omit = omit,
53
53
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -129,7 +129,7 @@ class AsyncEnrichmentsResource(AsyncAPIResource):
129
129
  async def create(
130
130
  self,
131
131
  *,
132
- model: Literal["kanon-2-enricher-preview"],
132
+ model: Literal["kanon-2-enricher"],
133
133
  texts: Union[SequenceNotStr[str], str],
134
134
  overflow_strategy: Optional[Literal["auto", "drop_end"]] | Omit = omit,
135
135
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1,12 +1,12 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from .qa import (
4
- QaResource,
5
- AsyncQaResource,
6
- QaResourceWithRawResponse,
7
- AsyncQaResourceWithRawResponse,
8
- QaResourceWithStreamingResponse,
9
- AsyncQaResourceWithStreamingResponse,
4
+ QAResource,
5
+ AsyncQAResource,
6
+ QAResourceWithRawResponse,
7
+ AsyncQAResourceWithRawResponse,
8
+ QAResourceWithStreamingResponse,
9
+ AsyncQAResourceWithStreamingResponse,
10
10
  )
11
11
  from .extractions import (
12
12
  ExtractionsResource,
@@ -18,12 +18,12 @@ from .extractions import (
18
18
  )
19
19
 
20
20
  __all__ = [
21
- "QaResource",
22
- "AsyncQaResource",
23
- "QaResourceWithRawResponse",
24
- "AsyncQaResourceWithRawResponse",
25
- "QaResourceWithStreamingResponse",
26
- "AsyncQaResourceWithStreamingResponse",
21
+ "QAResource",
22
+ "AsyncQAResource",
23
+ "QAResourceWithRawResponse",
24
+ "AsyncQAResourceWithRawResponse",
25
+ "QAResourceWithStreamingResponse",
26
+ "AsyncQAResourceWithStreamingResponse",
27
27
  "ExtractionsResource",
28
28
  "AsyncExtractionsResource",
29
29
  "ExtractionsResourceWithRawResponse",
@@ -3,12 +3,12 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .qa import (
6
- QaResource,
7
- AsyncQaResource,
8
- QaResourceWithRawResponse,
9
- AsyncQaResourceWithRawResponse,
10
- QaResourceWithStreamingResponse,
11
- AsyncQaResourceWithStreamingResponse,
6
+ QAResource,
7
+ AsyncQAResource,
8
+ QAResourceWithRawResponse,
9
+ AsyncQAResourceWithRawResponse,
10
+ QAResourceWithStreamingResponse,
11
+ AsyncQAResourceWithStreamingResponse,
12
12
  )
13
13
  from ..._compat import cached_property
14
14
  from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -18,8 +18,8 @@ __all__ = ["ExtractionsResource", "AsyncExtractionsResource"]
18
18
 
19
19
  class ExtractionsResource(SyncAPIResource):
20
20
  @cached_property
21
- def qa(self) -> QaResource:
22
- return QaResource(self._client)
21
+ def qa(self) -> QAResource:
22
+ return QAResource(self._client)
23
23
 
24
24
  @cached_property
25
25
  def with_raw_response(self) -> ExtractionsResourceWithRawResponse:
@@ -43,8 +43,8 @@ class ExtractionsResource(SyncAPIResource):
43
43
 
44
44
  class AsyncExtractionsResource(AsyncAPIResource):
45
45
  @cached_property
46
- def qa(self) -> AsyncQaResource:
47
- return AsyncQaResource(self._client)
46
+ def qa(self) -> AsyncQAResource:
47
+ return AsyncQAResource(self._client)
48
48
 
49
49
  @cached_property
50
50
  def with_raw_response(self) -> AsyncExtractionsResourceWithRawResponse:
@@ -71,8 +71,8 @@ class ExtractionsResourceWithRawResponse:
71
71
  self._extractions = extractions
72
72
 
73
73
  @cached_property
74
- def qa(self) -> QaResourceWithRawResponse:
75
- return QaResourceWithRawResponse(self._extractions.qa)
74
+ def qa(self) -> QAResourceWithRawResponse:
75
+ return QAResourceWithRawResponse(self._extractions.qa)
76
76
 
77
77
 
78
78
  class AsyncExtractionsResourceWithRawResponse:
@@ -80,8 +80,8 @@ class AsyncExtractionsResourceWithRawResponse:
80
80
  self._extractions = extractions
81
81
 
82
82
  @cached_property
83
- def qa(self) -> AsyncQaResourceWithRawResponse:
84
- return AsyncQaResourceWithRawResponse(self._extractions.qa)
83
+ def qa(self) -> AsyncQAResourceWithRawResponse:
84
+ return AsyncQAResourceWithRawResponse(self._extractions.qa)
85
85
 
86
86
 
87
87
  class ExtractionsResourceWithStreamingResponse:
@@ -89,8 +89,8 @@ class ExtractionsResourceWithStreamingResponse:
89
89
  self._extractions = extractions
90
90
 
91
91
  @cached_property
92
- def qa(self) -> QaResourceWithStreamingResponse:
93
- return QaResourceWithStreamingResponse(self._extractions.qa)
92
+ def qa(self) -> QAResourceWithStreamingResponse:
93
+ return QAResourceWithStreamingResponse(self._extractions.qa)
94
94
 
95
95
 
96
96
  class AsyncExtractionsResourceWithStreamingResponse:
@@ -98,5 +98,5 @@ class AsyncExtractionsResourceWithStreamingResponse:
98
98
  self._extractions = extractions
99
99
 
100
100
  @cached_property
101
- def qa(self) -> AsyncQaResourceWithStreamingResponse:
102
- return AsyncQaResourceWithStreamingResponse(self._extractions.qa)
101
+ def qa(self) -> AsyncQAResourceWithStreamingResponse:
102
+ return AsyncQAResourceWithStreamingResponse(self._extractions.qa)
@@ -21,28 +21,28 @@ from ..._base_client import make_request_options
21
21
  from ...types.extractions import qa_create_params
22
22
  from ...types.extractions.answer_extraction_response import AnswerExtractionResponse
23
23
 
24
- __all__ = ["QaResource", "AsyncQaResource"]
24
+ __all__ = ["QAResource", "AsyncQAResource"]
25
25
 
26
26
 
27
- class QaResource(SyncAPIResource):
27
+ class QAResource(SyncAPIResource):
28
28
  @cached_property
29
- def with_raw_response(self) -> QaResourceWithRawResponse:
29
+ def with_raw_response(self) -> QAResourceWithRawResponse:
30
30
  """
31
31
  This property can be used as a prefix for any HTTP method call to return
32
32
  the raw response object instead of the parsed content.
33
33
 
34
34
  For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
35
35
  """
36
- return QaResourceWithRawResponse(self)
36
+ return QAResourceWithRawResponse(self)
37
37
 
38
38
  @cached_property
39
- def with_streaming_response(self) -> QaResourceWithStreamingResponse:
39
+ def with_streaming_response(self) -> QAResourceWithStreamingResponse:
40
40
  """
41
41
  An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
42
 
43
43
  For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
44
44
  """
45
- return QaResourceWithStreamingResponse(self)
45
+ return QAResourceWithStreamingResponse(self)
46
46
 
47
47
  def create(
48
48
  self,
@@ -50,9 +50,9 @@ class QaResource(SyncAPIResource):
50
50
  model: Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"],
51
51
  query: str,
52
52
  texts: SequenceNotStr[str],
53
- chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
54
53
  ignore_inextractability: bool | Omit = omit,
55
54
  top_k: int | Omit = omit,
55
+ chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
56
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
58
  extra_headers: Headers | None = None,
@@ -82,8 +82,6 @@ class QaResource(SyncAPIResource):
82
82
 
83
83
  Each text must contain at least one non-whitespace character.
84
84
 
85
- chunking_options: Options for how to split text into smaller chunks.
86
-
87
85
  ignore_inextractability: Whether to, if the model's score of the likelihood that an answer can not be
88
86
  extracted from a text is greater than the highest score of all possible answers,
89
87
  still return the highest scoring answers for that text.
@@ -96,6 +94,8 @@ class QaResource(SyncAPIResource):
96
94
 
97
95
  If `null`, which is the default, all answers will be returned.
98
96
 
97
+ chunking_options: Options for how to split text into smaller chunks.
98
+
99
99
  extra_headers: Send extra headers
100
100
 
101
101
  extra_query: Add additional query parameters to the request
@@ -111,11 +111,11 @@ class QaResource(SyncAPIResource):
111
111
  "model": model,
112
112
  "query": query,
113
113
  "texts": texts,
114
- "chunking_options": chunking_options,
115
114
  "ignore_inextractability": ignore_inextractability,
116
115
  "top_k": top_k,
116
+ "chunking_options": chunking_options,
117
117
  },
118
- qa_create_params.QaCreateParams,
118
+ qa_create_params.QACreateParams,
119
119
  ),
120
120
  options=make_request_options(
121
121
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -124,25 +124,25 @@ class QaResource(SyncAPIResource):
124
124
  )
125
125
 
126
126
 
127
- class AsyncQaResource(AsyncAPIResource):
127
+ class AsyncQAResource(AsyncAPIResource):
128
128
  @cached_property
129
- def with_raw_response(self) -> AsyncQaResourceWithRawResponse:
129
+ def with_raw_response(self) -> AsyncQAResourceWithRawResponse:
130
130
  """
131
131
  This property can be used as a prefix for any HTTP method call to return
132
132
  the raw response object instead of the parsed content.
133
133
 
134
134
  For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
135
135
  """
136
- return AsyncQaResourceWithRawResponse(self)
136
+ return AsyncQAResourceWithRawResponse(self)
137
137
 
138
138
  @cached_property
139
- def with_streaming_response(self) -> AsyncQaResourceWithStreamingResponse:
139
+ def with_streaming_response(self) -> AsyncQAResourceWithStreamingResponse:
140
140
  """
141
141
  An alternative to `.with_raw_response` that doesn't eagerly read the response body.
142
142
 
143
143
  For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
144
144
  """
145
- return AsyncQaResourceWithStreamingResponse(self)
145
+ return AsyncQAResourceWithStreamingResponse(self)
146
146
 
147
147
  async def create(
148
148
  self,
@@ -150,9 +150,9 @@ class AsyncQaResource(AsyncAPIResource):
150
150
  model: Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"],
151
151
  query: str,
152
152
  texts: SequenceNotStr[str],
153
- chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
154
153
  ignore_inextractability: bool | Omit = omit,
155
154
  top_k: int | Omit = omit,
155
+ chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
156
156
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
157
157
  # The extra values given here take precedence over values defined on the client or passed to this method.
158
158
  extra_headers: Headers | None = None,
@@ -182,8 +182,6 @@ class AsyncQaResource(AsyncAPIResource):
182
182
 
183
183
  Each text must contain at least one non-whitespace character.
184
184
 
185
- chunking_options: Options for how to split text into smaller chunks.
186
-
187
185
  ignore_inextractability: Whether to, if the model's score of the likelihood that an answer can not be
188
186
  extracted from a text is greater than the highest score of all possible answers,
189
187
  still return the highest scoring answers for that text.
@@ -196,6 +194,8 @@ class AsyncQaResource(AsyncAPIResource):
196
194
 
197
195
  If `null`, which is the default, all answers will be returned.
198
196
 
197
+ chunking_options: Options for how to split text into smaller chunks.
198
+
199
199
  extra_headers: Send extra headers
200
200
 
201
201
  extra_query: Add additional query parameters to the request
@@ -211,11 +211,11 @@ class AsyncQaResource(AsyncAPIResource):
211
211
  "model": model,
212
212
  "query": query,
213
213
  "texts": texts,
214
- "chunking_options": chunking_options,
215
214
  "ignore_inextractability": ignore_inextractability,
216
215
  "top_k": top_k,
216
+ "chunking_options": chunking_options,
217
217
  },
218
- qa_create_params.QaCreateParams,
218
+ qa_create_params.QACreateParams,
219
219
  ),
220
220
  options=make_request_options(
221
221
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -224,8 +224,8 @@ class AsyncQaResource(AsyncAPIResource):
224
224
  )
225
225
 
226
226
 
227
- class QaResourceWithRawResponse:
228
- def __init__(self, qa: QaResource) -> None:
227
+ class QAResourceWithRawResponse:
228
+ def __init__(self, qa: QAResource) -> None:
229
229
  self._qa = qa
230
230
 
231
231
  self.create = to_raw_response_wrapper(
@@ -233,8 +233,8 @@ class QaResourceWithRawResponse:
233
233
  )
234
234
 
235
235
 
236
- class AsyncQaResourceWithRawResponse:
237
- def __init__(self, qa: AsyncQaResource) -> None:
236
+ class AsyncQAResourceWithRawResponse:
237
+ def __init__(self, qa: AsyncQAResource) -> None:
238
238
  self._qa = qa
239
239
 
240
240
  self.create = async_to_raw_response_wrapper(
@@ -242,8 +242,8 @@ class AsyncQaResourceWithRawResponse:
242
242
  )
243
243
 
244
244
 
245
- class QaResourceWithStreamingResponse:
246
- def __init__(self, qa: QaResource) -> None:
245
+ class QAResourceWithStreamingResponse:
246
+ def __init__(self, qa: QAResource) -> None:
247
247
  self._qa = qa
248
248
 
249
249
  self.create = to_streamed_response_wrapper(
@@ -251,8 +251,8 @@ class QaResourceWithStreamingResponse:
251
251
  )
252
252
 
253
253
 
254
- class AsyncQaResourceWithStreamingResponse:
255
- def __init__(self, qa: AsyncQaResource) -> None:
254
+ class AsyncQAResourceWithStreamingResponse:
255
+ def __init__(self, qa: AsyncQAResource) -> None:
256
256
  self._qa = qa
257
257
 
258
258
  self.create = async_to_streamed_response_wrapper(
@@ -50,10 +50,10 @@ class RerankingsResource(SyncAPIResource):
50
50
  model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
51
51
  query: str,
52
52
  texts: SequenceNotStr[str],
53
- chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
53
+ top_n: Optional[int] | Omit = omit,
54
54
  is_iql: bool | Omit = omit,
55
55
  scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
56
- top_n: Optional[int] | Omit = omit,
56
+ chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
57
57
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
58
  # The extra values given here take precedence over values defined on the client or passed to this method.
59
59
  extra_headers: Headers | None = None,
@@ -82,7 +82,7 @@ class RerankingsResource(SyncAPIResource):
82
82
 
83
83
  Each text must contain at least one non-whitespace character.
84
84
 
85
- chunking_options: Options for how to split text into smaller chunks.
85
+ top_n: A whole number greater than or equal to 1.
86
86
 
87
87
  is_iql: Whether the query should be interpreted as an
88
88
  [Isaacus Query Language (IQL)](https://docs.isaacus.com/iql) query, which is not
@@ -104,7 +104,7 @@ class RerankingsResource(SyncAPIResource):
104
104
 
105
105
  `chunk_min` uses the lowest relevance score of all of a text's chunks.
106
106
 
107
- top_n: A whole number greater than or equal to 1.
107
+ chunking_options: Options for how to split text into smaller chunks.
108
108
 
109
109
  extra_headers: Send extra headers
110
110
 
@@ -121,10 +121,10 @@ class RerankingsResource(SyncAPIResource):
121
121
  "model": model,
122
122
  "query": query,
123
123
  "texts": texts,
124
- "chunking_options": chunking_options,
124
+ "top_n": top_n,
125
125
  "is_iql": is_iql,
126
126
  "scoring_method": scoring_method,
127
- "top_n": top_n,
127
+ "chunking_options": chunking_options,
128
128
  },
129
129
  reranking_create_params.RerankingCreateParams,
130
130
  ),
@@ -161,10 +161,10 @@ class AsyncRerankingsResource(AsyncAPIResource):
161
161
  model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
162
162
  query: str,
163
163
  texts: SequenceNotStr[str],
164
- chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
164
+ top_n: Optional[int] | Omit = omit,
165
165
  is_iql: bool | Omit = omit,
166
166
  scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
167
- top_n: Optional[int] | Omit = omit,
167
+ chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
168
168
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169
169
  # The extra values given here take precedence over values defined on the client or passed to this method.
170
170
  extra_headers: Headers | None = None,
@@ -193,7 +193,7 @@ class AsyncRerankingsResource(AsyncAPIResource):
193
193
 
194
194
  Each text must contain at least one non-whitespace character.
195
195
 
196
- chunking_options: Options for how to split text into smaller chunks.
196
+ top_n: A whole number greater than or equal to 1.
197
197
 
198
198
  is_iql: Whether the query should be interpreted as an
199
199
  [Isaacus Query Language (IQL)](https://docs.isaacus.com/iql) query, which is not
@@ -215,7 +215,7 @@ class AsyncRerankingsResource(AsyncAPIResource):
215
215
 
216
216
  `chunk_min` uses the lowest relevance score of all of a text's chunks.
217
217
 
218
- top_n: A whole number greater than or equal to 1.
218
+ chunking_options: Options for how to split text into smaller chunks.
219
219
 
220
220
  extra_headers: Send extra headers
221
221
 
@@ -232,10 +232,10 @@ class AsyncRerankingsResource(AsyncAPIResource):
232
232
  "model": model,
233
233
  "query": query,
234
234
  "texts": texts,
235
- "chunking_options": chunking_options,
235
+ "top_n": top_n,
236
236
  "is_iql": is_iql,
237
237
  "scoring_method": scoring_method,
238
- "top_n": top_n,
238
+ "chunking_options": chunking_options,
239
239
  },
240
240
  reranking_create_params.RerankingCreateParams,
241
241
  ),
isaacus/types/__init__.py CHANGED
@@ -2,9 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .ilgs_v1_date import ILGSv1Date as ILGSv1Date
6
+ from .ilgs_v1_span import ILGSv1Span as ILGSv1Span
7
+ from .ilgs_v1_term import ILGSv1Term as ILGSv1Term
8
+ from .ilgs_v1_email import ILGSv1Email as ILGSv1Email
9
+ from .ilgs_v1_quote import ILGSv1Quote as ILGSv1Quote
10
+ from .ilgs_v1_person import ILGSv1Person as ILGSv1Person
11
+ from .ilgs_v1_segment import ILGSv1Segment as ILGSv1Segment
12
+ from .ilgs_v1_website import ILGSv1Website as ILGSv1Website
13
+ from .ilgs_v1_document import ILGSv1Document as ILGSv1Document
14
+ from .ilgs_v1_location import ILGSv1Location as ILGSv1Location
15
+ from .ilgs_v1_id_number import ILGSv1IDNumber as ILGSv1IDNumber
5
16
  from .embedding_response import EmbeddingResponse as EmbeddingResponse
6
17
  from .reranking_response import RerankingResponse as RerankingResponse
7
18
  from .enrichment_response import EnrichmentResponse as EnrichmentResponse
19
+ from .ilgs_v1_phone_number import ILGSv1PhoneNumber as ILGSv1PhoneNumber
20
+ from .ilgs_v1_crossreference import ILGSv1Crossreference as ILGSv1Crossreference
8
21
  from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
9
22
  from .reranking_create_params import RerankingCreateParams as RerankingCreateParams
10
23
  from .enrichment_create_params import EnrichmentCreateParams as EnrichmentCreateParams
24
+ from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument