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
8 changes: 0 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,3 @@ from zeroentropy.types import ParserParseDocumentResponse
Methods:

- <code title="post /parsers/parse-document">client.parsers.<a href="./src/zeroentropy/resources/parsers.py">parse_document</a>(\*\*<a href="src/zeroentropy/types/parser_parse_document_params.py">params</a>) -> <a href="./src/zeroentropy/types/parser_parse_document_response.py">ParserParseDocumentResponse</a></code>

# Models

Types:

```python
from zeroentropy.types import StrJson
```
21 changes: 8 additions & 13 deletions src/zeroentropy/resources/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion src/zeroentropy/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/zeroentropy/types/query_top_documents_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/zeroentropy/types/query_top_pages_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/zeroentropy/types/query_top_snippets_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand All @@ -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
Expand Down
10 changes: 0 additions & 10 deletions src/zeroentropy/types/str_json_param.py

This file was deleted.