isaacus 0.5.0__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- isaacus/__init__.py +5 -0
- isaacus/_base_client.py +175 -239
- isaacus/_client.py +10 -4
- isaacus/_models.py +2 -2
- isaacus/_response.py +1 -1
- isaacus/_utils/_proxy.py +4 -1
- isaacus/_utils/_resources_proxy.py +24 -0
- isaacus/_utils/_utils.py +9 -1
- isaacus/_version.py +1 -1
- isaacus/resources/__init__.py +14 -0
- isaacus/resources/classifications/universal.py +3 -6
- isaacus/resources/extractions/__init__.py +33 -0
- isaacus/resources/extractions/extractions.py +102 -0
- isaacus/resources/extractions/qa.py +258 -0
- isaacus/resources/rerankings.py +3 -6
- isaacus/types/classifications/universal_create_params.py +1 -1
- isaacus/types/extractions/__init__.py +6 -0
- isaacus/types/extractions/answer_extraction.py +72 -0
- isaacus/types/extractions/qa_create_params.py +64 -0
- isaacus/types/reranking_create_params.py +1 -1
- {isaacus-0.5.0.dist-info → isaacus-0.6.1.dist-info}/METADATA +2 -2
- {isaacus-0.5.0.dist-info → isaacus-0.6.1.dist-info}/RECORD +24 -17
- {isaacus-0.5.0.dist-info → isaacus-0.6.1.dist-info}/WHEEL +0 -0
- {isaacus-0.5.0.dist-info → isaacus-0.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import List, Optional
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
7
|
+
|
8
|
+
__all__ = ["QaCreateParams", "ChunkingOptions"]
|
9
|
+
|
10
|
+
|
11
|
+
class QaCreateParams(TypedDict, total=False):
|
12
|
+
model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
|
13
|
+
"""
|
14
|
+
The ID of the [model](https://docs.isaacus.com/models#extractive-qa) to use for
|
15
|
+
extractive question answering.
|
16
|
+
"""
|
17
|
+
|
18
|
+
query: Required[str]
|
19
|
+
"""The query to extract the answer to.
|
20
|
+
|
21
|
+
The query must contain at least one non-whitespace character.
|
22
|
+
|
23
|
+
Unlike the texts from which the answer will be extracted, the query cannot be so
|
24
|
+
long that it exceeds the maximum input length of the model.
|
25
|
+
"""
|
26
|
+
|
27
|
+
texts: Required[List[str]]
|
28
|
+
"""The texts to search for the answer in and extract the answer from.
|
29
|
+
|
30
|
+
There must be at least one text.
|
31
|
+
|
32
|
+
Each text must contain at least one non-whitespace character.
|
33
|
+
"""
|
34
|
+
|
35
|
+
chunking_options: Optional[ChunkingOptions]
|
36
|
+
"""Options for how to split text into smaller chunks."""
|
37
|
+
|
38
|
+
ignore_inextractability: bool
|
39
|
+
"""
|
40
|
+
Whether to, if the model's score of the likelihood that an answer can not be
|
41
|
+
extracted from a text is greater than the highest score of all possible answers,
|
42
|
+
still return the highest scoring answers for that text.
|
43
|
+
|
44
|
+
If you have already determined that the texts answer the query, for example, by
|
45
|
+
using one of our classification or reranker models, then you should set this to
|
46
|
+
`true`.
|
47
|
+
"""
|
48
|
+
|
49
|
+
top_k: int
|
50
|
+
"""The number of highest scoring answers to return.
|
51
|
+
|
52
|
+
If `null`, which is the default, all answers will be returned.
|
53
|
+
"""
|
54
|
+
|
55
|
+
|
56
|
+
class ChunkingOptions(TypedDict, total=False):
|
57
|
+
overlap_ratio: Optional[float]
|
58
|
+
"""A number greater than or equal to 0 and less than 1."""
|
59
|
+
|
60
|
+
overlap_tokens: Optional[int]
|
61
|
+
"""A whole number greater than -1."""
|
62
|
+
|
63
|
+
size: Optional[int]
|
64
|
+
"""A whole number greater than or equal to 1."""
|
@@ -29,7 +29,7 @@ class RerankingCreateParams(TypedDict, total=False):
|
|
29
29
|
|
30
30
|
There must be at least one text.
|
31
31
|
|
32
|
-
|
32
|
+
Each text must contain at least one non-whitespace character.
|
33
33
|
"""
|
34
34
|
|
35
35
|
chunking_options: Optional[ChunkingOptions]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: isaacus
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.1
|
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
|
@@ -131,7 +131,7 @@ universal_classification = client.classifications.universal.create(
|
|
131
131
|
"size": 512,
|
132
132
|
},
|
133
133
|
)
|
134
|
-
print(universal_classification.
|
134
|
+
print(universal_classification.classifications)
|
135
135
|
```
|
136
136
|
|
137
137
|
## Handling errors
|
@@ -1,40 +1,47 @@
|
|
1
|
-
isaacus/__init__.py,sha256=
|
2
|
-
isaacus/_base_client.py,sha256=
|
3
|
-
isaacus/_client.py,sha256
|
1
|
+
isaacus/__init__.py,sha256=wr6ddQI6xaQxDY-GoGzbBSqxrHcTB0JXRu35iJSo4f8,2537
|
2
|
+
isaacus/_base_client.py,sha256=ppcrw3sdH8GjKCCOzQq8IFBYxDeZUc7b7ABov3VPbYI,64055
|
3
|
+
isaacus/_client.py,sha256=-2sN8vyAm_qN2P6JuLxKel6BfvA6mragbo4TPOwLs3Y,16544
|
4
4
|
isaacus/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
5
|
isaacus/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
6
6
|
isaacus/_exceptions.py,sha256=L82uluhizzc94VydHIaJkNxkcG-2DAe74tNhrE2eN2A,3222
|
7
7
|
isaacus/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
|
8
|
-
isaacus/_models.py,sha256=
|
8
|
+
isaacus/_models.py,sha256=mB2r2VWQq49jG-F0RIXDrBxPp3v-Eg12wMOtVTNxtv4,29057
|
9
9
|
isaacus/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
10
10
|
isaacus/_resource.py,sha256=iP_oYhz5enCI58mK7hlwLoPMPh4Q5s8-KBv-jGfv2aM,1106
|
11
|
-
isaacus/_response.py,sha256=
|
11
|
+
isaacus/_response.py,sha256=aXLF5ia58bjjQXTxY574lh7JfKXiGL2tDTX09klm8lw,28794
|
12
12
|
isaacus/_streaming.py,sha256=tMBfwrfEFWm0v7vWFgjn_lizsoD70lPkYigIBuADaCM,10104
|
13
13
|
isaacus/_types.py,sha256=WCRAb8jikEJoOi8nza8l5NnOTKgZlpmN5fkiHoKoY08,6144
|
14
|
-
isaacus/_version.py,sha256=
|
14
|
+
isaacus/_version.py,sha256=mXn9Voi9RjCSKBeTeNhHxaqwo8_2Zcwq04UnPfptUUc,159
|
15
15
|
isaacus/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
isaacus/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
isaacus/_utils/_logs.py,sha256=rwa1Yzjbs2JaFn9KQ06rH5c_GSNa--BVwWnWhvvT1tY,777
|
18
|
-
isaacus/_utils/_proxy.py,sha256=
|
18
|
+
isaacus/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
19
19
|
isaacus/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
20
|
+
isaacus/_utils/_resources_proxy.py,sha256=vW2q6wobLs4JH9DnlVsdaotKEzn5bWqqe8WhNTAOv_k,594
|
20
21
|
isaacus/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
21
22
|
isaacus/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
22
23
|
isaacus/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
23
24
|
isaacus/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
24
|
-
isaacus/_utils/_utils.py,sha256=
|
25
|
+
isaacus/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
25
26
|
isaacus/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
26
|
-
isaacus/resources/__init__.py,sha256=
|
27
|
-
isaacus/resources/rerankings.py,sha256=
|
27
|
+
isaacus/resources/__init__.py,sha256=BFfbYDoVs497KDWA4AOZbtK2Wv8zx9pip4GZQphfGSI,1686
|
28
|
+
isaacus/resources/rerankings.py,sha256=V_6f8HIdW4N5GzA41U_fFxoD2pua8cndFg8et23rWsI,11174
|
28
29
|
isaacus/resources/classifications/__init__.py,sha256=tYSnDm-o0CVuTC95VoNJzOqHsb8jTzYmW8hdwW14K60,1158
|
29
30
|
isaacus/resources/classifications/classifications.py,sha256=Td5Gscg1PNJJeobxow_hJq_RicpFe3ibEYN0Gh3Kpsg,4018
|
30
|
-
isaacus/resources/classifications/universal.py,sha256=
|
31
|
+
isaacus/resources/classifications/universal.py,sha256=AyG0_P3Af0rQQAfDv9oTHLGzjsvyIH5c7eWgg2UWxT8,10677
|
32
|
+
isaacus/resources/extractions/__init__.py,sha256=24ccXv3kRlfXwnZJ4572kWNjJKiJ0Cd5vWeRkKCuMyY,1015
|
33
|
+
isaacus/resources/extractions/extractions.py,sha256=RaUnv1OG4i5J3JhpBNfpnxELpSHvmkqZmS2_DVL9Wvw,3671
|
34
|
+
isaacus/resources/extractions/qa.py,sha256=nPddCTtSxAyNVu4OCSjObeaGNWopm8_-eZuu345cCRo,9932
|
31
35
|
isaacus/types/__init__.py,sha256=PswomxWpSak5TApm_28hneqI_l_g0-4NF5W6kdedI0Y,253
|
32
36
|
isaacus/types/reranking.py,sha256=MQRUoH2UB185Q369H01jnvaT9pz4D9z0oOoz8oLMqjc,911
|
33
|
-
isaacus/types/reranking_create_params.py,sha256=
|
37
|
+
isaacus/types/reranking_create_params.py,sha256=eoZcGr0_o8o-NBZ9W7yqW4cZH5dhxMmfIM9jFtIiUu0,2481
|
34
38
|
isaacus/types/classifications/__init__.py,sha256=GX6WFRzjx9qcuJhdRZjFLJRYMM4d5J8F5N-BUq4ZgP0,296
|
35
39
|
isaacus/types/classifications/universal_classification.py,sha256=qeAaPg26wXDq1R_93SZIDzTp9AkfLRMucpd6Tie7NNU,2438
|
36
|
-
isaacus/types/classifications/universal_create_params.py,sha256=
|
37
|
-
isaacus
|
38
|
-
isaacus
|
39
|
-
isaacus
|
40
|
-
isaacus-0.
|
40
|
+
isaacus/types/classifications/universal_create_params.py,sha256=0RYreNEY9j5BqxJLMoDxIvibYZnCZcNTFN0zERz7kpg,2277
|
41
|
+
isaacus/types/extractions/__init__.py,sha256=9FahSE48xCUSAdkb1DaqRBBznuQ805lmRdlY22iLtQw,254
|
42
|
+
isaacus/types/extractions/answer_extraction.py,sha256=KIqfIsdlYAAjDDwzM8XuFOW_1u5zv34RWbIa3WchBxc,2152
|
43
|
+
isaacus/types/extractions/qa_create_params.py,sha256=iaGIDnuJ8Kek5jW6QMQdbAQJYYiihcjZ1k_iSDbt1Mk,2065
|
44
|
+
isaacus-0.6.1.dist-info/METADATA,sha256=DKStXBPJ7xD0C_Sbod0sChzemCCr63-EWjyMckbpH4E,14346
|
45
|
+
isaacus-0.6.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
46
|
+
isaacus-0.6.1.dist-info/licenses/LICENSE,sha256=lUen4LYVFVGEVXBsntBAPsQsOWgMkno1e9WfgWkpZ-k,11337
|
47
|
+
isaacus-0.6.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|