Skip to content

Commit 27162f3

Browse files
feat(sdk): add qa as an initialism
1 parent f295222 commit 27162f3

8 files changed

Lines changed: 58 additions & 58 deletions

File tree

.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: 236fba4cf422cf3eff02516e1dd6e5a2
4+
config_hash: 14b7f54005fa53738489a6f68b06a35c

api.md

Lines changed: 1 addition & 1 deletion
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

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
"ignore_inextractability": ignore_inextractability,
116116
"top_k": top_k,
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
"ignore_inextractability": ignore_inextractability,
216216
"top_k": top_k,
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/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

tests/api_resources/extractions/test_qa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1515

1616

17-
class TestQa:
17+
class TestQA:
1818
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
1919

2020
@pytest.mark.skip(reason="Prism tests are disabled")
@@ -83,7 +83,7 @@ def test_streaming_response_create(self, client: Isaacus) -> None:
8383
assert cast(Any, response.is_closed) is True
8484

8585

86-
class TestAsyncQa:
86+
class TestAsyncQA:
8787
parametrize = pytest.mark.parametrize(
8888
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
8989
)

0 commit comments

Comments
 (0)