evermemos 0.3.9__py3-none-any.whl → 0.3.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evermemos/_base_client.py +5 -2
- evermemos/_client.py +20 -20
- evermemos/_compat.py +3 -3
- evermemos/_utils/_json.py +35 -0
- evermemos/_version.py +1 -1
- evermemos/resources/__init__.py +13 -13
- evermemos/resources/v0/__init__.py +47 -0
- evermemos/resources/{v1 → v0}/memories/conversation_meta.py +148 -20
- evermemos/resources/{v1 → v0}/memories/memories.py +176 -193
- evermemos/resources/v0/status/__init__.py +33 -0
- evermemos/resources/v0/status/request.py +175 -0
- evermemos/resources/v0/status/status.py +102 -0
- evermemos/resources/{v1/v1.py → v0/v0.py} +59 -27
- evermemos/types/{v1 → v0}/__init__.py +2 -4
- evermemos/types/v0/memories/conversation_meta_create_params.py +144 -0
- evermemos/types/v0/memories/conversation_meta_create_response.py +109 -0
- evermemos/types/v0/memories/conversation_meta_get_response.py +109 -0
- evermemos/types/v0/memories/conversation_meta_update_params.py +117 -0
- evermemos/types/{v1 → v0}/memories/conversation_meta_update_response.py +11 -0
- evermemos/types/v0/memory_add_params.py +60 -0
- evermemos/types/{v1/memory_create_response.py → v0/memory_add_response.py} +2 -2
- evermemos/types/{v1 → v0}/memory_delete_params.py +9 -0
- evermemos/types/{v1 → v0}/memory_delete_response.py +7 -0
- evermemos/types/{v1 → v0}/memory_get_response.py +13 -87
- evermemos/types/v0/memory_search_response.py +196 -0
- evermemos/types/v0/status/__init__.py +6 -0
- evermemos/types/v0/status/request_get_params.py +13 -0
- evermemos/types/v0/status/request_get_response.py +21 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/METADATA +24 -26
- evermemos-0.3.11.dist-info/RECORD +61 -0
- evermemos/resources/v1/__init__.py +0 -33
- evermemos/types/v1/global_user_profile/__init__.py +0 -3
- evermemos/types/v1/memories/conversation_meta_create_params.py +0 -38
- evermemos/types/v1/memories/conversation_meta_create_response.py +0 -41
- evermemos/types/v1/memories/conversation_meta_get_response.py +0 -41
- evermemos/types/v1/memories/conversation_meta_update_params.py +0 -34
- evermemos/types/v1/memory_create_params.py +0 -32
- evermemos/types/v1/memory_load_params.py +0 -56
- evermemos/types/v1/memory_load_response.py +0 -19
- evermemos/types/v1/memory_search_response.py +0 -99
- evermemos/types/v1/stats/__init__.py +0 -3
- evermemos-0.3.9.dist-info/RECORD +0 -58
- /evermemos/resources/{v1 → v0}/memories/__init__.py +0 -0
- /evermemos/types/{v1 → v0}/memories/__init__.py +0 -0
- /evermemos/types/{v1 → v0}/memory_type.py +0 -0
- /evermemos/types/{v1 → v0}/metadata.py +0 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/WHEEL +0 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ...._types import Body, Query, Headers, NotGiven, not_given
|
|
10
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ...._compat import cached_property
|
|
12
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ...._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...._base_client import make_request_options
|
|
20
|
+
from ....types.v0.status import request_get_params
|
|
21
|
+
from ....types.v0.status.request_get_response import RequestGetResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["RequestResource", "AsyncRequestResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RequestResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> RequestResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return RequestResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> RequestResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return RequestResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def get(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
request_id: Optional[str],
|
|
50
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
51
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
52
|
+
extra_headers: Headers | None = None,
|
|
53
|
+
extra_query: Query | None = None,
|
|
54
|
+
extra_body: Body | None = None,
|
|
55
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
56
|
+
) -> RequestGetResponse:
|
|
57
|
+
"""
|
|
58
|
+
Query the processing status of a specific request
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
request_id: which is returned by add_memories api
|
|
62
|
+
|
|
63
|
+
extra_headers: Send extra headers
|
|
64
|
+
|
|
65
|
+
extra_query: Add additional query parameters to the request
|
|
66
|
+
|
|
67
|
+
extra_body: Add additional JSON properties to the request
|
|
68
|
+
|
|
69
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
70
|
+
"""
|
|
71
|
+
return self._get(
|
|
72
|
+
"/api/v0/status/request",
|
|
73
|
+
options=make_request_options(
|
|
74
|
+
extra_headers=extra_headers,
|
|
75
|
+
extra_query=extra_query,
|
|
76
|
+
extra_body=extra_body,
|
|
77
|
+
timeout=timeout,
|
|
78
|
+
query=maybe_transform({"request_id": request_id}, request_get_params.RequestGetParams),
|
|
79
|
+
),
|
|
80
|
+
cast_to=RequestGetResponse,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class AsyncRequestResource(AsyncAPIResource):
|
|
85
|
+
@cached_property
|
|
86
|
+
def with_raw_response(self) -> AsyncRequestResourceWithRawResponse:
|
|
87
|
+
"""
|
|
88
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
89
|
+
the raw response object instead of the parsed content.
|
|
90
|
+
|
|
91
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
92
|
+
"""
|
|
93
|
+
return AsyncRequestResourceWithRawResponse(self)
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def with_streaming_response(self) -> AsyncRequestResourceWithStreamingResponse:
|
|
97
|
+
"""
|
|
98
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
99
|
+
|
|
100
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
101
|
+
"""
|
|
102
|
+
return AsyncRequestResourceWithStreamingResponse(self)
|
|
103
|
+
|
|
104
|
+
async def get(
|
|
105
|
+
self,
|
|
106
|
+
*,
|
|
107
|
+
request_id: Optional[str],
|
|
108
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
109
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
110
|
+
extra_headers: Headers | None = None,
|
|
111
|
+
extra_query: Query | None = None,
|
|
112
|
+
extra_body: Body | None = None,
|
|
113
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
114
|
+
) -> RequestGetResponse:
|
|
115
|
+
"""
|
|
116
|
+
Query the processing status of a specific request
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
request_id: which is returned by add_memories api
|
|
120
|
+
|
|
121
|
+
extra_headers: Send extra headers
|
|
122
|
+
|
|
123
|
+
extra_query: Add additional query parameters to the request
|
|
124
|
+
|
|
125
|
+
extra_body: Add additional JSON properties to the request
|
|
126
|
+
|
|
127
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
|
+
"""
|
|
129
|
+
return await self._get(
|
|
130
|
+
"/api/v0/status/request",
|
|
131
|
+
options=make_request_options(
|
|
132
|
+
extra_headers=extra_headers,
|
|
133
|
+
extra_query=extra_query,
|
|
134
|
+
extra_body=extra_body,
|
|
135
|
+
timeout=timeout,
|
|
136
|
+
query=await async_maybe_transform({"request_id": request_id}, request_get_params.RequestGetParams),
|
|
137
|
+
),
|
|
138
|
+
cast_to=RequestGetResponse,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class RequestResourceWithRawResponse:
|
|
143
|
+
def __init__(self, request: RequestResource) -> None:
|
|
144
|
+
self._request = request
|
|
145
|
+
|
|
146
|
+
self.get = to_raw_response_wrapper(
|
|
147
|
+
request.get,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
class AsyncRequestResourceWithRawResponse:
|
|
152
|
+
def __init__(self, request: AsyncRequestResource) -> None:
|
|
153
|
+
self._request = request
|
|
154
|
+
|
|
155
|
+
self.get = async_to_raw_response_wrapper(
|
|
156
|
+
request.get,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class RequestResourceWithStreamingResponse:
|
|
161
|
+
def __init__(self, request: RequestResource) -> None:
|
|
162
|
+
self._request = request
|
|
163
|
+
|
|
164
|
+
self.get = to_streamed_response_wrapper(
|
|
165
|
+
request.get,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class AsyncRequestResourceWithStreamingResponse:
|
|
170
|
+
def __init__(self, request: AsyncRequestResource) -> None:
|
|
171
|
+
self._request = request
|
|
172
|
+
|
|
173
|
+
self.get = async_to_streamed_response_wrapper(
|
|
174
|
+
request.get,
|
|
175
|
+
)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .request import (
|
|
6
|
+
RequestResource,
|
|
7
|
+
AsyncRequestResource,
|
|
8
|
+
RequestResourceWithRawResponse,
|
|
9
|
+
AsyncRequestResourceWithRawResponse,
|
|
10
|
+
RequestResourceWithStreamingResponse,
|
|
11
|
+
AsyncRequestResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ...._compat import cached_property
|
|
14
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["StatusResource", "AsyncStatusResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class StatusResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def request(self) -> RequestResource:
|
|
22
|
+
return RequestResource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> StatusResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return StatusResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> StatusResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return StatusResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncStatusResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def request(self) -> AsyncRequestResource:
|
|
47
|
+
return AsyncRequestResource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncStatusResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncStatusResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncStatusResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncStatusResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class StatusResourceWithRawResponse:
|
|
70
|
+
def __init__(self, status: StatusResource) -> None:
|
|
71
|
+
self._status = status
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def request(self) -> RequestResourceWithRawResponse:
|
|
75
|
+
return RequestResourceWithRawResponse(self._status.request)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncStatusResourceWithRawResponse:
|
|
79
|
+
def __init__(self, status: AsyncStatusResource) -> None:
|
|
80
|
+
self._status = status
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def request(self) -> AsyncRequestResourceWithRawResponse:
|
|
84
|
+
return AsyncRequestResourceWithRawResponse(self._status.request)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class StatusResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, status: StatusResource) -> None:
|
|
89
|
+
self._status = status
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def request(self) -> RequestResourceWithStreamingResponse:
|
|
93
|
+
return RequestResourceWithStreamingResponse(self._status.request)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncStatusResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, status: AsyncStatusResource) -> None:
|
|
98
|
+
self._status = status
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def request(self) -> AsyncRequestResourceWithStreamingResponse:
|
|
102
|
+
return AsyncRequestResourceWithStreamingResponse(self._status.request)
|
|
@@ -4,6 +4,14 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from ..._compat import cached_property
|
|
6
6
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
7
|
+
from .status.status import (
|
|
8
|
+
StatusResource,
|
|
9
|
+
AsyncStatusResource,
|
|
10
|
+
StatusResourceWithRawResponse,
|
|
11
|
+
AsyncStatusResourceWithRawResponse,
|
|
12
|
+
StatusResourceWithStreamingResponse,
|
|
13
|
+
AsyncStatusResourceWithStreamingResponse,
|
|
14
|
+
)
|
|
7
15
|
from .memories.memories import (
|
|
8
16
|
MemoriesResource,
|
|
9
17
|
AsyncMemoriesResource,
|
|
@@ -13,90 +21,114 @@ from .memories.memories import (
|
|
|
13
21
|
AsyncMemoriesResourceWithStreamingResponse,
|
|
14
22
|
)
|
|
15
23
|
|
|
16
|
-
__all__ = ["
|
|
24
|
+
__all__ = ["V0Resource", "AsyncV0Resource"]
|
|
17
25
|
|
|
18
26
|
|
|
19
|
-
class
|
|
27
|
+
class V0Resource(SyncAPIResource):
|
|
20
28
|
@cached_property
|
|
21
29
|
def memories(self) -> MemoriesResource:
|
|
22
30
|
return MemoriesResource(self._client)
|
|
23
31
|
|
|
24
32
|
@cached_property
|
|
25
|
-
def
|
|
33
|
+
def status(self) -> StatusResource:
|
|
34
|
+
return StatusResource(self._client)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_raw_response(self) -> V0ResourceWithRawResponse:
|
|
26
38
|
"""
|
|
27
39
|
This property can be used as a prefix for any HTTP method call to return
|
|
28
40
|
the raw response object instead of the parsed content.
|
|
29
41
|
|
|
30
42
|
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
31
43
|
"""
|
|
32
|
-
return
|
|
44
|
+
return V0ResourceWithRawResponse(self)
|
|
33
45
|
|
|
34
46
|
@cached_property
|
|
35
|
-
def with_streaming_response(self) ->
|
|
47
|
+
def with_streaming_response(self) -> V0ResourceWithStreamingResponse:
|
|
36
48
|
"""
|
|
37
49
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
50
|
|
|
39
51
|
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
40
52
|
"""
|
|
41
|
-
return
|
|
53
|
+
return V0ResourceWithStreamingResponse(self)
|
|
42
54
|
|
|
43
55
|
|
|
44
|
-
class
|
|
56
|
+
class AsyncV0Resource(AsyncAPIResource):
|
|
45
57
|
@cached_property
|
|
46
58
|
def memories(self) -> AsyncMemoriesResource:
|
|
47
59
|
return AsyncMemoriesResource(self._client)
|
|
48
60
|
|
|
49
61
|
@cached_property
|
|
50
|
-
def
|
|
62
|
+
def status(self) -> AsyncStatusResource:
|
|
63
|
+
return AsyncStatusResource(self._client)
|
|
64
|
+
|
|
65
|
+
@cached_property
|
|
66
|
+
def with_raw_response(self) -> AsyncV0ResourceWithRawResponse:
|
|
51
67
|
"""
|
|
52
68
|
This property can be used as a prefix for any HTTP method call to return
|
|
53
69
|
the raw response object instead of the parsed content.
|
|
54
70
|
|
|
55
71
|
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
56
72
|
"""
|
|
57
|
-
return
|
|
73
|
+
return AsyncV0ResourceWithRawResponse(self)
|
|
58
74
|
|
|
59
75
|
@cached_property
|
|
60
|
-
def with_streaming_response(self) ->
|
|
76
|
+
def with_streaming_response(self) -> AsyncV0ResourceWithStreamingResponse:
|
|
61
77
|
"""
|
|
62
78
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
79
|
|
|
64
80
|
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
65
81
|
"""
|
|
66
|
-
return
|
|
82
|
+
return AsyncV0ResourceWithStreamingResponse(self)
|
|
67
83
|
|
|
68
84
|
|
|
69
|
-
class
|
|
70
|
-
def __init__(self,
|
|
71
|
-
self.
|
|
85
|
+
class V0ResourceWithRawResponse:
|
|
86
|
+
def __init__(self, v0: V0Resource) -> None:
|
|
87
|
+
self._v0 = v0
|
|
72
88
|
|
|
73
89
|
@cached_property
|
|
74
90
|
def memories(self) -> MemoriesResourceWithRawResponse:
|
|
75
|
-
return MemoriesResourceWithRawResponse(self.
|
|
91
|
+
return MemoriesResourceWithRawResponse(self._v0.memories)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def status(self) -> StatusResourceWithRawResponse:
|
|
95
|
+
return StatusResourceWithRawResponse(self._v0.status)
|
|
76
96
|
|
|
77
97
|
|
|
78
|
-
class
|
|
79
|
-
def __init__(self,
|
|
80
|
-
self.
|
|
98
|
+
class AsyncV0ResourceWithRawResponse:
|
|
99
|
+
def __init__(self, v0: AsyncV0Resource) -> None:
|
|
100
|
+
self._v0 = v0
|
|
81
101
|
|
|
82
102
|
@cached_property
|
|
83
103
|
def memories(self) -> AsyncMemoriesResourceWithRawResponse:
|
|
84
|
-
return AsyncMemoriesResourceWithRawResponse(self.
|
|
104
|
+
return AsyncMemoriesResourceWithRawResponse(self._v0.memories)
|
|
105
|
+
|
|
106
|
+
@cached_property
|
|
107
|
+
def status(self) -> AsyncStatusResourceWithRawResponse:
|
|
108
|
+
return AsyncStatusResourceWithRawResponse(self._v0.status)
|
|
85
109
|
|
|
86
110
|
|
|
87
|
-
class
|
|
88
|
-
def __init__(self,
|
|
89
|
-
self.
|
|
111
|
+
class V0ResourceWithStreamingResponse:
|
|
112
|
+
def __init__(self, v0: V0Resource) -> None:
|
|
113
|
+
self._v0 = v0
|
|
90
114
|
|
|
91
115
|
@cached_property
|
|
92
116
|
def memories(self) -> MemoriesResourceWithStreamingResponse:
|
|
93
|
-
return MemoriesResourceWithStreamingResponse(self.
|
|
117
|
+
return MemoriesResourceWithStreamingResponse(self._v0.memories)
|
|
118
|
+
|
|
119
|
+
@cached_property
|
|
120
|
+
def status(self) -> StatusResourceWithStreamingResponse:
|
|
121
|
+
return StatusResourceWithStreamingResponse(self._v0.status)
|
|
94
122
|
|
|
95
123
|
|
|
96
|
-
class
|
|
97
|
-
def __init__(self,
|
|
98
|
-
self.
|
|
124
|
+
class AsyncV0ResourceWithStreamingResponse:
|
|
125
|
+
def __init__(self, v0: AsyncV0Resource) -> None:
|
|
126
|
+
self._v0 = v0
|
|
99
127
|
|
|
100
128
|
@cached_property
|
|
101
129
|
def memories(self) -> AsyncMemoriesResourceWithStreamingResponse:
|
|
102
|
-
return AsyncMemoriesResourceWithStreamingResponse(self.
|
|
130
|
+
return AsyncMemoriesResourceWithStreamingResponse(self._v0.memories)
|
|
131
|
+
|
|
132
|
+
@cached_property
|
|
133
|
+
def status(self) -> AsyncStatusResourceWithStreamingResponse:
|
|
134
|
+
return AsyncStatusResourceWithStreamingResponse(self._v0.status)
|
|
@@ -4,11 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from .metadata import Metadata as Metadata
|
|
6
6
|
from .memory_type import MemoryType as MemoryType
|
|
7
|
-
from .
|
|
7
|
+
from .memory_add_params import MemoryAddParams as MemoryAddParams
|
|
8
|
+
from .memory_add_response import MemoryAddResponse as MemoryAddResponse
|
|
8
9
|
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
|
|
9
|
-
from .memory_create_params import MemoryCreateParams as MemoryCreateParams
|
|
10
10
|
from .memory_delete_params import MemoryDeleteParams as MemoryDeleteParams
|
|
11
|
-
from .memory_load_response import MemoryLoadResponse as MemoryLoadResponse
|
|
12
|
-
from .memory_create_response import MemoryCreateResponse as MemoryCreateResponse
|
|
13
11
|
from .memory_delete_response import MemoryDeleteResponse as MemoryDeleteResponse
|
|
14
12
|
from .memory_search_response import MemorySearchResponse as MemorySearchResponse
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from ...._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"ConversationMetaCreateParams",
|
|
12
|
+
"LlmCustomSetting",
|
|
13
|
+
"LlmCustomSettingBoundary",
|
|
14
|
+
"LlmCustomSettingExtraction",
|
|
15
|
+
"UserDetails",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ConversationMetaCreateParams(TypedDict, total=False):
|
|
20
|
+
created_at: Required[str]
|
|
21
|
+
"""Conversation creation time (ISO 8601 format with Timezone is required)"""
|
|
22
|
+
|
|
23
|
+
default_timezone: Optional[str]
|
|
24
|
+
"""Default timezone"""
|
|
25
|
+
|
|
26
|
+
description: Optional[str]
|
|
27
|
+
"""Conversation description"""
|
|
28
|
+
|
|
29
|
+
group_id: Optional[str]
|
|
30
|
+
"""Group unique identifier.
|
|
31
|
+
|
|
32
|
+
When null/not provided, represents default settings for this scene.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
llm_custom_setting: Optional[LlmCustomSetting]
|
|
36
|
+
"""LLM custom settings for algorithm control.
|
|
37
|
+
|
|
38
|
+
**Only for global config (group_id=null), not allowed for group config (group_id
|
|
39
|
+
provided).**
|
|
40
|
+
|
|
41
|
+
Allows configuring different LLM providers/models for different tasks like
|
|
42
|
+
boundary detection and memory extraction.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
name: Optional[str]
|
|
46
|
+
"""Group/conversation name.
|
|
47
|
+
|
|
48
|
+
**Required for group config (group_id provided), not allowed for global config
|
|
49
|
+
(group_id=null).**
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
scene: Optional[str]
|
|
53
|
+
"""Scene identifier.
|
|
54
|
+
|
|
55
|
+
**Required for global config (group_id=null), not allowed for group config
|
|
56
|
+
(group_id provided).**
|
|
57
|
+
|
|
58
|
+
Enum values from ScenarioType:
|
|
59
|
+
|
|
60
|
+
- group_chat: work/group chat scenario, suitable for group conversations such as
|
|
61
|
+
multi-person collaboration and project discussions
|
|
62
|
+
- assistant: assistant scenario, suitable for one-on-one AI assistant
|
|
63
|
+
conversations
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
scene_desc: Optional[Dict[str, object]]
|
|
67
|
+
"""Scene description object.
|
|
68
|
+
|
|
69
|
+
**Required for global config (group_id=null), not allowed for group config
|
|
70
|
+
(group_id provided).**
|
|
71
|
+
|
|
72
|
+
Can include fields like description, type, etc.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
tags: Optional[SequenceNotStr[str]]
|
|
76
|
+
"""Tag list"""
|
|
77
|
+
|
|
78
|
+
user_details: Optional[Dict[str, UserDetails]]
|
|
79
|
+
"""Participant details, key is user ID, value is user detail object"""
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class LlmCustomSettingBoundary(TypedDict, total=False):
|
|
83
|
+
"""LLM config for boundary detection (fast, cheap model recommended)"""
|
|
84
|
+
|
|
85
|
+
model: Required[str]
|
|
86
|
+
"""Model name"""
|
|
87
|
+
|
|
88
|
+
provider: Required[str]
|
|
89
|
+
"""LLM provider name"""
|
|
90
|
+
|
|
91
|
+
extra: Optional[Dict[str, object]]
|
|
92
|
+
"""Additional provider-specific configuration"""
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class LlmCustomSettingExtraction(TypedDict, total=False):
|
|
96
|
+
"""LLM config for memory extraction (high quality model recommended)"""
|
|
97
|
+
|
|
98
|
+
model: Required[str]
|
|
99
|
+
"""Model name"""
|
|
100
|
+
|
|
101
|
+
provider: Required[str]
|
|
102
|
+
"""LLM provider name"""
|
|
103
|
+
|
|
104
|
+
extra: Optional[Dict[str, object]]
|
|
105
|
+
"""Additional provider-specific configuration"""
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class LlmCustomSetting(TypedDict, total=False):
|
|
109
|
+
"""LLM custom settings for algorithm control.
|
|
110
|
+
|
|
111
|
+
**Only for global config (group_id=null),
|
|
112
|
+
not allowed for group config (group_id provided).**
|
|
113
|
+
|
|
114
|
+
Allows configuring different LLM providers/models for different tasks like boundary detection and memory extraction.
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
boundary: Optional[LlmCustomSettingBoundary]
|
|
118
|
+
"""LLM config for boundary detection (fast, cheap model recommended)"""
|
|
119
|
+
|
|
120
|
+
extra: Optional[Dict[str, object]]
|
|
121
|
+
"""Additional task-specific LLM configurations"""
|
|
122
|
+
|
|
123
|
+
extraction: Optional[LlmCustomSettingExtraction]
|
|
124
|
+
"""LLM config for memory extraction (high quality model recommended)"""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class UserDetails(TypedDict, total=False):
|
|
128
|
+
custom_role: Optional[str]
|
|
129
|
+
"""User's job/position role (e.g. developer, designer, manager)"""
|
|
130
|
+
|
|
131
|
+
extra: Optional[Dict[str, object]]
|
|
132
|
+
"""Additional information"""
|
|
133
|
+
|
|
134
|
+
full_name: Optional[str]
|
|
135
|
+
"""User full name"""
|
|
136
|
+
|
|
137
|
+
role: Optional[str]
|
|
138
|
+
"""
|
|
139
|
+
User type role, used to identify if this user is a human or AI. Enum values from
|
|
140
|
+
MessageSenderRole:
|
|
141
|
+
|
|
142
|
+
- user: Human user
|
|
143
|
+
- assistant: AI assistant/bot
|
|
144
|
+
"""
|