isaacus 0.11.0__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.
Files changed (112) hide show
  1. isaacus-0.12.0/.release-please-manifest.json +3 -0
  2. {isaacus-0.11.0 → isaacus-0.12.0}/CHANGELOG.md +16 -0
  3. {isaacus-0.11.0 → isaacus-0.12.0}/PKG-INFO +1 -1
  4. {isaacus-0.11.0 → isaacus-0.12.0}/api.md +18 -2
  5. {isaacus-0.11.0 → isaacus-0.12.0}/pyproject.toml +1 -1
  6. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_version.py +1 -1
  7. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/extractions/__init__.py +12 -12
  8. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/extractions/extractions.py +18 -18
  9. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/extractions/qa.py +29 -29
  10. isaacus-0.12.0/src/isaacus/types/__init__.py +24 -0
  11. isaacus-0.12.0/src/isaacus/types/enrichment_response.py +60 -0
  12. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/extractions/__init__.py +1 -1
  13. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/extractions/qa_create_params.py +8 -8
  14. isaacus-0.12.0/src/isaacus/types/ilgs_v1_crossreference.py +42 -0
  15. isaacus-0.12.0/src/isaacus/types/ilgs_v1_date.py +70 -0
  16. isaacus-0.12.0/src/isaacus/types/ilgs_v1_document.py +172 -0
  17. isaacus-0.12.0/src/isaacus/types/ilgs_v1_email.py +27 -0
  18. isaacus-0.12.0/src/isaacus/types/ilgs_v1_external_document.py +101 -0
  19. isaacus-0.12.0/src/isaacus/types/ilgs_v1_id_number.py +27 -0
  20. isaacus-0.12.0/src/isaacus/types/ilgs_v1_location.py +53 -0
  21. isaacus-0.12.0/src/isaacus/types/ilgs_v1_person.py +195 -0
  22. isaacus-0.12.0/src/isaacus/types/ilgs_v1_phone_number.py +30 -0
  23. isaacus-0.12.0/src/isaacus/types/ilgs_v1_quote.py +52 -0
  24. isaacus-0.12.0/src/isaacus/types/ilgs_v1_segment.py +205 -0
  25. isaacus-0.12.0/src/isaacus/types/ilgs_v1_span.py +28 -0
  26. isaacus-0.12.0/src/isaacus/types/ilgs_v1_term.py +59 -0
  27. isaacus-0.12.0/src/isaacus/types/ilgs_v1_website.py +28 -0
  28. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/extractions/test_qa.py +8 -8
  29. isaacus-0.11.0/.release-please-manifest.json +0 -3
  30. isaacus-0.11.0/src/isaacus/types/__init__.py +0 -10
  31. isaacus-0.11.0/src/isaacus/types/enrichment_response.py +0 -1458
  32. {isaacus-0.11.0 → isaacus-0.12.0}/.gitignore +0 -0
  33. {isaacus-0.11.0 → isaacus-0.12.0}/CONTRIBUTING.md +0 -0
  34. {isaacus-0.11.0 → isaacus-0.12.0}/LICENSE +0 -0
  35. {isaacus-0.11.0 → isaacus-0.12.0}/README.md +0 -0
  36. {isaacus-0.11.0 → isaacus-0.12.0}/SECURITY.md +0 -0
  37. {isaacus-0.11.0 → isaacus-0.12.0}/bin/check-release-environment +0 -0
  38. {isaacus-0.11.0 → isaacus-0.12.0}/bin/publish-pypi +0 -0
  39. {isaacus-0.11.0 → isaacus-0.12.0}/examples/.keep +0 -0
  40. {isaacus-0.11.0 → isaacus-0.12.0}/noxfile.py +0 -0
  41. {isaacus-0.11.0 → isaacus-0.12.0}/release-please-config.json +0 -0
  42. {isaacus-0.11.0 → isaacus-0.12.0}/requirements-dev.lock +0 -0
  43. {isaacus-0.11.0 → isaacus-0.12.0}/requirements.lock +0 -0
  44. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/__init__.py +0 -0
  45. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_base_client.py +0 -0
  46. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_client.py +0 -0
  47. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_compat.py +0 -0
  48. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_constants.py +0 -0
  49. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_exceptions.py +0 -0
  50. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_files.py +0 -0
  51. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_models.py +0 -0
  52. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_qs.py +0 -0
  53. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_resource.py +0 -0
  54. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_response.py +0 -0
  55. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_streaming.py +0 -0
  56. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_types.py +0 -0
  57. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/__init__.py +0 -0
  58. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_compat.py +0 -0
  59. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_datetime_parse.py +0 -0
  60. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_json.py +0 -0
  61. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_logs.py +0 -0
  62. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_proxy.py +0 -0
  63. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_reflection.py +0 -0
  64. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_resources_proxy.py +0 -0
  65. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_streams.py +0 -0
  66. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_sync.py +0 -0
  67. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_transform.py +0 -0
  68. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_typing.py +0 -0
  69. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/_utils/_utils.py +0 -0
  70. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/lib/.keep +0 -0
  71. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/py.typed +0 -0
  72. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/__init__.py +0 -0
  73. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/classifications/__init__.py +0 -0
  74. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/classifications/classifications.py +0 -0
  75. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/classifications/universal.py +8 -8
  76. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/embeddings.py +24 -24
  77. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/enrichments.py +0 -0
  78. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/resources/rerankings.py +12 -12
  79. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/classifications/__init__.py +0 -0
  80. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/classifications/universal_classification_response.py +22 -22
  81. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/classifications/universal_create_params.py +6 -6
  82. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/embedding_create_params.py +11 -11
  83. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/embedding_response.py +3 -3
  84. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/enrichment_create_params.py +0 -0
  85. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/extractions/answer_extraction_response.py +12 -12
  86. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/reranking_create_params.py +7 -7
  87. {isaacus-0.11.0 → isaacus-0.12.0}/src/isaacus/types/reranking_response.py +0 -0
  88. {isaacus-0.11.0 → isaacus-0.12.0}/tests/__init__.py +0 -0
  89. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/__init__.py +0 -0
  90. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/classifications/__init__.py +0 -0
  91. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/classifications/test_universal.py +6 -6
  92. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/extractions/__init__.py +0 -0
  93. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/test_embeddings.py +4 -4
  94. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/test_enrichments.py +0 -0
  95. {isaacus-0.11.0 → isaacus-0.12.0}/tests/api_resources/test_rerankings.py +8 -8
  96. {isaacus-0.11.0 → isaacus-0.12.0}/tests/conftest.py +0 -0
  97. {isaacus-0.11.0 → isaacus-0.12.0}/tests/sample_file.txt +0 -0
  98. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_client.py +0 -0
  99. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_deepcopy.py +0 -0
  100. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_extract_files.py +0 -0
  101. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_files.py +0 -0
  102. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_models.py +0 -0
  103. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_qs.py +0 -0
  104. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_required_args.py +0 -0
  105. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_response.py +0 -0
  106. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_streaming.py +0 -0
  107. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_transform.py +0 -0
  108. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_utils/test_datetime_parse.py +0 -0
  109. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_utils/test_json.py +0 -0
  110. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_utils/test_proxy.py +0 -0
  111. {isaacus-0.11.0 → isaacus-0.12.0}/tests/test_utils/test_typing.py +0 -0
  112. {isaacus-0.11.0 → isaacus-0.12.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.12.0"
3
+ }
@@ -1,5 +1,21 @@
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
+
3
19
  ## 0.11.0 (2026-02-03)
