Skip to content

Commit 495b4b7

Browse files
feat(api): manual updates
1 parent 83df8aa commit 495b4b7

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 23
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-be19b15cbcf156f621134060e45ab8129def46ceb32d075f44bc2229b7927eb2.yml
33
openapi_spec_hash: d91cba474f423492510b46439da6a3d7
4-
config_hash: bd77d0b7029518c697756456d6854f07
4+
config_hash: 63b68bbcc5a9ff21e4e14fa3f83b6542

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ Types:
6666

6767
```python
6868
from hyperspell.types import (
69+
Memory,
6970
MemoryStatus,
7071
MemoryListResponse,
7172
MemoryDeleteResponse,
7273
MemoryAddBulkResponse,
73-
MemoryGetResponse,
7474
MemoryStatusResponse,
7575
)
7676
```
@@ -82,7 +82,7 @@ Methods:
8282
- <code title="delete /memories/delete/{source}/{resource_id}">client.memories.<a href="./src/hyperspell/resources/memories.py">delete</a>(resource_id, \*, source) -> <a href="./src/hyperspell/types/memory_delete_response.py">MemoryDeleteResponse</a></code>
8383
- <code title="post /memories/add">client.memories.<a href="./src/hyperspell/resources/memories.py">add</a>(\*\*<a href="src/hyperspell/types/memory_add_params.py">params</a>) -> <a href="./src/hyperspell/types/memory_status.py">MemoryStatus</a></code>
8484
- <code title="post /memories/add/bulk">client.memories.<a href="./src/hyperspell/resources/memories.py">add_bulk</a>(\*\*<a href="src/hyperspell/types/memory_add_bulk_params.py">params</a>) -> <a href="./src/hyperspell/types/memory_add_bulk_response.py">MemoryAddBulkResponse</a></code>
85-
- <code title="get /memories/get/{source}/{resource_id}">client.memories.<a href="./src/hyperspell/resources/memories.py">get</a>(resource_id, \*, source) -> <a href="./src/hyperspell/types/memory_get_response.py">MemoryGetResponse</a></code>
85+
- <code title="get /memories/get/{source}/{resource_id}">client.memories.<a href="./src/hyperspell/resources/memories.py">get</a>(resource_id, \*, source) -> <a href="./src/hyperspell/types/memory.py">Memory</a></code>
8686
- <code title="post /memories/query">client.memories.<a href="./src/hyperspell/resources/memories.py">search</a>(\*\*<a href="src/hyperspell/types/memory_search_params.py">params</a>) -> <a href="./src/hyperspell/types/shared/query_result.py">QueryResult</a></code>
8787
- <code title="get /memories/status">client.memories.<a href="./src/hyperspell/resources/memories.py">status</a>() -> <a href="./src/hyperspell/types/memory_status_response.py">MemoryStatusResponse</a></code>
8888
- <code title="post /memories/upload">client.memories.<a href="./src/hyperspell/resources/memories.py">upload</a>(\*\*<a href="src/hyperspell/types/memory_upload_params.py">params</a>) -> <a href="./src/hyperspell/types/memory_status.py">MemoryStatus</a></code>

src/hyperspell/resources/memories.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
)
2929
from ..pagination import SyncCursorPage, AsyncCursorPage
3030
from .._base_client import AsyncPaginator, make_request_options
31+
from ..types.memory import Memory
3132
from ..types.memory_status import MemoryStatus
32-
from ..types.memory_get_response import MemoryGetResponse
3333
from ..types.shared.query_result import QueryResult
3434
from ..types.memory_list_response import MemoryListResponse
3535
from ..types.memory_delete_response import MemoryDeleteResponse
@@ -402,7 +402,7 @@ def get(
402402
extra_query: Query | None = None,
403403
extra_body: Body | None = None,
404404
timeout: float | httpx.Timeout | None | NotGiven = not_given,
405-
) -> MemoryGetResponse:
405+
) -> Memory:
406406
"""
407407
Retrieves a document by provider and resource_id.
408408
@@ -424,7 +424,7 @@ def get(
424424
options=make_request_options(
425425
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
426426
),
427-
cast_to=MemoryGetResponse,
427+
cast_to=Memory,
428428
)
429429

430430
def search(
@@ -940,7 +940,7 @@ async def get(
940940
extra_query: Query | None = None,
941941
extra_body: Body | None = None,
942942
timeout: float | httpx.Timeout | None | NotGiven = not_given,
943-
) -> MemoryGetResponse:
943+
) -> Memory:
944944
"""
945945
Retrieves a document by provider and resource_id.
946946
@@ -962,7 +962,7 @@ async def get(
962962
options=make_request_options(
963963
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
964964
),
965-
cast_to=MemoryGetResponse,
965+
cast_to=Memory,
966966
)
967967

