Skip to content

Commit 1f9c511

Browse files
feat(sdk): move ilgs structs around
1 parent d07d94d commit 1f9c511

19 files changed

+146
-140
lines changed

.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: ed02aaf8b97a6f9e13463c741be2a12f
4+
config_hash: 8608b9490f9a482b18bd8f733d2c82f6

api.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,27 @@ Methods:
6262

6363
- <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>
6464

65-
# ILGSv1
65+
# ILGS
66+
67+
## v1
6668

6769
Types:
6870

6971
```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,
72+
from isaacus.types.ilgs import (
73+
ILGSv1Crossreference,
74+
ILGSv1Date,
75+
ILGSv1Document,
76+
ILGSv1Email,
77+
ILGSv1ExternalDocument,
78+
ILGSv1IDNumber,
79+
ILGSv1Location,
80+
ILGSv1Person,
81+
ILGSv1PhoneNumber,
82+
ILGSv1Quote,
83+
ILGSv1Segment,
84+
ILGSv1Span,
85+
ILGSv1Term,
86+
ILGSv1Website,
8587
)
8688
```

src/isaacus/types/__init__.py

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

33
from __future__ import annotations
44

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
195
from .embedding_response import EmbeddingResponse as EmbeddingResponse
206
from .reranking_response import RerankingResponse as RerankingResponse
217
from .enrichment_response import EnrichmentResponse as EnrichmentResponse

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 .document import Document
6+
from .ilgs.ilgs_v1_document import ILGSv1Document
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: Document
20+
document: ILGSv1Document
2121
"""The enriched document."""
2222

2323

src/isaacus/types/ilgs/__init__.py

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 .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 .ilgs_v1_phone_number import ILGSv1PhoneNumber as ILGSv1PhoneNumber
17+
from .ilgs_v1_crossreference import ILGSv1Crossreference as ILGSv1Crossreference
18+
from .ilgs_v1_external_document import ILGSv1ExternalDocument as ILGSv1ExternalDocument

src/isaacus/types/crossreference.py renamed to src/isaacus/types/ilgs/ilgs_v1_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 .span import Span
4-
from .._models import BaseModel
3+
from ..._models import BaseModel
4+
from .ilgs_v1_span import ILGSv1Span
55

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

88

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

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

28-
span: Span
28+
span: ILGSv1Span
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 .span import Span
7-
from .._models import BaseModel
6+
from ..._models import BaseModel
7+
from .ilgs_v1_span import ILGSv1Span
88

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

1111

