Skip to content

Commit 7f9a7d6

Browse files
feat(api): api update
1 parent 25eb634 commit 7f9a7d6

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 10
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-36d6e295ae9ef3100e17f461f035f6faeeb7179379ae8bb5531f16b57995e047.yml
3-
openapi_spec_hash: 93c9487ab8383bcfb499af21146c702c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-9df39838c82bc6495e2b60a02f8a2dd766083fdbe71b00cc6131c4a74e83896b.yml
3+
openapi_spec_hash: 69a810dcfbab60cdb13b9106d8e0cb97
44
config_hash: 63e7969fd7c560b6105e1de79148b568

src/hyperspell/resources/query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def search(
5454
answer: bool | NotGiven = NOT_GIVEN,
5555
filter: query_search_params.Filter | NotGiven = NOT_GIVEN,
5656
max_results: int | NotGiven = NOT_GIVEN,
57-
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar"]] | NotGiven = NOT_GIVEN,
57+
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar", "reddit"]]
58+
| NotGiven = NOT_GIVEN,
5859
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5960
# The extra values given here take precedence over values defined on the client or passed to this method.
6061
extra_headers: Headers | None = None,
@@ -130,7 +131,8 @@ async def search(
130131
answer: bool | NotGiven = NOT_GIVEN,
131132
filter: query_search_params.Filter | NotGiven = NOT_GIVEN,
132133
max_results: int | NotGiven = NOT_GIVEN,
133-
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar"]] | NotGiven = NOT_GIVEN,
134+
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar", "reddit"]]
135+
| NotGiven = NOT_GIVEN,
134136
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
135137
# The extra values given here take precedence over values defined on the client or passed to this method.
136138
extra_headers: Headers | None = None,

src/hyperspell/types/document_list_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DocumentListResponse(BaseModel):
6262

6363
sections_count: Optional[int] = None
6464

65-
source: Optional[Literal["collections", "notion", "slack", "hubspot", "google-calendar"]] = None
65+
source: Optional[Literal["collections", "notion", "slack", "hubspot", "google-calendar", "reddit"]] = None
6666

6767
status: Optional[Literal["pending", "processing", "completed", "failed"]] = None
6868

src/hyperspell/types/query_search_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class QuerySearchParams(TypedDict, total=False):
2424
max_results: int
2525
"""Maximum number of results to return."""
2626

27-
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar"]]
27+
sources: List[Literal["collections", "notion", "slack", "hubspot", "google-calendar", "reddit"]]
2828
"""Only query documents from these sources."""
2929

3030

src/hyperspell/types/query_search_response.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import TYPE_CHECKING, List, Optional
3+
from typing import TYPE_CHECKING, Dict, List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from .._models import BaseModel
88

9-
__all__ = ["QuerySearchResponse", "Document", "DocumentMetadata", "Error"]
9+
__all__ = ["QuerySearchResponse", "Document", "DocumentMetadata"]
1010

1111

1212
class DocumentMetadata(BaseModel):
@@ -26,27 +26,21 @@ def __getattr__(self, attr: str) -> object: ...
2626
class Document(BaseModel):
2727
resource_id: str
2828

29-
source: Literal["collections", "notion", "slack", "hubspot", "google-calendar"]
29+
source: Literal["collections", "notion", "slack", "hubspot", "google-calendar", "reddit"]
3030

3131
metadata: Optional[DocumentMetadata] = None
3232

3333
score: Optional[float] = None
3434
"""The relevance of the resource to the query"""
3535

3636

37-
class Error(BaseModel):
38-
error: str
39-
40-
message: str
41-
42-
4337
class QuerySearchResponse(BaseModel):
4438
documents: List[Document]
4539

4640
answer: Optional[str] = None
4741
"""The answer to the query, if the request was set to answer."""
4842

49-
errors: Optional[List[Error]] = None
43+
errors: Optional[List[Dict[str, str]]] = None
5044
"""Errors that occurred during the query.
5145
5246
These are meant to help the developer debug the query, and are not meant to be

0 commit comments

Comments
 (0)