Skip to content

Commit dba48e1

Browse files
feat(api): manual updates (#173)
1 parent 9ebd9ab commit dba48e1

20 files changed

+1332
-56
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 93
1+
configured_endpoints: 98
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-02fbb644978089e8596def9999f5729633b652fba35bf04e374dbb71e7630355.yml

api.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ from asktable.types import (
140140
DatasourceDeleteResponse,
141141
DatasourceAddFileResponse,
142142
DatasourceDeleteFileResponse,
143+
DatasourceRetrieveRuntimeMetaResponse,
144+
DatasourceUpdateFieldResponse,
143145
)
144146
```
145147

@@ -152,6 +154,8 @@ Methods:
152154
- <code title="delete /v1/datasources/{datasource_id}">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">delete</a>(datasource_id) -> <a href="./src/asktable/types/datasource_delete_response.py">object</a></code>
153155
- <code title="post /v1/datasources/{datasource_id}/files">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">add_file</a>(datasource_id, \*\*<a href="src/asktable/types/datasource_add_file_params.py">params</a>) -> <a href="./src/asktable/types/datasource_add_file_response.py">object</a></code>
154156
- <code title="delete /v1/datasources/{datasource_id}/files/{file_id}">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">delete_file</a>(file_id, \*, datasource_id) -> <a href="./src/asktable/types/datasource_delete_file_response.py">object</a></code>
157+
- <code title="get /v1/datasources/{datasource_id}/runtime-meta">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">retrieve_runtime_meta</a>(datasource_id) -> <a href="./src/asktable/types/datasource_retrieve_runtime_meta_response.py">DatasourceRetrieveRuntimeMetaResponse</a></code>
158+
- <code title="patch /v1/datasources/{datasource_id}/field">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">update_field</a>(datasource_id, \*\*<a href="src/asktable/types/datasource_update_field_params.py">params</a>) -> <a href="./src/asktable/types/datasource_update_field_response.py">object</a></code>
155159

156160
## Meta
157161

@@ -405,3 +409,30 @@ from asktable.types import DataframeRetrieveResponse
405409
Methods:
406410

407411
- <code title="get /v1/dataframes/{dataframe_id}">client.dataframes.<a href="./src/asktable/resources/dataframes.py">retrieve</a>(dataframe_id) -> <a href="./src/asktable/types/dataframe_retrieve_response.py">DataframeRetrieveResponse</a></code>
412+
413+
# SingleTurn
414+
415+
## Q2w
416+
417+
Types:
418+
419+
```python
420+
from asktable.types.single_turn import Q2wCreateResponse, Q2wListResponse
421+
```
422+
423+
Methods:
424+
425+
- <code title="post /v1/single-turn/q2w">client.single_turn.q2w.<a href="./src/asktable/resources/single_turn/q2w.py">create</a>(\*\*<a href="src/asktable/types/single_turn/q2w_create_params.py">params</a>) -> <a href="./src/asktable/types/single_turn/q2w_create_response.py">object</a></code>
426+
- <code title="get /v1/single-turn/q2w">client.single_turn.q2w.<a href="./src/asktable/resources/single_turn/q2w.py">list</a>() -> <a href="./src/asktable/types/single_turn/q2w_list_response.py">object</a></code>
427+
428+
# Polish
429+
430+
Types:
431+
432+
```python
433+
from asktable.types import PolishCreateResponse
434+
```
435+
436+
Methods:
437+
438+
- <code title="post /v1/polish">client.polish.<a href="./src/asktable/resources/polish.py">create</a>(\*\*<a href="src/asktable/types/polish_create_params.py">params</a>) -> <a href="./src/asktable/types/polish_create_response.py">PolishCreateResponse</a></code>

src/asktable/_client.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
files,
3232
roles,
3333
caches,
34+
polish,
3435
scores,
3536
answers,
3637
project,
@@ -53,6 +54,7 @@
5354
from .resources.chats import chats
5455
from .resources.extapis import extapis
5556
from .resources.datasources import datasources
57+
from .resources.single_turn import single_turn
5658

5759
__all__ = [
5860
"Timeout",
@@ -87,6 +89,8 @@ class Asktable(SyncAPIClient):
8789
scores: scores.ScoresResource
8890
files: files.FilesResource
8991
dataframes: dataframes.DataframesResource
92+
single_turn: single_turn.SingleTurnResource
93+
polish: polish.PolishResource
9094
with_raw_response: AsktableWithRawResponse
9195
with_streaming_response: AsktableWithStreamedResponse
9296

@@ -131,7 +135,7 @@ def __init__(
131135
if base_url is None:
132136
base_url = os.environ.get("ASKTABLE_BASE_URL")
133137
if base_url is None:
134-
base_url = f"https://api.asktable.com"
138+
base_url = f"https://api.asktable.com/v1"
135139

136140
super().__init__(
137141
version=__version__,
@@ -164,6 +168,8 @@ def __init__(
164168
self.scores = scores.ScoresResource(self)
165169
self.files = files.FilesResource(self)
166170
self.dataframes = dataframes.DataframesResource(self)
171+
self.single_turn = single_turn.SingleTurnResource(self)
172+
self.polish = polish.PolishResource(self)
167173
self.with_raw_response = AsktableWithRawResponse(self)
168174
self.with_streaming_response = AsktableWithStreamedResponse(self)
169175

@@ -293,6 +299,8 @@ class AsyncAsktable(AsyncAPIClient):
293299
scores: scores.AsyncScoresResource
294300
files: files.AsyncFilesResource
295301
dataframes: dataframes.AsyncDataframesResource
302+
single_turn: single_turn.AsyncSingleTurnResource
303+
polish: polish.AsyncPolishResource
296304
with_raw_response: AsyncAsktableWithRawResponse
297305
with_streaming_response: AsyncAsktableWithStreamedResponse
298306

@@ -337,7 +345,7 @@ def __init__(
337345
if base_url is None:
338346
base_url = os.environ.get("ASKTABLE_BASE_URL")
339347
if base_url is None:
340-
base_url = f"https://api.asktable.com"
348+
base_url = f"https://api.asktable.com/v1"
341349

342350
super().__init__(
343351
version=__version__,
@@ -370,6 +378,8 @@ def __init__(
370378
self.scores = scores.AsyncScoresResource(self)
371379
self.files = files.AsyncFilesResource(self)
372380
self.dataframes = dataframes.AsyncDataframesResource(self)
381+
self.single_turn = single_turn.AsyncSingleTurnResource(self)
382+
self.polish = polish.AsyncPolishResource(self)
373383
self.with_raw_response = AsyncAsktableWithRawResponse(self)
374384
self.with_streaming_response = AsyncAsktableWithStreamedResponse(self)
375385

@@ -500,6 +510,8 @@ def __init__(self, client: Asktable) -> None:
500510
self.scores = scores.ScoresResourceWithRawResponse(client.scores)
501511
self.files = files.FilesResourceWithRawResponse(client.files)
502512
self.dataframes = dataframes.DataframesResourceWithRawResponse(client.dataframes)
513+
self.single_turn = single_turn.SingleTurnResourceWithRawResponse(client.single_turn)
514+
self.polish = polish.PolishResourceWithRawResponse(client.polish)
503515

504516

505517
class AsyncAsktableWithRawResponse:
@@ -526,6 +538,8 @@ def __init__(self, client: AsyncAsktable) -> None:
526538
self.scores = scores.AsyncScoresResourceWithRawResponse(client.scores)
527539
self.files = files.AsyncFilesResourceWithRawResponse(client.files)
528540
self.dataframes = dataframes.AsyncDataframesResourceWithRawResponse(client.dataframes)
541+
self.single_turn = single_turn.AsyncSingleTurnResourceWithRawResponse(client.single_turn)
542+
self.polish = polish.AsyncPolishResourceWithRawResponse(client.polish)
529543

530544

531545
class AsktableWithStreamedResponse:
@@ -552,6 +566,8 @@ def __init__(self, client: Asktable) -> None:
552566
self.scores = scores.ScoresResourceWithStreamingResponse(client.scores)
553567
self.files = files.FilesResourceWithStreamingResponse(client.files)
554568
self.dataframes = dataframes.DataframesResourceWithStreamingResponse(client.dataframes)
569+
self.single_turn = single_turn.SingleTurnResourceWithStreamingResponse(client.single_turn)
570+
self.polish = polish.PolishResourceWithStreamingResponse(client.polish)
555571

556572

557573
class AsyncAsktableWithStreamedResponse:
@@ -578,6 +594,8 @@ def __init__(self, client: AsyncAsktable) -> None:
578594
self.scores = scores.AsyncScoresResourceWithStreamingResponse(client.scores)
579595
self.files = files.AsyncFilesResourceWithStreamingResponse(client.files)
580596
self.dataframes = dataframes.AsyncDataframesResourceWithStreamingResponse(client.dataframes)
597+
self.single_turn = single_turn.AsyncSingleTurnResourceWithStreamingResponse(client.single_turn)
598+
self.polish = polish.AsyncPolishResourceWithStreamingResponse(client.polish)
581599

582600

583601
Client = Asktable

src/asktable/resources/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@
6464
CachesResourceWithStreamingResponse,
6565
AsyncCachesResourceWithStreamingResponse,
6666
)
67+
from .polish import (
68+
PolishResource,
69+
AsyncPolishResource,
70+
PolishResourceWithRawResponse,
71+
AsyncPolishResourceWithRawResponse,
72+
PolishResourceWithStreamingResponse,
73+
AsyncPolishResourceWithStreamingResponse,
74+
)
6775
from .scores import (
6876
ScoresResource,
6977
AsyncScoresResource,
@@ -144,6 +152,14 @@
144152
PreferencesResourceWithStreamingResponse,
145153
AsyncPreferencesResourceWithStreamingResponse,
146154
)
155+
from .single_turn import (
156+
SingleTurnResource,
157+
AsyncSingleTurnResource,
158+
SingleTurnResourceWithRawResponse,
159+
AsyncSingleTurnResourceWithRawResponse,
160+
SingleTurnResourceWithStreamingResponse,
161+
AsyncSingleTurnResourceWithStreamingResponse,
162+
)
147163
from .securetunnels import (
148164
SecuretunnelsResource,
149165
AsyncSecuretunnelsResource,
@@ -282,4 +298,16 @@
282298
"AsyncDataframesResourceWithRawResponse",
283299
"DataframesResourceWithStreamingResponse",
284300
"AsyncDataframesResourceWithStreamingResponse",
301+
"SingleTurnResource",
302+
"AsyncSingleTurnResource",
303+
"SingleTurnResourceWithRawResponse",
304+
"AsyncSingleTurnResourceWithRawResponse",
305+
"SingleTurnResourceWithStreamingResponse",
306+
"AsyncSingleTurnResourceWithStreamingResponse",
307+
"PolishResource",
308+
"AsyncPolishResource",
309+
"PolishResourceWithRawResponse",
310+
"AsyncPolishResourceWithRawResponse",
311+
"PolishResourceWithStreamingResponse",
312+
"AsyncPolishResourceWithStreamingResponse",
285313
]

0 commit comments

Comments
 (0)