From 85761019ed331bfcf1d73acafd99c0f3627fcac5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 15 Mar 2025 10:42:55 +0000
Subject: [PATCH] feat(api): manual updates
---
.stats.yml | 2 +-
api.md | 15 --
src/asktable/_client.py | 9 -
src/asktable/resources/__init__.py | 14 --
.../resources/single_turn/__init__.py | 33 ---
src/asktable/resources/single_turn/q2w.py | 215 ------------------
.../resources/single_turn/single_turn.py | 102 ---------
src/asktable/types/single_turn/__init__.py | 5 -
.../types/single_turn/q2w_create_params.py | 11 -
tests/api_resources/single_turn/__init__.py | 1 -
tests/api_resources/single_turn/test_q2w.py | 133 -----------
11 files changed, 1 insertion(+), 539 deletions(-)
delete mode 100644 src/asktable/resources/single_turn/__init__.py
delete mode 100644 src/asktable/resources/single_turn/q2w.py
delete mode 100644 src/asktable/resources/single_turn/single_turn.py
delete mode 100644 src/asktable/types/single_turn/__init__.py
delete mode 100644 src/asktable/types/single_turn/q2w_create_params.py
delete mode 100644 tests/api_resources/single_turn/__init__.py
delete mode 100644 tests/api_resources/single_turn/test_q2w.py
diff --git a/.stats.yml b/.stats.yml
index 95102f37..92764e07 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 98
+configured_endpoints: 96
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-02fbb644978089e8596def9999f5729633b652fba35bf04e374dbb71e7630355.yml
diff --git a/api.md b/api.md
index 741eeba0..dc8deb6e 100644
--- a/api.md
+++ b/api.md
@@ -410,21 +410,6 @@ Methods:
- client.dataframes.retrieve(dataframe_id) -> DataframeRetrieveResponse
-# SingleTurn
-
-## Q2w
-
-Types:
-
-```python
-from asktable.types.single_turn import Q2wCreateResponse, Q2wListResponse
-```
-
-Methods:
-
-- client.single_turn.q2w.create(\*\*params) -> object
-- client.single_turn.q2w.list() -> object
-
# Polish
Types:
diff --git a/src/asktable/_client.py b/src/asktable/_client.py
index 2c3407ee..bfd1d278 100644
--- a/src/asktable/_client.py
+++ b/src/asktable/_client.py
@@ -54,7 +54,6 @@
from .resources.chats import chats
from .resources.extapis import extapis
from .resources.datasources import datasources
-from .resources.single_turn import single_turn
__all__ = [
"Timeout",
@@ -89,7 +88,6 @@ 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
@@ -168,7 +166,6 @@ 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)
@@ -299,7 +296,6 @@ 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
@@ -378,7 +374,6 @@ 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)
@@ -510,7 +505,6 @@ 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)
@@ -538,7 +532,6 @@ 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)
@@ -566,7 +559,6 @@ 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)
@@ -594,7 +586,6 @@ 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)
diff --git a/src/asktable/resources/__init__.py b/src/asktable/resources/__init__.py
index caab4d93..9f12d790 100644
--- a/src/asktable/resources/__init__.py
+++ b/src/asktable/resources/__init__.py
@@ -152,14 +152,6 @@
PreferencesResourceWithStreamingResponse,
AsyncPreferencesResourceWithStreamingResponse,
)
-from .single_turn import (
- SingleTurnResource,
- AsyncSingleTurnResource,
- SingleTurnResourceWithRawResponse,
- AsyncSingleTurnResourceWithRawResponse,
- SingleTurnResourceWithStreamingResponse,
- AsyncSingleTurnResourceWithStreamingResponse,
-)
from .securetunnels import (
SecuretunnelsResource,
AsyncSecuretunnelsResource,
@@ -298,12 +290,6 @@
"AsyncDataframesResourceWithRawResponse",
"DataframesResourceWithStreamingResponse",
"AsyncDataframesResourceWithStreamingResponse",
- "SingleTurnResource",
- "AsyncSingleTurnResource",
- "SingleTurnResourceWithRawResponse",
- "AsyncSingleTurnResourceWithRawResponse",
- "SingleTurnResourceWithStreamingResponse",
- "AsyncSingleTurnResourceWithStreamingResponse",
"PolishResource",
"AsyncPolishResource",
"PolishResourceWithRawResponse",
diff --git a/src/asktable/resources/single_turn/__init__.py b/src/asktable/resources/single_turn/__init__.py
deleted file mode 100644
index 25231734..00000000
--- a/src/asktable/resources/single_turn/__init__.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .q2w import (
- Q2wResource,
- AsyncQ2wResource,
- Q2wResourceWithRawResponse,
- AsyncQ2wResourceWithRawResponse,
- Q2wResourceWithStreamingResponse,
- AsyncQ2wResourceWithStreamingResponse,
-)
-from .single_turn import (
- SingleTurnResource,
- AsyncSingleTurnResource,
- SingleTurnResourceWithRawResponse,
- AsyncSingleTurnResourceWithRawResponse,
- SingleTurnResourceWithStreamingResponse,
- AsyncSingleTurnResourceWithStreamingResponse,
-)
-
-__all__ = [
- "Q2wResource",
- "AsyncQ2wResource",
- "Q2wResourceWithRawResponse",
- "AsyncQ2wResourceWithRawResponse",
- "Q2wResourceWithStreamingResponse",
- "AsyncQ2wResourceWithStreamingResponse",
- "SingleTurnResource",
- "AsyncSingleTurnResource",
- "SingleTurnResourceWithRawResponse",
- "AsyncSingleTurnResourceWithRawResponse",
- "SingleTurnResourceWithStreamingResponse",
- "AsyncSingleTurnResourceWithStreamingResponse",
-]
diff --git a/src/asktable/resources/single_turn/q2w.py b/src/asktable/resources/single_turn/q2w.py
deleted file mode 100644
index c88191d2..00000000
--- a/src/asktable/resources/single_turn/q2w.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import httpx
-
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ..._utils import (
- maybe_transform,
- async_maybe_transform,
-)
-from ..._compat import cached_property
-from ..._resource import SyncAPIResource, AsyncAPIResource
-from ..._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ..._base_client import make_request_options
-from ...types.single_turn import q2w_create_params
-
-__all__ = ["Q2wResource", "AsyncQ2wResource"]
-
-
-class Q2wResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> Q2wResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/DataMini/asktable-python#accessing-raw-response-data-eg-headers
- """
- return Q2wResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> Q2wResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/DataMini/asktable-python#with_streaming_response
- """
- return Q2wResourceWithStreamingResponse(self)
-
- def create(
- self,
- *,
- body: object,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> object:
- """
- Create Q2W
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._post(
- "/v1/single-turn/q2w",
- body=maybe_transform(body, q2w_create_params.Q2wCreateParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=object,
- )
-
- def list(
- self,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> object:
- """获取所有的 Q2W 记录"""
- return self._get(
- "/v1/single-turn/q2w",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=object,
- )
-
-
-class AsyncQ2wResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncQ2wResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/DataMini/asktable-python#accessing-raw-response-data-eg-headers
- """
- return AsyncQ2wResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncQ2wResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/DataMini/asktable-python#with_streaming_response
- """
- return AsyncQ2wResourceWithStreamingResponse(self)
-
- async def create(
- self,
- *,
- body: object,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> object:
- """
- Create Q2W
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return await self._post(
- "/v1/single-turn/q2w",
- body=await async_maybe_transform(body, q2w_create_params.Q2wCreateParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=object,
- )
-
- async def list(
- self,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> object:
- """获取所有的 Q2W 记录"""
- return await self._get(
- "/v1/single-turn/q2w",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=object,
- )
-
-
-class Q2wResourceWithRawResponse:
- def __init__(self, q2w: Q2wResource) -> None:
- self._q2w = q2w
-
- self.create = to_raw_response_wrapper(
- q2w.create,
- )
- self.list = to_raw_response_wrapper(
- q2w.list,
- )
-
-
-class AsyncQ2wResourceWithRawResponse:
- def __init__(self, q2w: AsyncQ2wResource) -> None:
- self._q2w = q2w
-
- self.create = async_to_raw_response_wrapper(
- q2w.create,
- )
- self.list = async_to_raw_response_wrapper(
- q2w.list,
- )
-
-
-class Q2wResourceWithStreamingResponse:
- def __init__(self, q2w: Q2wResource) -> None:
- self._q2w = q2w
-
- self.create = to_streamed_response_wrapper(
- q2w.create,
- )
- self.list = to_streamed_response_wrapper(
- q2w.list,
- )
-
-
-class AsyncQ2wResourceWithStreamingResponse:
- def __init__(self, q2w: AsyncQ2wResource) -> None:
- self._q2w = q2w
-
- self.create = async_to_streamed_response_wrapper(
- q2w.create,
- )
- self.list = async_to_streamed_response_wrapper(
- q2w.list,
- )
diff --git a/src/asktable/resources/single_turn/single_turn.py b/src/asktable/resources/single_turn/single_turn.py
deleted file mode 100644
index ea0e0ecd..00000000
--- a/src/asktable/resources/single_turn/single_turn.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .q2w import (
- Q2wResource,
- AsyncQ2wResource,
- Q2wResourceWithRawResponse,
- AsyncQ2wResourceWithRawResponse,
- Q2wResourceWithStreamingResponse,
- AsyncQ2wResourceWithStreamingResponse,
-)
-from ..._compat import cached_property
-from ..._resource import SyncAPIResource, AsyncAPIResource
-
-__all__ = ["SingleTurnResource", "AsyncSingleTurnResource"]
-
-
-class SingleTurnResource(SyncAPIResource):
- @cached_property
- def q2w(self) -> Q2wResource:
- return Q2wResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> SingleTurnResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/DataMini/asktable-python#accessing-raw-response-data-eg-headers
- """
- return SingleTurnResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> SingleTurnResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/DataMini/asktable-python#with_streaming_response
- """
- return SingleTurnResourceWithStreamingResponse(self)
-
-
-class AsyncSingleTurnResource(AsyncAPIResource):
- @cached_property
- def q2w(self) -> AsyncQ2wResource:
- return AsyncQ2wResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncSingleTurnResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/DataMini/asktable-python#accessing-raw-response-data-eg-headers
- """
- return AsyncSingleTurnResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncSingleTurnResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/DataMini/asktable-python#with_streaming_response
- """
- return AsyncSingleTurnResourceWithStreamingResponse(self)
-
-
-class SingleTurnResourceWithRawResponse:
- def __init__(self, single_turn: SingleTurnResource) -> None:
- self._single_turn = single_turn
-
- @cached_property
- def q2w(self) -> Q2wResourceWithRawResponse:
- return Q2wResourceWithRawResponse(self._single_turn.q2w)
-
-
-class AsyncSingleTurnResourceWithRawResponse:
- def __init__(self, single_turn: AsyncSingleTurnResource) -> None:
- self._single_turn = single_turn
-
- @cached_property
- def q2w(self) -> AsyncQ2wResourceWithRawResponse:
- return AsyncQ2wResourceWithRawResponse(self._single_turn.q2w)
-
-
-class SingleTurnResourceWithStreamingResponse:
- def __init__(self, single_turn: SingleTurnResource) -> None:
- self._single_turn = single_turn
-
- @cached_property
- def q2w(self) -> Q2wResourceWithStreamingResponse:
- return Q2wResourceWithStreamingResponse(self._single_turn.q2w)
-
-
-class AsyncSingleTurnResourceWithStreamingResponse:
- def __init__(self, single_turn: AsyncSingleTurnResource) -> None:
- self._single_turn = single_turn
-
- @cached_property
- def q2w(self) -> AsyncQ2wResourceWithStreamingResponse:
- return AsyncQ2wResourceWithStreamingResponse(self._single_turn.q2w)
diff --git a/src/asktable/types/single_turn/__init__.py b/src/asktable/types/single_turn/__init__.py
deleted file mode 100644
index 7d939a20..00000000
--- a/src/asktable/types/single_turn/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .q2w_create_params import Q2wCreateParams as Q2wCreateParams
diff --git a/src/asktable/types/single_turn/q2w_create_params.py b/src/asktable/types/single_turn/q2w_create_params.py
deleted file mode 100644
index 4b03cfe5..00000000
--- a/src/asktable/types/single_turn/q2w_create_params.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["Q2wCreateParams"]
-
-
-class Q2wCreateParams(TypedDict, total=False):
- body: Required[object]
diff --git a/tests/api_resources/single_turn/__init__.py b/tests/api_resources/single_turn/__init__.py
deleted file mode 100644
index fd8019a9..00000000
--- a/tests/api_resources/single_turn/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/single_turn/test_q2w.py b/tests/api_resources/single_turn/test_q2w.py
deleted file mode 100644
index bb01c335..00000000
--- a/tests/api_resources/single_turn/test_q2w.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from asktable import Asktable, AsyncAsktable
-from tests.utils import assert_matches_type
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestQ2w:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_create(self, client: Asktable) -> None:
- q2w = client.single_turn.q2w.create(
- body={},
- )
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- def test_raw_response_create(self, client: Asktable) -> None:
- response = client.single_turn.q2w.with_raw_response.create(
- body={},
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- q2w = response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- def test_streaming_response_create(self, client: Asktable) -> None:
- with client.single_turn.q2w.with_streaming_response.create(
- body={},
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- q2w = response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_method_list(self, client: Asktable) -> None:
- q2w = client.single_turn.q2w.list()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- def test_raw_response_list(self, client: Asktable) -> None:
- response = client.single_turn.q2w.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- q2w = response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- def test_streaming_response_list(self, client: Asktable) -> None:
- with client.single_turn.q2w.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- q2w = response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
-
-class TestAsyncQ2w:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- async def test_method_create(self, async_client: AsyncAsktable) -> None:
- q2w = await async_client.single_turn.q2w.create(
- body={},
- )
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
- response = await async_client.single_turn.q2w.with_raw_response.create(
- body={},
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- q2w = await response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncAsktable) -> None:
- async with async_client.single_turn.q2w.with_streaming_response.create(
- body={},
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- q2w = await response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_method_list(self, async_client: AsyncAsktable) -> None:
- q2w = await async_client.single_turn.q2w.list()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- async def test_raw_response_list(self, async_client: AsyncAsktable) -> None:
- response = await async_client.single_turn.q2w.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- q2w = await response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- @parametrize
- async def test_streaming_response_list(self, async_client: AsyncAsktable) -> None:
- async with async_client.single_turn.q2w.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- q2w = await response.parse()
- assert_matches_type(object, q2w, path=["response"])
-
- assert cast(Any, response.is_closed) is True