isaacus 0.6.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/_utils/_proxy.py +4 -1
- isaacus/_utils/_resources_proxy.py +24 -0
- isaacus/_version.py +1 -1
- isaacus/types/extractions/answer_extraction.py +2 -1
- {isaacus-0.6.0.dist-info → isaacus-0.6.1.dist-info}/METADATA +2 -2
- {isaacus-0.6.0.dist-info → isaacus-0.6.1.dist-info}/RECORD +9 -8
- {isaacus-0.6.0.dist-info → isaacus-0.6.1.dist-info}/WHEEL +0 -0
- {isaacus-0.6.0.dist-info → isaacus-0.6.1.dist-info}/licenses/LICENSE +0 -0
isaacus/__init__.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
import typing as _t
|
4
|
+
|
3
5
|
from . import types
|
4
6
|
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
5
7
|
from ._utils import file_from_path
|
@@ -68,6 +70,9 @@ __all__ = [
|
|
68
70
|
"DefaultAsyncHttpxClient",
|
69
71
|
]
|
70
72
|
|
73
|
+
if not _t.TYPE_CHECKING:
|
74
|
+
from ._utils._resources_proxy import resources as resources
|
75
|
+
|
71
76
|
_setup_logging()
|
72
77
|
|
73
78
|
# Update the __module__ attribute for exported symbols so that
|
isaacus/_utils/_proxy.py
CHANGED
@@ -46,7 +46,10 @@ class LazyProxy(Generic[T], ABC):
|
|
46
46
|
@property # type: ignore
|
47
47
|
@override
|
48
48
|
def __class__(self) -> type: # pyright: ignore
|
49
|
-
|
49
|
+
try:
|
50
|
+
proxied = self.__get_proxied__()
|
51
|
+
except Exception:
|
52
|
+
return type(self)
|
50
53
|
if issubclass(type(proxied), LazyProxy):
|
51
54
|
return type(proxied)
|
52
55
|
return proxied.__class__
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import Any
|
4
|
+
from typing_extensions import override
|
5
|
+
|
6
|
+
from ._proxy import LazyProxy
|
7
|
+
|
8
|
+
|
9
|
+
class ResourcesProxy(LazyProxy[Any]):
|
10
|
+
"""A proxy for the `isaacus.resources` module.
|
11
|
+
|
12
|
+
This is used so that we can lazily import `isaacus.resources` only when
|
13
|
+
needed *and* so that users can just import `isaacus` and reference `isaacus.resources`
|
14
|
+
"""
|
15
|
+
|
16
|
+
@override
|
17
|
+
def __load__(self) -> Any:
|
18
|
+
import importlib
|
19
|
+
|
20
|
+
mod = importlib.import_module("isaacus.resources")
|
21
|
+
return mod
|
22
|
+
|
23
|
+
|
24
|
+
resources = ResourcesProxy().__as_proxied__()
|
isaacus/_version.py
CHANGED
@@ -61,7 +61,8 @@ class AnswerExtraction(BaseModel):
|
|
61
61
|
extractions: List[Extraction]
|
62
62
|
"""
|
63
63
|
The results of extracting answers from the texts, ordered from highest to lowest
|
64
|
-
inextractability score
|
64
|
+
answer confidence score (or else lowest to highest inextractability score if
|
65
|
+
there are no answers for a text).
|
65
66
|
"""
|
66
67
|
|
67
68
|
usage: Usage
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: isaacus
|
3
|
-
Version: 0.6.
|
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,4 +1,4 @@
|
|
1
|
-
isaacus/__init__.py,sha256=
|
1
|
+
isaacus/__init__.py,sha256=wr6ddQI6xaQxDY-GoGzbBSqxrHcTB0JXRu35iJSo4f8,2537
|
2
2
|
isaacus/_base_client.py,sha256=ppcrw3sdH8GjKCCOzQq8IFBYxDeZUc7b7ABov3VPbYI,64055
|
3
3
|
isaacus/_client.py,sha256=-2sN8vyAm_qN2P6JuLxKel6BfvA6mragbo4TPOwLs3Y,16544
|
4
4
|
isaacus/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
@@ -11,12 +11,13 @@ isaacus/_resource.py,sha256=iP_oYhz5enCI58mK7hlwLoPMPh4Q5s8-KBv-jGfv2aM,1106
|
|
11
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
|
@@ -38,9 +39,9 @@ isaacus/types/classifications/__init__.py,sha256=GX6WFRzjx9qcuJhdRZjFLJRYMM4d5J8
|
|
38
39
|
isaacus/types/classifications/universal_classification.py,sha256=qeAaPg26wXDq1R_93SZIDzTp9AkfLRMucpd6Tie7NNU,2438
|
39
40
|
isaacus/types/classifications/universal_create_params.py,sha256=0RYreNEY9j5BqxJLMoDxIvibYZnCZcNTFN0zERz7kpg,2277
|
40
41
|
isaacus/types/extractions/__init__.py,sha256=9FahSE48xCUSAdkb1DaqRBBznuQ805lmRdlY22iLtQw,254
|
41
|
-
isaacus/types/extractions/answer_extraction.py,sha256=
|
42
|
+
isaacus/types/extractions/answer_extraction.py,sha256=KIqfIsdlYAAjDDwzM8XuFOW_1u5zv34RWbIa3WchBxc,2152
|
42
43
|
isaacus/types/extractions/qa_create_params.py,sha256=iaGIDnuJ8Kek5jW6QMQdbAQJYYiihcjZ1k_iSDbt1Mk,2065
|
43
|
-
isaacus-0.6.
|
44
|
-
isaacus-0.6.
|
45
|
-
isaacus-0.6.
|
46
|
-
isaacus-0.6.
|
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
|