isaacus 0.11.0__tar.gz → 0.13.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.13.0/.release-please-manifest.json +3 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/CHANGELOG.md +29 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/PKG-INFO +1 -1
- {isaacus-0.11.0 → isaacus-0.13.0}/api.md +24 -1
- {isaacus-0.11.0 → isaacus-0.13.0}/pyproject.toml +1 -1
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_version.py +1 -1
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/extractions/__init__.py +12 -12
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/extractions/extractions.py +18 -18
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/extractions/qa.py +29 -29
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/__init__.py +14 -0
- isaacus-0.13.0/src/isaacus/types/crossreference.py +42 -0
- isaacus-0.13.0/src/isaacus/types/date.py +70 -0
- isaacus-0.13.0/src/isaacus/types/document.py +172 -0
- isaacus-0.13.0/src/isaacus/types/email.py +27 -0
- isaacus-0.13.0/src/isaacus/types/enrichment_response.py +60 -0
- isaacus-0.13.0/src/isaacus/types/external_document.py +101 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/extractions/__init__.py +1 -1
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/extractions/qa_create_params.py +8 -8
- isaacus-0.13.0/src/isaacus/types/id_number.py +27 -0
- isaacus-0.13.0/src/isaacus/types/location.py +53 -0
- isaacus-0.13.0/src/isaacus/types/person.py +195 -0
- isaacus-0.13.0/src/isaacus/types/phone_number.py +30 -0
- isaacus-0.13.0/src/isaacus/types/quote.py +52 -0
- isaacus-0.13.0/src/isaacus/types/segment.py +205 -0
- isaacus-0.13.0/src/isaacus/types/span.py +28 -0
- isaacus-0.13.0/src/isaacus/types/term.py +59 -0
- isaacus-0.13.0/src/isaacus/types/website.py +28 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/extractions/test_qa.py +8 -8
- isaacus-0.11.0/.release-please-manifest.json +0 -3
- isaacus-0.11.0/src/isaacus/types/enrichment_response.py +0 -1458
- {isaacus-0.11.0 → isaacus-0.13.0}/.gitignore +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/CONTRIBUTING.md +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/LICENSE +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/README.md +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/SECURITY.md +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/bin/check-release-environment +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/bin/publish-pypi +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/examples/.keep +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/noxfile.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/release-please-config.json +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/requirements-dev.lock +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/requirements.lock +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_base_client.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_client.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_compat.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_constants.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_exceptions.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_files.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_models.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_qs.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_resource.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_response.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_streaming.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_types.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_compat.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_datetime_parse.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_json.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_logs.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_proxy.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_reflection.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_resources_proxy.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_streams.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_sync.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_transform.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_typing.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/_utils/_utils.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/lib/.keep +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/py.typed +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/classifications/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/classifications/classifications.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/classifications/universal.py +8 -8
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/embeddings.py +24 -24
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/enrichments.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/resources/rerankings.py +12 -12
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/classifications/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/classifications/universal_classification_response.py +22 -22
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/classifications/universal_create_params.py +6 -6
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/embedding_create_params.py +11 -11
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/embedding_response.py +3 -3
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/enrichment_create_params.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/extractions/answer_extraction_response.py +12 -12
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/reranking_create_params.py +7 -7
- {isaacus-0.11.0 → isaacus-0.13.0}/src/isaacus/types/reranking_response.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/classifications/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/classifications/test_universal.py +6 -6
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/extractions/__init__.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/test_embeddings.py +4 -4
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/test_enrichments.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/api_resources/test_rerankings.py +8 -8
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/conftest.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/sample_file.txt +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_client.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_deepcopy.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_extract_files.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_files.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_models.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_qs.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_required_args.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_response.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_streaming.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_transform.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_utils/test_json.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_utils/test_proxy.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/test_utils/test_typing.py +0 -0
- {isaacus-0.11.0 → isaacus-0.13.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.0 (2026-02-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.12.0...v0.13.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **sdk:** alter v1 pascal casing ([7229055](https://github.com/isaacus-dev/isaacus-python/commit/7229055504fd20c05c5d7f5ee40afd76fbcdd02f))
|
|
10
|
+
* **sdk:** move ilgs models under `ilgs_v1` ([0165061](https://github.com/isaacus-dev/isaacus-python/commit/0165061dfd3f5245df16c75f7b8dbb39c68d9de8))
|
|
11
|
+
* **sdk:** move ilgs to its own resource ([e196566](https://github.com/isaacus-dev/isaacus-python/commit/e196566b8c5ef8e876f6d6c0d31393e17d24926f))
|
|
12
|
+
* **sdk:** move ilgsv1 resources under a subresource ([8620bb5](https://github.com/isaacus-dev/isaacus-python/commit/8620bb5259685c1764960278caba70ae9b42a0ec))
|
|
13
|
+
* **sdk:** removed chunking options as a shared resource ([b11b540](https://github.com/isaacus-dev/isaacus-python/commit/b11b540a1da187f5c667e99e53caa550c364aa94))
|
|
14
|
+
* **sdk:** revert v1 casing change ([5a8d5b1](https://github.com/isaacus-dev/isaacus-python/commit/5a8d5b13c69185a36148ee336d3dcf1b3191de0b))
|
|
15
|
+
|
|
16
|
+
## 0.12.0 (2026-02-03)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.11.0...v0.12.0)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **sdk:** add `qa` as an initialism ([27162f3](https://github.com/isaacus-dev/isaacus-python/commit/27162f3e98efa095e41f67801c6a3497709be9d6))
|
|
23
|
+
* **sdk:** force ilgs v1 prefix on models ([62bc9ff](https://github.com/isaacus-dev/isaacus-python/commit/62bc9ffc03feb68e3638cfee3d9df9a8547bb9e8))
|
|
24
|
+
* **sdk:** modify how ILGSv1 models are cased ([f295222](https://github.com/isaacus-dev/isaacus-python/commit/f2952227e58618b33c4d0da9515a1c73942a771a))
|
|
25
|
+
* **sdk:** order properties as in spec ([3dc865c](https://github.com/isaacus-dev/isaacus-python/commit/3dc865c2ee865b334b7f0ca8810226f3ac251be8))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **api:** merge duplicate components, reorder required fields ([55b68ce](https://github.com/isaacus-dev/isaacus-python/commit/55b68ce2bc294f094ccaf3750ea1b932ed4f95f5))
|
|
31
|
+
|
|
3
32
|
## 0.11.0 (2026-02-03)
|
|
4
33
|
|
|
5
34
|
Full Changelog: [v0.10.1...v0.11.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.10.1...v0.11.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: isaacus
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.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
|
|
|
@@ -61,3 +61,26 @@ from isaacus.types import EnrichmentResponse
|
|
|
61
61
|
Methods:
|
|
62
62
|
|
|
63
63
|
- <code title="post /enrichments">client.enrichments.<a href="./src/isaacus/resources/enrichments.py">create</a>(\*\*<a href="src/isaacus/types/enrichment_create_params.py">params</a>) -> <a href="./src/isaacus/types/enrichment_response.py">EnrichmentResponse</a></code>
|
|
64
|
+
|
|
65
|
+
# ILGSv1
|
|
66
|
+
|
|
67
|
+
Types:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from isaacus.types import (
|
|
71
|
+
Crossreference,
|
|
72
|
+
Date,
|
|
73
|
+
Document,
|
|
74
|
+
Email,
|
|
75
|
+
ExternalDocument,
|
|
76
|
+
IDNumber,
|
|
77
|
+
Location,
|
|
78
|
+
Person,
|
|
79
|
+
PhoneNumber,
|
|
80
|
+
Quote,
|
|
81
|
+
Segment,
|
|
82
|
+
Span,
|
|
83
|
+
Term,
|
|
84
|
+
Website,
|
|
85
|
+
)
|
|
86
|
+
```
|
|
@@ -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(
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .date import Date as Date
|
|
6
|
+
from .span import Span as Span
|
|
7
|
+
from .term import Term as Term
|
|
8
|
+
from .email import Email as Email
|
|
9
|
+
from .quote import Quote as Quote
|
|
10
|
+
from .person import Person as Person
|
|
11
|
+
from .segment import Segment as Segment
|
|
12
|
+
from .website import Website as Website
|
|
13
|
+
from .document import Document as Document
|
|
14
|
+
from .location import Location as Location
|
|
15
|
+
from .id_number import IDNumber as IDNumber
|
|
16
|
+
from .phone_number import PhoneNumber as PhoneNumber
|
|
17
|
+
from .crossreference import Crossreference as Crossreference
|
|
18
|
+
from .external_document import ExternalDocument as ExternalDocument
|
|
5
19
|
from .embedding_response import EmbeddingResponse as EmbeddingResponse
|
|
6
20
|
from .reranking_response import RerankingResponse as RerankingResponse
|
|
7
21
|
from .enrichment_response import EnrichmentResponse as EnrichmentResponse
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .span import Span
|
|
4
|
+
from .._models import BaseModel
|
|
5
|
+
|
|
6
|
+
__all__ = ["Crossreference"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Crossreference(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: Span
|
|
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
|
+
"""
|
|
@@ -0,0 +1,70 @@
|
|
|
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__ = ["Date"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Date(BaseModel):
|
|
13
|
+
"""
|
|
14
|
+
A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
|
|
15
|
+
|
|
16
|
+
Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
value: str
|
|
20
|
+
"""The date in ISO 8601 format (YYYY-MM-DD)."""
|
|
21
|
+
|
|
22
|
+
type: Literal["creation", "signature", "effective", "expiry", "delivery", "renewal", "payment", "birth", "death"]
|
|
23
|
+
"""
|
|
24
|
+
The type of the date, being one of `creation`, `signature`, `effective`,
|
|
25
|
+
`expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. If a date is
|
|
26
|
+
mentioned in a document that does not fit into a supported type, it will not be
|
|
27
|
+
extracted.
|
|
28
|
+
|
|
29
|
+
`creation` denotes the date the document was created. There may only be one
|
|
30
|
+
`creation` date per document.
|
|
31
|
+
|
|
32
|
+
`signature` denotes the date the document was signed.
|
|
33
|
+
|
|
34
|
+
`effective` denotes the date when the document or a part thereof comes into
|
|
35
|
+
effect (e.g., commencement or enactment dates).
|
|
36
|
+
|
|
37
|
+
`expiry` denotes the date when the document or a part thereof is no longer in
|
|
38
|
+
effect.
|
|
39
|
+
|
|
40
|
+
`delivery` denotes the date when goods or services are to be delivered under the
|
|
41
|
+
document.
|
|
42
|
+
|
|
43
|
+
`renewal` denotes the date when one or more of the document's terms are to be
|
|
44
|
+
renewed.
|
|
45
|
+
|
|
46
|
+
`payment` denotes the date when payment is to be made under the document.
|
|
47
|
+
|
|
48
|
+
`birth` denotes the birth date of a natural person or establishment (e.g.,
|
|
49
|
+
incorporation) date of a non-natural legal person identified in the document.
|
|
50
|
+
There can only be one `birth` date linked to a single person and all `birth`
|
|
51
|
+
dates must be linked to a person. A person's `birth` date will never be after
|
|
52
|
+
their `death` date.
|
|
53
|
+
|
|
54
|
+
`death` denotes the death date of a natural person or dissolution date of a
|
|
55
|
+
non-natural legal person identified in the document. There can only be one
|
|
56
|
+
`death` date linked to a single person and all `death` dates must be linked to a
|
|
57
|
+
person. A person's `death` date will never be before their `birth` date.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
person: Optional[str] = None
|
|
61
|
+
"""
|
|
62
|
+
A unique identifier for a legal person in the format `per:{index}` where
|
|
63
|
+
`{index}` is a non-negative incrementing integer starting from zero.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
mentions: List[Span]
|
|
67
|
+
"""
|
|
68
|
+
An array of one or more spans within the document's text where the date is
|
|
69
|
+
mentioned.
|
|
70
|
+
"""
|