4
20
 
5
21
  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.11.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
- ## Qa
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 EnrichmentResponse
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:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "isaacus"
3
- version = "0.11.0"
3
+ version = "0.12.0"
4
4
  description = "The official Python library for the isaacus API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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.11.0" # x-release-please-version
4
+ __version__ = "0.12.0" # x-release-please-version
@@ -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(
@@ -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
@@ -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."""
@@ -2,5 +2,5 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from .qa_create_params import QaCreateParams as QaCreateParams
5
+ from .qa_create_params import QACreateParams as QACreateParams
6
6
  from .answer_extraction_response import AnswerExtractionResponse as AnswerExtractionResponse
@@ -7,10 +7,10 @@ from typing_extensions import Literal, Required, TypedDict
7
7
 
8
8
  from ..._types import SequenceNotStr
9
9
 
10
- __all__ = ["QaCreateParams", "ChunkingOptions"]
10
+ __all__ = ["QACreateParams", "ChunkingOptions"]
11
11
 
12
12
 
13
- class QaCreateParams(TypedDict, total=False):
13
+ class QACreateParams(TypedDict, total=False):
14
14
  model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
15
15
  """
16
16
  The ID of the
@@ -35,9 +35,6 @@ class QaCreateParams(TypedDict, total=False):
35
35
  Each text must contain at least one non-whitespace character.
36
36
  """
37
37
 
38
- chunking_options: Optional[ChunkingOptions]
39
- """Options for how to split text into smaller chunks."""
40
-
41
38
  ignore_inextractability: bool
42
39
  """
43
40
  Whether to, if the model's score of the likelihood that an answer can not be
@@ -55,15 +52,18 @@ class QaCreateParams(TypedDict, total=False):
55
52
  If `null`, which is the default, all answers will be returned.
56
53
  """
57
54
 
55
+ chunking_options: Optional[ChunkingOptions]
56
+ """Options for how to split text into smaller chunks."""
57
+
58
58
 
59
59
  class ChunkingOptions(TypedDict, total=False):
60
60
  """Options for how to split text into smaller chunks."""
61
61
 
62
+ size: Optional[int]
63
+ """A whole number greater than or equal to 1."""
64
+
62
65
  overlap_ratio: Optional[float]
63
66
  """A number greater than or equal to 0 and less than 1."""
64
67
 
65
68
  overlap_tokens: Optional[int]
66
69
  """A whole number greater than or equal to 0."""
67
-
68
- size: Optional[int]
69
- """A whole number greater than or equal to 1."""
@@ -0,0 +1,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
+ """
@@ -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 .._models import BaseModel
7
+ from .ilgs_v1_span import ILGSv1Span
8
+
9
+ __all__ = ["ILGSv1Date"]
10
+
11
+
12
+ class ILGSv1Date(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[ILGSv1Span]
67
+ """
68
+ An array of one or more spans within the document's text where the date is
69
+ mentioned.
70
+ """