isaacus 0.10.1__tar.gz → 0.12.0__tar.gz
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.
- isaacus-0.12.0/.release-please-manifest.json +3 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/CHANGELOG.md +24 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/PKG-INFO +1 -1
- {isaacus-0.10.1 → isaacus-0.12.0}/api.md +18 -2
- {isaacus-0.10.1 → isaacus-0.12.0}/pyproject.toml +1 -1
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_version.py +1 -1
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/enrichments.py +2 -2
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/extractions/__init__.py +12 -12
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/extractions/extractions.py +18 -18
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/extractions/qa.py +29 -29
- isaacus-0.12.0/src/isaacus/types/__init__.py +24 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/enrichment_create_params.py +1 -1
- isaacus-0.12.0/src/isaacus/types/enrichment_response.py +60 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/extractions/__init__.py +1 -1
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/extractions/qa_create_params.py +8 -8
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_crossreference.py +42 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_date.py +70 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_document.py +172 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_email.py +27 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_external_document.py +101 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_id_number.py +27 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_location.py +53 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_person.py +195 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_phone_number.py +30 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_quote.py +52 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_segment.py +205 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_span.py +28 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_term.py +59 -0
- isaacus-0.12.0/src/isaacus/types/ilgs_v1_website.py +28 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/extractions/test_qa.py +8 -8
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/test_enrichments.py +8 -8
- isaacus-0.10.1/.release-please-manifest.json +0 -3
- isaacus-0.10.1/src/isaacus/types/__init__.py +0 -10
- isaacus-0.10.1/src/isaacus/types/enrichment_response.py +0 -1458
- {isaacus-0.10.1 → isaacus-0.12.0}/.gitignore +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/CONTRIBUTING.md +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/LICENSE +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/README.md +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/SECURITY.md +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/bin/check-release-environment +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/bin/publish-pypi +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/examples/.keep +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/noxfile.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/release-please-config.json +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/requirements-dev.lock +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/requirements.lock +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_base_client.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_client.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_compat.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_constants.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_exceptions.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_files.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_models.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_qs.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_resource.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_response.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_streaming.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_types.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_compat.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_datetime_parse.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_json.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_logs.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_proxy.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_reflection.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_resources_proxy.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_streams.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_sync.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_transform.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_typing.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/_utils/_utils.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/lib/.keep +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/py.typed +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/classifications/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/classifications/classifications.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/classifications/universal.py +8 -8
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/embeddings.py +24 -24
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/resources/rerankings.py +12 -12
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/classifications/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/classifications/universal_classification_response.py +22 -22
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/classifications/universal_create_params.py +6 -6
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/embedding_create_params.py +11 -11
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/embedding_response.py +3 -3
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/extractions/answer_extraction_response.py +12 -12
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/reranking_create_params.py +7 -7
- {isaacus-0.10.1 → isaacus-0.12.0}/src/isaacus/types/reranking_response.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/classifications/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/classifications/test_universal.py +6 -6
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/extractions/__init__.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/test_embeddings.py +4 -4
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/api_resources/test_rerankings.py +8 -8
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/conftest.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/sample_file.txt +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_client.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_deepcopy.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_extract_files.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_files.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_models.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_qs.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_required_args.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_response.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_streaming.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_transform.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_utils/test_json.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_utils/test_proxy.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/test_utils/test_typing.py +0 -0
- {isaacus-0.10.1 → isaacus-0.12.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2026-02-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.11.0...v0.12.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **sdk:** add `qa` as an initialism ([27162f3](https://github.com/isaacus-dev/isaacus-python/commit/27162f3e98efa095e41f67801c6a3497709be9d6))
|
|
10
|
+
* **sdk:** force ilgs v1 prefix on models ([62bc9ff](https://github.com/isaacus-dev/isaacus-python/commit/62bc9ffc03feb68e3638cfee3d9df9a8547bb9e8))
|
|
11
|
+
* **sdk:** modify how ILGSv1 models are cased ([f295222](https://github.com/isaacus-dev/isaacus-python/commit/f2952227e58618b33c4d0da9515a1c73942a771a))
|
|
12
|
+
* **sdk:** order properties as in spec ([3dc865c](https://github.com/isaacus-dev/isaacus-python/commit/3dc865c2ee865b334b7f0ca8810226f3ac251be8))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **api:** merge duplicate components, reorder required fields ([55b68ce](https://github.com/isaacus-dev/isaacus-python/commit/55b68ce2bc294f094ccaf3750ea1b932ed4f95f5))
|
|
18
|
+
|
|
19
|
+
## 0.11.0 (2026-02-03)
|
|
20
|
+
|
|
21
|
+
Full Changelog: [v0.10.1...v0.11.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.10.1...v0.11.0)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **api:** remove -preview from model name ([e86f57d](https://github.com/isaacus-dev/isaacus-python/commit/e86f57dc2ac6c1f5a11973aaf1c4e5c19b6b2ec6))
|
|
26
|
+
|
|
3
27
|
## 0.10.1 (2026-02-03)
|
|
4
28
|
|
|
5
29
|
Full Changelog: [v0.10.0...v0.10.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.10.0...v0.10.1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: isaacus
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: The official Python library for the isaacus API
|
|
5
5
|
Project-URL: Homepage, https://github.com/isaacus-dev/isaacus-python
|
|
6
6
|
Project-URL: Repository, https://github.com/isaacus-dev/isaacus-python
|
|
@@ -38,7 +38,7 @@ Methods:
|
|
|
38
38
|
|
|
39
39
|
# Extractions
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## QA
|
|
42
42
|
|
|
43
43
|
Types:
|
|
44
44
|
|
|
@@ -55,7 +55,23 @@ Methods:
|
|
|
55
55
|
Types:
|
|
56
56
|
|
|
57
57
|
```python
|
|
58
|
-
from isaacus.types import
|
|
58
|
+
from isaacus.types import (
|
|
59
|
+
EnrichmentResponse,
|
|
60
|
+
ILGSv1Crossreference,
|
|
61
|
+
ILGSv1Date,
|
|
62
|
+
ILGSv1Document,
|
|
63
|
+
ILGSv1Email,
|
|
64
|
+
ILGSv1ExternalDocument,
|
|
65
|
+
ILGSv1IDNumber,
|
|
66
|
+
ILGSv1Location,
|
|
67
|
+
ILGSv1Person,
|
|
68
|
+
ILGSv1PhoneNumber,
|
|
69
|
+
ILGSv1Quote,
|
|
70
|
+
ILGSv1Segment,
|
|
71
|
+
ILGSv1Span,
|
|
72
|
+
ILGSv1Term,
|
|
73
|
+
ILGSv1Website,
|
|
74
|
+
)
|
|
59
75
|
```
|
|
60
76
|
|
|
61
77
|
Methods:
|
|
@@ -47,7 +47,7 @@ class EnrichmentsResource(SyncAPIResource):
|
|
|
47
47
|
def create(
|
|
48
48
|
self,
|
|
49
49
|
*,
|
|
50
|
-
model: Literal["kanon-2-enricher
|
|
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
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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) ->
|
|
22
|
-
return
|
|
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) ->
|
|
47
|
-
return
|
|
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) ->
|
|
75
|
-
return
|
|
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) ->
|
|
84
|
-
return
|
|
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) ->
|
|
93
|
-
return
|
|
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) ->
|
|
102
|
-
return
|
|
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__ = ["
|
|
24
|
+
__all__ = ["QAResource", "AsyncQAResource"]
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class QAResource(SyncAPIResource):
|
|
28
28
|
@cached_property
|
|
29
|
-
def with_raw_response(self) ->
|
|
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
|
|
36
|
+
return QAResourceWithRawResponse(self)
|
|
37
37
|
|
|
38
38
|
@cached_property
|
|
39
|
-
def with_streaming_response(self) ->
|
|
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
|
|
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.
|
|
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
|
|
127
|
+
class AsyncQAResource(AsyncAPIResource):
|
|
128
128
|
@cached_property
|
|
129
|
-
def with_raw_response(self) ->
|
|
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
|
|
136
|
+
return AsyncQAResourceWithRawResponse(self)
|
|
137
137
|
|
|
138
138
|
@cached_property
|
|
139
|
-
def with_streaming_response(self) ->
|
|
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
|
|
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.
|
|
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
|
|
228
|
-
def __init__(self, qa:
|
|
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
|
|
237
|
-
def __init__(self, qa:
|
|
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
|
|
246
|
-
def __init__(self, qa:
|
|
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
|
|
255
|
-
def __init__(self, qa:
|
|
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(
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
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
|
|
16
|
+
from .embedding_response import EmbeddingResponse as EmbeddingResponse
|
|
17
|
+
from .reranking_response import RerankingResponse as RerankingResponse
|
|
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
|
|
21
|
+
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
|
|
22
|
+
from .reranking_create_params import RerankingCreateParams as RerankingCreateParams
|
|
23
|
+
from .enrichment_create_params import EnrichmentCreateParams as EnrichmentCreateParams
|
|
24
|
+
from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument
|
|
@@ -11,7 +11,7 @@ __all__ = ["EnrichmentCreateParams"]
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class EnrichmentCreateParams(TypedDict, total=False):
|
|
14
|
-
model: Required[Literal["kanon-2-enricher
|
|
14
|
+
model: Required[Literal["kanon-2-enricher"]]
|
|
15
15
|
"""
|
|
16
16
|
The ID of the [model](https://docs.isaacus.com/models#enrichment) to use for
|
|
17
17
|
enrichment.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .ilgs_v1_document import ILGSv1Document
|
|
7
|
+
|
|
8
|
+
__all__ = ["EnrichmentResponse", "Result", "Usage"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Result(BaseModel):
|
|
12
|
+
"""An enriched document alongside its index in the input array of texts."""
|
|
13
|
+
|
|
14
|
+
index: int
|
|
15
|
+
"""
|
|
16
|
+
The index of this document in the input array of texts, starting at `0` (and,
|
|
17
|
+
therefore, ending at the number of inputs minus `1`).
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
document: ILGSv1Document
|
|
21
|
+
"""The enriched document."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Usage(BaseModel):
|
|
25
|
+
"""Statistics about the usage of resources in the process of enriching the input."""
|
|
26
|
+
|
|
27
|
+
input_tokens: int
|
|
28
|
+
"""The total number of tokens inputted to the model."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class EnrichmentResponse(BaseModel):
|
|
32
|
+
results: List[Result]
|
|
33
|
+
"""
|
|
34
|
+
The input documents enriched into version 1.0.0 of the Isaacus Legal Graph
|
|
35
|
+
Schema (IGLS).
|
|
36
|
+
|
|
37
|
+
All spans in an enriched document graph are indexed into the Unicode code point
|
|
38
|
+
space of a source document. Access to source documents is thus required to
|
|
39
|
+
resolve spans into text.
|
|
40
|
+
|
|
41
|
+
The start and end indices of spans are zero-based (i.e., the first Unicode code
|
|
42
|
+
point in the document is at index 0) and half-open (i.e., the end index is
|
|
43
|
+
exclusive).
|
|
44
|
+
|
|
45
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
46
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
47
|
+
wholly nested.
|
|
48
|
+
|
|
49
|
+
Spans of the exact same type (e.g., segments) will never be duplicated.
|
|
50
|
+
|
|
51
|
+
Spans cannot be empty and will never start or end at whitespace.
|
|
52
|
+
|
|
53
|
+
When using programming languages other than Python (which uses zero-based,
|
|
54
|
+
half-open, Unicode code point-spaced string indexing), indices may need to be
|
|
55
|
+
translated accordingly (for example, JavaScript slices into UTF-16 code units
|
|
56
|
+
instead of Unicode code points).
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
usage: Usage
|
|
60
|
+
"""Statistics about the usage of resources in the process of enriching the input."""
|
|
@@ -7,10 +7,10 @@ from typing_extensions import Literal, Required, TypedDict
|
|
|
7
7
|
|
|
8
8
|
from ..._types import SequenceNotStr
|
|
9
9
|
|
|
10
|
-
__all__ = ["
|
|
10
|
+
__all__ = ["QACreateParams", "ChunkingOptions"]
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
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,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
from .ilgs_v1_span import ILGSv1Span
|
|
5
|
+
|
|
6
|
+
__all__ = ["ILGSv1Crossreference"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ILGSv1Crossreference(BaseModel):
|
|
10
|
+
"""A cross-reference within the document pointing to one or more segments."""
|
|
11
|
+
|
|
12
|
+
start: str
|
|
13
|
+
"""
|
|
14
|
+
The unique identifier of the earliest segment in the span of segments being
|
|
15
|
+
cross-referenced with ties broken in favor of the least-nested (i.e., largest)
|
|
16
|
+
segment. If the cross-reference points to a single segment, `start` and `end`
|
|
17
|
+
will be identical.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
end: str
|
|
21
|
+
"""
|
|
22
|
+
The unique identifier of the latest segment in the span of segments being
|
|
23
|
+
cross-referenced with ties broken in favor of the least-nested (i.e., largest)
|
|
24
|
+
segment. If the cross-reference points to a single segment, `start` and `end`
|
|
25
|
+
will be identical.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
span: ILGSv1Span
|
|
29
|
+
"""A zero-based, half-open span into the Unicode code point space of input text.
|
|
30
|
+
|
|
31
|
+
All spans are globally laminar and well-nested similar to XML—it is impossible
|
|
32
|
+
for any two spans to partially overlap; they can only be disjoint, adjacent, or
|
|
33
|
+
wholly nested. Spans of the exact same type (e.g., segments) will never be
|
|
34
|
+
duplicated.
|
|
35
|
+
|
|
36
|
+
A span cannot be empty and will never start or end at whitespace.
|
|
37
|
+
|
|
38
|
+
Note that, when using programming languages other than Python (which uses
|
|
39
|
+
zero-based, half-open, Unicode code point-spaced string indexing), indices may
|
|
40
|
+
need to be translated accordingly (for example, JavaScript slices into UTF-16
|
|
41
|
+
code units instead of Unicode code points).
|
|
42
|
+
"""
|