Skip to content

Commit 8620bb5

Browse files
feat(sdk): move ilgsv1 resources under a subresource
1 parent 99ffc93 commit 8620bb5

23 files changed

Lines changed: 182 additions & 151 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
33
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
4-
config_hash: a23e347480e00cefa57ce68b1de9e16d
4+
config_hash: 6989204ddc6219d42aeefea50912c031

api.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,32 @@ Methods:
5555
Types:
5656

5757
```python
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-
)
58+
from isaacus.types import EnrichmentResponse
7559
```
7660

7761
Methods:
7862

79-
- <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>
63+
- <code title="post /enrichments">client.enrichments.<a href="./src/isaacus/resources/enrichments/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.enrichments 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+
```

src/isaacus/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .resources import embeddings, rerankings, enrichments, extractions, classifications
3535
from .resources.embeddings import EmbeddingsResource, AsyncEmbeddingsResource
3636
from .resources.rerankings import RerankingsResource, AsyncRerankingsResource
37-
from .resources.enrichments import EnrichmentsResource, AsyncEnrichmentsResource
37+
from .resources.enrichments.enrichments import EnrichmentsResource, AsyncEnrichmentsResource
3838
from .resources.extractions.extractions import ExtractionsResource, AsyncExtractionsResource
3939
from .resources.classifications.classifications import ClassificationsResource, AsyncClassificationsResource
4040

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .enrichments import (
4+
EnrichmentsResource,
5+
AsyncEnrichmentsResource,
6+
EnrichmentsResourceWithRawResponse,
7+
AsyncEnrichmentsResourceWithRawResponse,
8+
EnrichmentsResourceWithStreamingResponse,
9+
AsyncEnrichmentsResourceWithStreamingResponse,
10+
)
11+
12+
__all__ = [
13+
"EnrichmentsResource",
14+
"AsyncEnrichmentsResource",
15+
"EnrichmentsResourceWithRawResponse",
16+
"AsyncEnrichmentsResourceWithRawResponse",
17+
"EnrichmentsResourceWithStreamingResponse",
18+
"AsyncEnrichmentsResourceWithStreamingResponse",
19+
]

src/isaacus/resources/enrichments.py renamed to src/isaacus/resources/enrichments/enrichments.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
import httpx
99

10-
from ..types import enrichment_create_params
11-
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
12-
from .._utils import maybe_transform, async_maybe_transform
13-
from .._compat import cached_property
14-
from .._resource import SyncAPIResource, AsyncAPIResource
15-
from .._response import (
10+
from ...types import enrichment_create_params
11+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
12+
from ..._utils import maybe_transform, async_maybe_transform
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
from ..._response import (
1616
to_raw_response_wrapper,
1717
to_streamed_response_wrapper,
1818
async_to_raw_response_wrapper,
1919
async_to_streamed_response_wrapper,
2020
)
21-
from .._base_client import make_request_options
22-
from ..types.enrichment_response import EnrichmentResponse
21+
from ..._base_client import make_request_options
22+
from ...types.enrichment_response import EnrichmentResponse
2323

2424
__all__ = ["EnrichmentsResource", "AsyncEnrichmentsResource"]
2525

src/isaacus/types/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,9 @@
22

33
from __future__ import annotations
44

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
165
from .embedding_response import EmbeddingResponse as EmbeddingResponse
176
from .reranking_response import RerankingResponse as RerankingResponse
187
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
218
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
229
from .reranking_create_params import RerankingCreateParams as RerankingCreateParams
2310
from .enrichment_create_params import EnrichmentCreateParams as EnrichmentCreateParams
24-
from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument

src/isaacus/types/enrichment_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import List
44

55
from .._models import BaseModel
6-
from .ilgs_v1_document import ILGSv1Document
6+
from .enrichments.document import Document
77

88
__all__ = ["EnrichmentResponse", "Result", "Usage"]
99

@@ -17,7 +17,7 @@ class Result(BaseModel):
1717
therefore, ending at the number of inputs minus `1`).
1818
"""
1919

20-
document: ILGSv1Document
20+
document: Document
2121
"""The enriched document."""
2222

2323

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
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

src/isaacus/types/ilgs_v1_crossreference.py renamed to src/isaacus/types/enrichments/crossreference.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from .._models import BaseModel
4-
from .ilgs_v1_span import ILGSv1Span
3+
from .span import Span
4+
from ..._models import BaseModel
55

6-
__all__ = ["ILGSv1Crossreference"]
6+
__all__ = ["Crossreference"]
77

88

9-
class ILGSv1Crossreference(BaseModel):
9+
class Crossreference(BaseModel):
1010
"""A cross-reference within the document pointing to one or more segments."""
1111

1212
start: str
@@ -25,7 +25,7 @@ class ILGSv1Crossreference(BaseModel):
2525
will be identical.
2626
"""
2727

28-
span: ILGSv1Span
28+
span: Span
2929
"""A zero-based, half-open span into the Unicode code point space of input text.
3030
3131
All spans are globally laminar and well-nested similar to XML—it is impossible
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from typing import List, Optional
44
from typing_extensions import Literal
55

6-
from .._models import BaseModel
7-
from .ilgs_v1_span import ILGSv1Span
6+
from .span import Span
7+
from ..._models import BaseModel
88

9-
__all__ = ["ILGSv1Date"]
9+
__all__ = ["Date"]
1010

1111

12-
class ILGSv1Date(BaseModel):
12+
class Date(BaseModel):
1313
"""
1414
A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`.
1515
@@ -63,7 +63,7 @@ class ILGSv1Date(BaseModel):
6363
`{index}` is a non-negative incrementing integer starting from zero.
6464
"""
6565

66-
mentions: List[ILGSv1Span]
66+
mentions: List[Span]
6767
"""
6868
An array of one or more spans within the document's text where the date is
6969
mentioned.

0 commit comments

Comments
 (0)