From f167bd73704e7e7c372ecc3aa73a64efbaa0d13b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 04:01:14 +0000 Subject: [PATCH 1/5] chore(internal): codegen related update (#132) --- mypy.ini | 2 +- requirements-dev.lock | 4 ++-- src/asktable/_response.py | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mypy.ini b/mypy.ini index 19fe81b2..b0156385 100644 --- a/mypy.ini +++ b/mypy.ini @@ -41,7 +41,7 @@ cache_fine_grained = True # ``` # Changing this codegen to make mypy happy would increase complexity # and would not be worth it. -disable_error_code = func-returns-value +disable_error_code = func-returns-value,overload-cannot-match # https://github.com/python/mypy/issues/12162 [mypy.overrides] diff --git a/requirements-dev.lock b/requirements-dev.lock index efa476d8..f9651665 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -48,7 +48,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.13.0 +mypy==1.14.1 mypy-extensions==1.0.0 # via mypy nest-asyncio==1.6.0 @@ -68,7 +68,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.390 +pyright==1.1.392.post0 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 diff --git a/src/asktable/_response.py b/src/asktable/_response.py index a037784a..15416ac8 100644 --- a/src/asktable/_response.py +++ b/src/asktable/_response.py @@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`") return cast(R, response) - if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): + if ( + inspect.isclass( + origin # pyright: ignore[reportUnknownArgumentType] + ) + and not issubclass(origin, BaseModel) + and issubclass(origin, pydantic.BaseModel) + ): raise TypeError("Pydantic models must subclass our base model type, e.g. `from asktable import BaseModel`") if ( From 6d30087ca2351d75443935907e7749fdfc96d1cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:14:59 +0000 Subject: [PATCH 2/5] feat(api): api update (#134) --- .stats.yml | 2 +- src/asktable/types/ai_message.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c7382123..c725ddb5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 91 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f081d80ec1b3a4951cccc2a085d46405da9aea9da7295cc264e834ada84127eb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-7fbce4007f4b51d805e8dcb72ad7f1805ffe21a044c7d2d7584ca269a4bd0e70.yml diff --git a/src/asktable/types/ai_message.py b/src/asktable/types/ai_message.py index 1f0c68ba..986e1827 100644 --- a/src/asktable/types/ai_message.py +++ b/src/asktable/types/ai_message.py @@ -44,6 +44,8 @@ class AIMessage(BaseModel): created_at: Optional[datetime] = None """创建时间""" + dataframe_ids: Optional[List[str]] = None + end_turn: Optional[bool] = None metadata: Optional[object] = None From 116eeccb329619a3a0cc86222bb4fb6495258582 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:14:59 +0000 Subject: [PATCH 3/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c725ddb5..42ece98b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 91 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-7fbce4007f4b51d805e8dcb72ad7f1805ffe21a044c7d2d7584ca269a4bd0e70.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-69140680dde56332aa42ebbfbe12c0c3db2adf3904e4a821cee6465e491f4c57.yml From bad8bba976aa94114c4b6a801b31189913aa7699 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:26:23 +0000 Subject: [PATCH 4/5] feat(api): update organization info (#135) --- pyproject.toml | 2 +- src/asktable/_client.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8c7c8034..7fbdabf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "asktable" version = "4.4.0" -description = "The official Python library for the asktable API" +description = "The official Python library for the Asktable API" dynamic = ["readme"] license = "Apache-2.0" authors = [ diff --git a/src/asktable/_client.py b/src/asktable/_client.py index f989b8af..6f5676d5 100644 --- a/src/asktable/_client.py +++ b/src/asktable/_client.py @@ -112,7 +112,7 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new synchronous asktable client instance. + """Construct a new synchronous Asktable client instance. This automatically infers the `api_key` argument from the `ASKTABLE_API_KEY` environment variable if it is not provided. """ @@ -314,7 +314,7 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new async asktable client instance. + """Construct a new async Asktable client instance. This automatically infers the `api_key` argument from the `ASKTABLE_API_KEY` environment variable if it is not provided. """ From 848606d6d934d362ad5935726a0468ffd75f57cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 13:05:09 +0000 Subject: [PATCH 5/5] release: 4.5.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ pyproject.toml | 2 +- src/asktable/_version.py | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 934f2cc0..3d5f4e35 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.4.0" + ".": "4.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d58c962..0ed73450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 4.5.0 (2025-01-19) + +Full Changelog: [v4.4.0...v4.5.0](https://github.com/DataMini/asktable-python/compare/v4.4.0...v4.5.0) + +### Features + +* **api:** api update ([#134](https://github.com/DataMini/asktable-python/issues/134)) ([6d30087](https://github.com/DataMini/asktable-python/commit/6d30087ca2351d75443935907e7749fdfc96d1cf)) +* **api:** update organization info ([#135](https://github.com/DataMini/asktable-python/issues/135)) ([bad8bba](https://github.com/DataMini/asktable-python/commit/bad8bba976aa94114c4b6a801b31189913aa7699)) + + +### Bug Fixes + +* type hint in custom code ([643d5c2](https://github.com/DataMini/asktable-python/commit/643d5c274950f7a6af11e5c1a8127ce70db82ada)) + + +### Chores + +* **internal:** codegen related update ([#132](https://github.com/DataMini/asktable-python/issues/132)) ([f167bd7](https://github.com/DataMini/asktable-python/commit/f167bd73704e7e7c372ecc3aa73a64efbaa0d13b)) + ## 4.4.0 (2025-01-15) Full Changelog: [v4.3.0...v4.4.0](https://github.com/DataMini/asktable-python/compare/v4.3.0...v4.4.0) diff --git a/pyproject.toml b/pyproject.toml index 7fbdabf2..ee8b68bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "asktable" -version = "4.4.0" +version = "4.5.0" description = "The official Python library for the Asktable API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/asktable/_version.py b/src/asktable/_version.py index e6bc0e05..ba79aa28 100644 --- a/src/asktable/_version.py +++ b/src/asktable/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "asktable" -__version__ = "4.4.0" # x-release-please-version +__version__ = "4.5.0" # x-release-please-version