From f4203293ae45abfd43ca1174262035d6ff0fffc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 05:42:51 +0000 Subject: [PATCH] feat(api): update via SDK Studio --- api.md | 8 ------- src/zeroentropy/resources/queries.py | 21 +++++++------------ src/zeroentropy/types/__init__.py | 1 - .../types/query_top_documents_params.py | 6 ++---- .../types/query_top_pages_params.py | 6 ++---- .../types/query_top_snippets_params.py | 6 ++---- src/zeroentropy/types/str_json_param.py | 10 --------- 7 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 src/zeroentropy/types/str_json_param.py diff --git a/api.md b/api.md index 3bcffa0..efe193f 100644 --- a/api.md +++ b/api.md @@ -79,11 +79,3 @@ from zeroentropy.types import ParserParseDocumentResponse Methods: - client.parsers.parse_document(\*\*params) -> ParserParseDocumentResponse - -# Models - -Types: - -```python -from zeroentropy.types import StrJson -``` diff --git a/src/zeroentropy/resources/queries.py b/src/zeroentropy/resources/queries.py index 12453a0..f1aaeb7 100644 --- a/src/zeroentropy/resources/queries.py +++ b/src/zeroentropy/resources/queries.py @@ -2,15 +2,11 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Optional import httpx -from ..types import ( - query_top_pages_params, - query_top_snippets_params, - query_top_documents_params, -) +from ..types import query_top_pages_params, query_top_snippets_params, query_top_documents_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -25,7 +21,6 @@ async_to_streamed_response_wrapper, ) from .._base_client import make_request_options -from ..types.str_json_param import StrJsonParam from ..types.query_top_pages_response import QueryTopPagesResponse from ..types.query_top_snippets_response import QueryTopSnippetsResponse from ..types.query_top_documents_response import QueryTopDocumentsResponse @@ -59,7 +54,7 @@ def top_documents( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, include_metadata: bool | NotGiven = NOT_GIVEN, # 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. @@ -119,7 +114,7 @@ def top_pages( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, include_content: bool | NotGiven = NOT_GIVEN, # 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. @@ -178,7 +173,7 @@ def top_snippets( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, precise_responses: bool | NotGiven = NOT_GIVEN, # 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. @@ -265,7 +260,7 @@ async def top_documents( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, include_metadata: bool | NotGiven = NOT_GIVEN, # 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. @@ -325,7 +320,7 @@ async def top_pages( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, include_content: bool | NotGiven = NOT_GIVEN, # 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. @@ -384,7 +379,7 @@ async def top_snippets( collection_name: str, k: int, query: str, - filter: Optional[StrJsonParam] | NotGiven = NOT_GIVEN, + filter: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN, precise_responses: bool | NotGiven = NOT_GIVEN, # 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. diff --git a/src/zeroentropy/types/__init__.py b/src/zeroentropy/types/__init__.py index 6722dc8..f6eed1a 100644 --- a/src/zeroentropy/types/__init__.py +++ b/src/zeroentropy/types/__init__.py @@ -2,7 +2,6 @@ from __future__ import annotations -from .str_json_param import StrJsonParam as StrJsonParam from .document_add_params import DocumentAddParams as DocumentAddParams from .collection_add_params import CollectionAddParams as CollectionAddParams from .document_add_response import DocumentAddResponse as DocumentAddResponse diff --git a/src/zeroentropy/types/query_top_documents_params.py b/src/zeroentropy/types/query_top_documents_params.py index 98e96a5..13273f9 100644 --- a/src/zeroentropy/types/query_top_documents_params.py +++ b/src/zeroentropy/types/query_top_documents_params.py @@ -2,11 +2,9 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Optional from typing_extensions import Required, TypedDict -from .str_json_param import StrJsonParam - __all__ = ["QueryTopDocumentsParams"] @@ -28,7 +26,7 @@ class QueryTopDocumentsParams(TypedDict, total=False): be 1 character). """ - filter: Optional[StrJsonParam] + filter: Optional[Dict[str, object]] """The query filter to apply. Please read [Metadata Filtering](/metadata-filtering) for more information. If diff --git a/src/zeroentropy/types/query_top_pages_params.py b/src/zeroentropy/types/query_top_pages_params.py index 4b149b0..764b7e1 100644 --- a/src/zeroentropy/types/query_top_pages_params.py +++ b/src/zeroentropy/types/query_top_pages_params.py @@ -2,11 +2,9 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Optional from typing_extensions import Required, TypedDict -from .str_json_param import StrJsonParam - __all__ = ["QueryTopPagesParams"] @@ -28,7 +26,7 @@ class QueryTopPagesParams(TypedDict, total=False): be 1 character). """ - filter: Optional[StrJsonParam] + filter: Optional[Dict[str, object]] """The query filter to apply. Please read [Metadata Filtering](/metadata-filtering) for more information. If diff --git a/src/zeroentropy/types/query_top_snippets_params.py b/src/zeroentropy/types/query_top_snippets_params.py index 8b9613a..0d75e2d 100644 --- a/src/zeroentropy/types/query_top_snippets_params.py +++ b/src/zeroentropy/types/query_top_snippets_params.py @@ -2,11 +2,9 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Optional from typing_extensions import Required, TypedDict -from .str_json_param import StrJsonParam - __all__ = ["QueryTopSnippetsParams"] @@ -28,7 +26,7 @@ class QueryTopSnippetsParams(TypedDict, total=False): be 1 character). """ - filter: Optional[StrJsonParam] + filter: Optional[Dict[str, object]] """The query filter to apply. Please read [Metadata Filtering](/metadata-filtering) for more information. If diff --git a/src/zeroentropy/types/str_json_param.py b/src/zeroentropy/types/str_json_param.py deleted file mode 100644 index 6fcaae6..0000000 --- a/src/zeroentropy/types/str_json_param.py +++ /dev/null @@ -1,10 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict -from typing_extensions import TypeAlias - -__all__ = ["StrJsonParam"] - -StrJsonParam: TypeAlias = Dict[str, object]