968968
async def search(

src/hyperspell/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from __future__ import annotations
44

55
from .token import Token as Token
6+
from .memory import Memory as Memory
67
from .shared import QueryResult as QueryResult
78
from .memory_status import MemoryStatus as MemoryStatus
89
from .auth_me_response import AuthMeResponse as AuthMeResponse
910
from .memory_add_params import MemoryAddParams as MemoryAddParams
1011
from .vault_list_params import VaultListParams as VaultListParams
1112
from .memory_list_params import MemoryListParams as MemoryListParams
12-
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
1313
from .vault_list_response import VaultListResponse as VaultListResponse
1414
from .memory_list_response import MemoryListResponse as MemoryListResponse
1515
from .memory_search_params import MemorySearchParams as MemorySearchParams

src/hyperspell/types/memory_get_response.py renamed to src/hyperspell/types/memory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from .._models import BaseModel
1010

11-
__all__ = ["MemoryGetResponse", "Metadata", "MetadataEvent"]
11+
__all__ = ["Memory", "Metadata", "MetadataEvent"]
1212

1313

1414
class MetadataEvent(BaseModel):
@@ -45,7 +45,7 @@ def __getattr__(self, attr: str) -> object: ...
4545
__pydantic_extra__: Dict[str, object]
4646

4747

48-
class MemoryGetResponse(BaseModel):
48+
class Memory(BaseModel):
4949
"""Response model for the GET /memories/get endpoint."""
5050

5151
resource_id: str

tests/api_resources/test_memories.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from hyperspell import Hyperspell, AsyncHyperspell
1111
from tests.utils import assert_matches_type
1212
from hyperspell.types import (
13+
Memory,
1314
MemoryStatus,
14-
MemoryGetResponse,
1515
MemoryListResponse,
1616
MemoryDeleteResponse,
1717
MemoryStatusResponse,
@@ -240,7 +240,7 @@ def test_method_get(self, client: Hyperspell) -> None:
240240
resource_id="resource_id",
241241
source="reddit",
242242
)
243-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
243+
assert_matches_type(Memory, memory, path=["response"])
244244

245245
@parametrize
246246
def test_raw_response_get(self, client: Hyperspell) -> None:
@@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Hyperspell) -> None:
252252
assert response.is_closed is True
253253
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
254254
memory = response.parse()
255-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
255+
assert_matches_type(Memory, memory, path=["response"])
256256

257257
@parametrize
258258
def test_streaming_response_get(self, client: Hyperspell) -> None:
@@ -264,7 +264,7 @@ def test_streaming_response_get(self, client: Hyperspell) -> None:
264264
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
265265

266266
memory = response.parse()
267-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
267+
assert_matches_type(Memory, memory, path=["response"])
268268

269269
assert cast(Any, response.is_closed) is True
270270

@@ -657,7 +657,7 @@ async def test_method_get(self, async_client: AsyncHyperspell) -> None:
657657
resource_id="resource_id",
658658
source="reddit",
659659
)
660-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
660+
assert_matches_type(Memory, memory, path=["response"])
661661

662662
@parametrize
663663
async def test_raw_response_get(self, async_client: AsyncHyperspell) -> None:
@@ -669,7 +669,7 @@ async def test_raw_response_get(self, async_client: AsyncHyperspell) -> None:
669669
assert response.is_closed is True
670670
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
671671
memory = await response.parse()
672-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
672+
assert_matches_type(Memory, memory, path=["response"])
673673

674674
@parametrize
675675
async def test_streaming_response_get(self, async_client: AsyncHyperspell) -> None:
@@ -681,7 +681,7 @@ async def test_streaming_response_get(self, async_client: AsyncHyperspell) -> No
681681
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
682682

683683
memory = await response.parse()
684-
assert_matches_type(MemoryGetResponse, memory, path=["response"])
684+
assert_matches_type(Memory, memory, path=["response"])
685685

686686
assert cast(Any, response.is_closed) is True
687687

0 commit comments

Comments
 (0)