Skip to content

Commit 920e2bb

Browse files
feat(sdk): move ilgs structs around
1 parent d3068e3 commit 920e2bb

File tree

26 files changed

+100
-89
lines changed

26 files changed

+100
-89
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: b9cecef13213c698c51e03d64fe70185
4+
config_hash: 7b8cddc2fa896f9ab05e6b05055c7f27

api.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Methods:
3838

3939
# Extractions
4040

41-
## Qa
41+
## QA
4242

4343
Types:
4444

@@ -62,12 +62,16 @@ 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
68+
69+
### v1
6670

6771
Types:
6872

6973
```python
70-
from isaacus.types import (
74+
from isaacus.types.ilgs.v1 import (
7175
Crossreference,
7276
Date,
7377
Document,

src/isaacus/resources/extractions/__init__.py

Lines changed: 12 additions & 12 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

33
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,
1010
)
1111
from .extractions import (
1212
ExtractionsResource,
@@ -18,12 +18,12 @@
1818
)
1919

2020
__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",
2727
"ExtractionsResource",
2828
"AsyncExtractionsResource",
2929
"ExtractionsResourceWithRawResponse",

src/isaacus/resources/extractions/extractions.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from __future__ import annotations
44

55
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,
1212
)
1313
from ..._compat import cached_property
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -18,8 +18,8 @@
1818

1919
class ExtractionsResource(SyncAPIResource):
2020
@cached_property
21-
def qa(self) -> QaResource:
22-
return QaResource(self._client)
21+
def qa(self) -> QAResource:
22+
return QAResource(self._client)
2323

2424
@cached_property
2525
def with_raw_response(self) -> ExtractionsResourceWithRawResponse:
@@ -43,8 +43,8 @@ def with_streaming_response(self) -> ExtractionsResourceWithStreamingResponse:
4343

4444
class AsyncExtractionsResource(AsyncAPIResource):
4545
@cached_property
46-
def qa(self) -> AsyncQaResource:
47-
return AsyncQaResource(self._client)
46+
def qa(self) -> AsyncQAResource:
47+
return AsyncQAResource(self._client)
4848

4949
@cached_property
5050
def with_raw_response(self) -> AsyncExtractionsResourceWithRawResponse:
@@ -71,32 +71,32 @@ def __init__(self, extractions: ExtractionsResource) -> None:
7171
self._extractions = extractions
7272

7373
@cached_property
74-
def qa(self) -> QaResourceWithRawResponse:
75-
return QaResourceWithRawResponse(self._extractions.qa)
74+
def qa(self) -> QAResourceWithRawResponse:
75+
return QAResourceWithRawResponse(self._extractions.qa)
7676

7777

7878
class AsyncExtractionsResourceWithRawResponse:
7979
def __init__(self, extractions: AsyncExtractionsResource) -> None:
8080
self._extractions = extractions
8181

8282
@cached_property
83-
def qa(self) -> AsyncQaResourceWithRawResponse:
84-
return AsyncQaResourceWithRawResponse(self._extractions.qa)
83+
def qa(self) -> AsyncQAResourceWithRawResponse:
84+
return AsyncQAResourceWithRawResponse(self._extractions.qa)
8585

8686

8787
class ExtractionsResourceWithStreamingResponse:
8888
def __init__(self, extractions: ExtractionsResource) -> None:
8989
self._extractions = extractions
9090

9191
@cached_property
92-
def qa(self) -> QaResourceWithStreamingResponse:
93-
return QaResourceWithStreamingResponse(self._extractions.qa)
92+
def qa(self) -> QAResourceWithStreamingResponse:
93+
return QAResourceWithStreamingResponse(self._extractions.qa)
9494

9595

9696
class AsyncExtractionsResourceWithStreamingResponse:
9797
def __init__(self, extractions: AsyncExtractionsResource) -> None:
9898
self._extractions = extractions
9999

100100
@cached_property
101-
def qa(self) -> AsyncQaResourceWithStreamingResponse:
102-
return AsyncQaResourceWithStreamingResponse(self._extractions.qa)
101+
def qa(self) -> AsyncQAResourceWithStreamingResponse:
102+
return AsyncQAResourceWithStreamingResponse(self._extractions.qa)

src/isaacus/resources/extractions/qa.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@
2121
from ...types.extractions import qa_create_params
2222
from ...types.extractions.answer_extraction_response import AnswerExtractionResponse
2323

24-
__all__ = ["QaResource", "AsyncQaResource"]
24+
__all__ = ["QAResource", "AsyncQAResource"]
2525

2626

27-
class QaResource(SyncAPIResource):
27+
class QAResource(SyncAPIResource):
2828
@cached_property
29-
def with_raw_response(self) -> QaResourceWithRawResponse:
29+
def with_raw_response(self) -> QAResourceWithRawResponse:
3030
"""
3131
This property can be used as a prefix for any HTTP method call to return
3232
the raw response object instead of the parsed content.
3333
3434
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
3535
"""
36-
return QaResourceWithRawResponse(self)
36+
return QAResourceWithRawResponse(self)
3737

3838
@cached_property
39-
def with_streaming_response(self) -> QaResourceWithStreamingResponse:
39+
def with_streaming_response(self) -> QAResourceWithStreamingResponse:
4040
"""
4141
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4242
4343
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
4444
"""
45-
return QaResourceWithStreamingResponse(self)
45+
return QAResourceWithStreamingResponse(self)
4646

4747
def create(
4848
self,
@@ -115,7 +115,7 @@ def create(
115115
"top_k": top_k,
116116
"chunking_options": chunking_options,
117117
},
118-
qa_create_params.QaCreateParams,
118+
qa_create_params.QACreateParams,
119119
),
120120
options=make_request_options(
121121
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -124,25 +124,25 @@ def create(
124124
)
125125

126126

127-
class AsyncQaResource(AsyncAPIResource):
127+
class AsyncQAResource(AsyncAPIResource):
128128
@cached_property
129-
def with_raw_response(self) -> AsyncQaResourceWithRawResponse:
129+
def with_raw_response(self) -> AsyncQAResourceWithRawResponse:
130130
"""
131131
This property can be used as a prefix for any HTTP method call to return
132132
the raw response object instead of the parsed content.
133133
134134
For more information, see https://www.github.com/isaacus-dev/isaacus-python#accessing-raw-response-data-eg-headers
135135
"""
136-
return AsyncQaResourceWithRawResponse(self)
136+
return AsyncQAResourceWithRawResponse(self)
137137

138138
@cached_property
139-
def with_streaming_response(self) -> AsyncQaResourceWithStreamingResponse:
139+
def with_streaming_response(self) -> AsyncQAResourceWithStreamingResponse:
140140
"""
141141
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
142142
143143
For more information, see https://www.github.com/isaacus-dev/isaacus-python#with_streaming_response
144144
"""
145-
return AsyncQaResourceWithStreamingResponse(self)
145+
return AsyncQAResourceWithStreamingResponse(self)
146146

147147
async def create(
148148
self,
@@ -215,7 +215,7 @@ async def create(
215215
"top_k": top_k,
216216
"chunking_options": chunking_options,
217217
},
218-
qa_create_params.QaCreateParams,
218+
qa_create_params.QACreateParams,
219219
),
220220
options=make_request_options(
221221
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -224,35 +224,35 @@ async def create(
224224
)
225225

226226

227-
class QaResourceWithRawResponse:
228-
def __init__(self, qa: QaResource) -> None:
227+
class QAResourceWithRawResponse:
228+
def __init__(self, qa: QAResource) -> None:
229229
self._qa = qa
230230

231231
self.create = to_raw_response_wrapper(
232232
qa.create,
233233
)
234234

235235

236-
class AsyncQaResourceWithRawResponse:
237-
def __init__(self, qa: AsyncQaResource) -> None:
236+
class AsyncQAResourceWithRawResponse:
237+
def __init__(self, qa: AsyncQAResource) -> None:
238238
self._qa = qa
239239

240240
self.create = async_to_raw_response_wrapper(
241241
qa.create,
242242
)
243243

244244

245-
class QaResourceWithStreamingResponse:
246-
def __init__(self, qa: QaResource) -> None:
245+
class QAResourceWithStreamingResponse:
246+
def __init__(self, qa: QAResource) -> None:
247247
self._qa = qa
248248

249249
self.create = to_streamed_response_wrapper(
250250
qa.create,
251251
)
252252

253253

254-
class AsyncQaResourceWithStreamingResponse:
255-
def __init__(self, qa: AsyncQaResource) -> None:
254+
class AsyncQAResourceWithStreamingResponse:
255+
def __init__(self, qa: AsyncQAResource) -> None:
256256
self._qa = qa
257257

258258
self.create = async_to_streamed_response_wrapper(

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: 1 addition & 1 deletion
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.v1.document import Document
77

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

src/isaacus/types/extractions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
from __future__ import annotations
44

5-
from .qa_create_params import QaCreateParams as QaCreateParams
5+
from .qa_create_params import QACreateParams as QACreateParams
66
from .answer_extraction_response import AnswerExtractionResponse as AnswerExtractionResponse

src/isaacus/types/extractions/qa_create_params.py

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

88
from ..._types import SequenceNotStr
99

10-
__all__ = ["QaCreateParams", "ChunkingOptions"]
10+
__all__ = ["QACreateParams", "ChunkingOptions"]
1111

1212

13-
class QaCreateParams(TypedDict, total=False):
13+
class QACreateParams(TypedDict, total=False):
1414
model: Required[Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"]]
1515
"""
1616
The ID of the

src/isaacus/types/ilgs/__init__.py

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

0 commit comments

Comments
 (0)