Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 93
configured_endpoints: 98
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-02fbb644978089e8596def9999f5729633b652fba35bf04e374dbb71e7630355.yml
31 changes: 31 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ from asktable.types import (
DatasourceDeleteResponse,
DatasourceAddFileResponse,
DatasourceDeleteFileResponse,
DatasourceRetrieveRuntimeMetaResponse,
DatasourceUpdateFieldResponse,
)
```

Expand All @@ -152,6 +154,8 @@ Methods:
- <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>
- <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>
- <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>
- <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>
- <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>

## Meta

Expand Down Expand Up @@ -405,3 +409,30 @@ from asktable.types import DataframeRetrieveResponse
Methods:

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

# SingleTurn

## Q2w

Types:

```python
from asktable.types.single_turn import Q2wCreateResponse, Q2wListResponse
```

Methods:

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

# Polish

Types:

```python
from asktable.types import PolishCreateResponse
```

Methods:

- <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>
22 changes: 20 additions & 2 deletions src/asktable/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
files,
roles,
caches,
polish,
scores,
answers,
project,
Expand All @@ -53,6 +54,7 @@
from .resources.chats import chats
from .resources.extapis import extapis
from .resources.datasources import datasources
from .resources.single_turn import single_turn

__all__ = [
"Timeout",
Expand Down Expand Up @@ -87,6 +89,8 @@ class Asktable(SyncAPIClient):
scores: scores.ScoresResource
files: files.FilesResource
dataframes: dataframes.DataframesResource
single_turn: single_turn.SingleTurnResource
polish: polish.PolishResource
with_raw_response: AsktableWithRawResponse
with_streaming_response: AsktableWithStreamedResponse

Expand Down Expand Up @@ -131,7 +135,7 @@ def __init__(
if base_url is None:
base_url = os.environ.get("ASKTABLE_BASE_URL")
if base_url is None:
base_url = f"https://api.asktable.com"
base_url = f"https://api.asktable.com/v1"

super().__init__(
version=__version__,
Expand Down Expand Up @@ -164,6 +168,8 @@ def __init__(
self.scores = scores.ScoresResource(self)
self.files = files.FilesResource(self)
self.dataframes = dataframes.DataframesResource(self)
self.single_turn = single_turn.SingleTurnResource(self)
self.polish = polish.PolishResource(self)
self.with_raw_response = AsktableWithRawResponse(self)
self.with_streaming_response = AsktableWithStreamedResponse(self)

Expand Down Expand Up @@ -293,6 +299,8 @@ class AsyncAsktable(AsyncAPIClient):
scores: scores.AsyncScoresResource
files: files.AsyncFilesResource
dataframes: dataframes.AsyncDataframesResource
single_turn: single_turn.AsyncSingleTurnResource
polish: polish.AsyncPolishResource
with_raw_response: AsyncAsktableWithRawResponse
with_streaming_response: AsyncAsktableWithStreamedResponse

Expand Down Expand Up @@ -337,7 +345,7 @@ def __init__(
if base_url is None:
base_url = os.environ.get("ASKTABLE_BASE_URL")
if base_url is None:
base_url = f"https://api.asktable.com"
base_url = f"https://api.asktable.com/v1"

super().__init__(
version=__version__,
Expand Down Expand Up @@ -370,6 +378,8 @@ def __init__(
self.scores = scores.AsyncScoresResource(self)
self.files = files.AsyncFilesResource(self)
self.dataframes = dataframes.AsyncDataframesResource(self)
self.single_turn = single_turn.AsyncSingleTurnResource(self)
self.polish = polish.AsyncPolishResource(self)
self.with_raw_response = AsyncAsktableWithRawResponse(self)
self.with_streaming_response = AsyncAsktableWithStreamedResponse(self)

Expand Down Expand Up @@ -500,6 +510,8 @@ def __init__(self, client: Asktable) -> None:
self.scores = scores.ScoresResourceWithRawResponse(client.scores)
self.files = files.FilesResourceWithRawResponse(client.files)
self.dataframes = dataframes.DataframesResourceWithRawResponse(client.dataframes)
self.single_turn = single_turn.SingleTurnResourceWithRawResponse(client.single_turn)
self.polish = polish.PolishResourceWithRawResponse(client.polish)


class AsyncAsktableWithRawResponse:
Expand All @@ -526,6 +538,8 @@ def __init__(self, client: AsyncAsktable) -> None:
self.scores = scores.AsyncScoresResourceWithRawResponse(client.scores)
self.files = files.AsyncFilesResourceWithRawResponse(client.files)
self.dataframes = dataframes.AsyncDataframesResourceWithRawResponse(client.dataframes)
self.single_turn = single_turn.AsyncSingleTurnResourceWithRawResponse(client.single_turn)
self.polish = polish.AsyncPolishResourceWithRawResponse(client.polish)


class AsktableWithStreamedResponse:
Expand All @@ -552,6 +566,8 @@ def __init__(self, client: Asktable) -> None:
self.scores = scores.ScoresResourceWithStreamingResponse(client.scores)
self.files = files.FilesResourceWithStreamingResponse(client.files)
self.dataframes = dataframes.DataframesResourceWithStreamingResponse(client.dataframes)
self.single_turn = single_turn.SingleTurnResourceWithStreamingResponse(client.single_turn)
self.polish = polish.PolishResourceWithStreamingResponse(client.polish)


class AsyncAsktableWithStreamedResponse:
Expand All @@ -578,6 +594,8 @@ def __init__(self, client: AsyncAsktable) -> None:
self.scores = scores.AsyncScoresResourceWithStreamingResponse(client.scores)
self.files = files.AsyncFilesResourceWithStreamingResponse(client.files)
self.dataframes = dataframes.AsyncDataframesResourceWithStreamingResponse(client.dataframes)
self.single_turn = single_turn.AsyncSingleTurnResourceWithStreamingResponse(client.single_turn)
self.polish = polish.AsyncPolishResourceWithStreamingResponse(client.polish)


Client = Asktable
Expand Down
28 changes: 28 additions & 0 deletions src/asktable/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
CachesResourceWithStreamingResponse,
AsyncCachesResourceWithStreamingResponse,
)
from .polish import (
PolishResource,
AsyncPolishResource,
PolishResourceWithRawResponse,
AsyncPolishResourceWithRawResponse,
PolishResourceWithStreamingResponse,
AsyncPolishResourceWithStreamingResponse,
)
from .scores import (
ScoresResource,
AsyncScoresResource,
Expand Down Expand Up @@ -144,6 +152,14 @@
PreferencesResourceWithStreamingResponse,
AsyncPreferencesResourceWithStreamingResponse,
)
from .single_turn import (
SingleTurnResource,
AsyncSingleTurnResource,
SingleTurnResourceWithRawResponse,
AsyncSingleTurnResourceWithRawResponse,
SingleTurnResourceWithStreamingResponse,
AsyncSingleTurnResourceWithStreamingResponse,
)
from .securetunnels import (
SecuretunnelsResource,
AsyncSecuretunnelsResource,
Expand Down Expand Up @@ -282,4 +298,16 @@
"AsyncDataframesResourceWithRawResponse",
"DataframesResourceWithStreamingResponse",
"AsyncDataframesResourceWithStreamingResponse",
"SingleTurnResource",
"AsyncSingleTurnResource",
"SingleTurnResourceWithRawResponse",
"AsyncSingleTurnResourceWithRawResponse",
"SingleTurnResourceWithStreamingResponse",
"AsyncSingleTurnResourceWithStreamingResponse",
"PolishResource",
"AsyncPolishResource",
"PolishResourceWithRawResponse",
"AsyncPolishResourceWithRawResponse",
"PolishResourceWithStreamingResponse",
"AsyncPolishResourceWithStreamingResponse",
]
Loading