12-
class Date(BaseModel):
12+
class ILGSv1Date(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 Date(BaseModel):
6363
`{index}` is a non-negative incrementing integer starting from zero.
6464
"""
6565

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

src/isaacus/types/document.py renamed to src/isaacus/types/ilgs/ilgs_v1_document.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
from typing import List, Optional
44
from typing_extensions import Literal
55

6-
from .date import Date
7-
from .span import Span
8-
from .term import Term
9-
from .email import Email
10-
from .quote import Quote
11-
from .person import Person
12-
from .segment import Segment
13-
from .website import Website
14-
from .._models import BaseModel
15-
from .location import Location
16-
from .id_number import IDNumber
17-
from .phone_number import PhoneNumber
18-
from .crossreference import Crossreference
19-
from .external_document import ExternalDocument
20-
21-
__all__ = ["Document"]
22-
23-
24-
class Document(BaseModel):
6+
from ..._models import BaseModel
7+
from .ilgs_v1_date import ILGSv1Date
8+
from .ilgs_v1_span import ILGSv1Span
9+
from .ilgs_v1_term import ILGSv1Term
10+
from .ilgs_v1_email import ILGSv1Email
11+
from .ilgs_v1_quote import ILGSv1Quote
12+
from .ilgs_v1_person import ILGSv1Person
13+
from .ilgs_v1_segment import ILGSv1Segment
14+
from .ilgs_v1_website import ILGSv1Website
15+
from .ilgs_v1_location import ILGSv1Location
16+
from .ilgs_v1_id_number import ILGSv1IDNumber
17+
from .ilgs_v1_phone_number import ILGSv1PhoneNumber
18+
from .ilgs_v1_crossreference import ILGSv1Crossreference
19+
from .ilgs_v1_external_document import ILGSv1ExternalDocument
20+
21+
__all__ = ["ILGSv1Document"]
22+
23+
24+
class ILGSv1Document(BaseModel):
2525
"""The enriched document."""
2626

27-
title: Optional[Span] = None
27+
title: Optional[ILGSv1Span] = None
2828
"""A zero-based, half-open span into the Unicode code point space of input text.
2929
3030
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -40,7 +40,7 @@ class Document(BaseModel):
4040
code units instead of Unicode code points).
4141
"""
4242

43-
subtitle: Optional[Span] = None
43+
subtitle: Optional[ILGSv1Span] = None
4444
"""A zero-based, half-open span into the Unicode code point space of input text.
4545
4646
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -88,25 +88,25 @@ class Document(BaseModel):
8888
code for federal law.
8989
"""
9090

91-
segments: List[Segment]
91+
segments: List[ILGSv1Segment]
9292
"""
9393
An array of segments within the document representing structurally distinct
9494
portions of its content.
9595
"""
9696

97-
crossreferences: List[Crossreference]
97+
crossreferences: List[ILGSv1Crossreference]
9898
"""
9999
An array of cross-references within the document pointing to a single segment or
100100
a span of segments.
101101
"""
102102

103-
locations: List[Location]
103+
locations: List[ILGSv1Location]
104104
"""An array of locations identified in the document."""
105105

106-
persons: List[Person]
106+
persons: List[ILGSv1Person]
107107
"""An array of legal persons identified in the document."""
108108

109-
emails: List[Email]
109+
emails: List[ILGSv1Email]
110110
"""
111111
An array of email addresses identified in the document belonging to legal
112112
persons.
@@ -115,14 +115,14 @@ class Document(BaseModel):
115115
persons will not be extracted.
116116
"""
117117

118-
websites: List[Website]
118+
websites: List[ILGSv1Website]
119119
"""An array of websites identified in the document belonging to legal persons.
120120
121121
Websites mentioned in the document that are not attributable to legal persons
122122
will not be extracted.
123123
"""
124124

125-
phone_numbers: List[PhoneNumber]
125+
phone_numbers: List[ILGSv1PhoneNumber]
126126
"""
127127
An array of valid phone numbers identified in the document belonging to legal
128128
persons.
@@ -131,7 +131,7 @@ class Document(BaseModel):
131131
attributable to legal persons will not be extracted.
132132
"""
133133

134-
id_numbers: List[IDNumber]
134+
id_numbers: List[ILGSv1IDNumber]
135135
"""
136136
An array of identification numbers identified in the document belonging to legal
137137
persons.
@@ -140,16 +140,16 @@ class Document(BaseModel):
140140
legal persons will not be extracted.
141141
"""
142142

143-
terms: List[Term]
143+
terms: List[ILGSv1Term]
144144
"""An array of terms assigned definite meanings within the document."""
145145

146-
external_documents: List[ExternalDocument]
146+
external_documents: List[ILGSv1ExternalDocument]
147147
"""An array of documents identified within the document."""
148148

149-
quotes: List[Quote]
149+
quotes: List[ILGSv1Quote]
150150
"""An array of quotations within the document."""
151151

152-
dates: List[Date]
152+
dates: List[ILGSv1Date]
153153
"""
154154
An array of dates identified in the document belonging to one of the following
155155
types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`,
@@ -159,10 +159,10 @@ class Document(BaseModel):
159159
one of the supported date types are extractable.
160160
"""
161161

162-
headings: List[Span]
162+
headings: List[ILGSv1Span]
163163
"""An array of spans within the document's text constituting headings."""
164164

165-
junk: List[Span]
165+
junk: List[ILGSv1Span]
166166
"""
167167
An array of spans within the document's text constituting non-operative,
168168
non-substantive 'junk' content such as headers, footers, page numbers, and OCR
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from typing import List
44

5-
from .span import Span
6-
from .._models import BaseModel
5+
from ..._models import BaseModel
6+
from .ilgs_v1_span import ILGSv1Span
77

8-
__all__ = ["Email"]
8+
__all__ = ["ILGSv1Email"]
99

1010

11-
class Email(BaseModel):
11+
class ILGSv1Email(BaseModel):
1212
"""An email address identified in a document belonging to a legal person.
1313
1414
If an email address was mentioned in the document but is not attributable to a legal person, it will not be extracted.
@@ -20,7 +20,7 @@ class Email(BaseModel):
2020
person: str
2121
"""The unique identifier of the person that this email address belongs to."""
2222

23-
mentions: List[Span]
23+
mentions: List[ILGSv1Span]
2424
"""
2525
An array of one or more spans within the document's text where the email address
2626
is mentioned.

src/isaacus/types/external_document.py renamed to src/isaacus/types/ilgs/ilgs_v1_external_document.py

Lines changed: 7 additions & 7 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 .span import Span
7-
from .._models import BaseModel
6+
from ..._models import BaseModel
7+
from .ilgs_v1_span import ILGSv1Span
88

9-
__all__ = ["ExternalDocument"]
9+
__all__ = ["ILGSv1ExternalDocument"]
1010

1111

12-
class ExternalDocument(BaseModel):
12+
class ILGSv1ExternalDocument(BaseModel):
1313
"""A document identified within another document."""
1414

1515
id: str
@@ -18,7 +18,7 @@ class ExternalDocument(BaseModel):
1818
`{index}` is a non-negative incrementing integer starting from zero.
1919
"""
2020

21-
name: Span
21+
name: ILGSv1Span
2222
"""A zero-based, half-open span into the Unicode code point space of input text.
2323
2424
All spans are globally laminar and well-nested similar to XML—it is impossible
@@ -86,14 +86,14 @@ class ExternalDocument(BaseModel):
8686
expressing any particular sentiment towards it.
8787
"""
8888

89-
mentions: List[Span]
89+
mentions: List[ILGSv1Span]
9090
"""
9191
An array of one or more spans within the document's text where the external
9292
document is mentioned by name, for example, 'the US Constitution' in 'the Second
9393
Amendment to the US Constitution protects freedom of speech'.
9494
"""
9595

96-
pinpoints: List[Span]
96+
pinpoints: List[ILGSv1Span]
9797
"""
9898
An array of spans within the document's text where specific parts of the
9999
external document are referenced, for example, 'Section 2' in 'as defined in

0 commit comments

Comments
 (0)