hindsight-client 0.1.0__py3-none-any.whl → 0.1.1__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.
@@ -157,7 +157,11 @@ class Hindsight:
157
157
  types: Optional[List[str]] = None,
158
158
  max_tokens: int = 4096,
159
159
  budget: str = "mid",
160
- ) -> List[RecallResult]:
160
+ trace: bool = False,
161
+ query_timestamp: Optional[str] = None,
162
+ include_entities: bool = False,
163
+ max_entity_tokens: int = 500,
164
+ ) -> RecallResponse:
161
165
  """
162
166
  Recall memories using semantic similarity.
163
167
 
@@ -167,20 +171,31 @@ class Hindsight:
167
171
  types: Optional list of fact types to filter (world, experience, opinion, observation)
168
172
  max_tokens: Maximum tokens in results (default: 4096)
169
173
  budget: Budget level for recall - "low", "mid", or "high" (default: "mid")
174
+ trace: Enable trace output (default: False)
175
+ query_timestamp: Optional ISO format date string (e.g., '2023-05-30T23:40:00')
176
+ include_entities: Include entity observations in results (default: False)
177
+ max_entity_tokens: Maximum tokens for entity observations (default: 500)
170
178
 
171
179
  Returns:
172
- List of RecallResult objects
180
+ RecallResponse with results, optional entities, and optional trace
173
181
  """
182
+ from hindsight_client_api.models import include_options, entity_include_options
183
+
184
+ include_opts = include_options.IncludeOptions(
185
+ entities=entity_include_options.EntityIncludeOptions(max_tokens=max_entity_tokens) if include_entities else None
186
+ )
187
+
174
188
  request_obj = recall_request.RecallRequest(
175
189
  query=query,
176
190
  types=types,
177
191
  budget=budget,
178
192
  max_tokens=max_tokens,
179
- trace=False,
193
+ trace=trace,
194
+ query_timestamp=query_timestamp,
195
+ include=include_opts,
180
196
  )
181
197
 
182
- response = _run_async(self._api.recall_memories(bank_id, request_obj))
183
- return response.results if hasattr(response, 'results') else []
198
+ return _run_async(self._api.recall_memories(bank_id, request_obj))
184
199
 
185
200
  def reflect(
186
201
  self,
@@ -209,55 +224,6 @@ class Hindsight:
209
224
 
210
225
  return _run_async(self._api.reflect(bank_id, request_obj))
211
226
 
212
- # Full-featured methods (expose more options)
213
-
214
- def recall_memories(
215
- self,
216
- bank_id: str,
217
- query: str,
218
- types: Optional[List[str]] = None,
219
- budget: str = "mid",
220
- max_tokens: int = 4096,
221
- trace: bool = False,
222
- query_timestamp: Optional[str] = None,
223
- include_entities: bool = True,
224
- max_entity_tokens: int = 500,
225
- ) -> RecallResponse:
226
- """
227
- Recall memories with all options (full-featured).
228
-
229
- Args:
230
- bank_id: The memory bank ID
231
- query: Search query
232
- types: Optional list of fact types to filter (world, experience, opinion, observation)
233
- budget: Budget level - "low", "mid", or "high"
234
- max_tokens: Maximum tokens in results
235
- trace: Enable trace output
236
- query_timestamp: Optional ISO format date string (e.g., '2023-05-30T23:40:00')
237
- include_entities: Include entity observations in results (default: True)
238
- max_entity_tokens: Maximum tokens for entity observations (default: 500)
239
-
240
- Returns:
241
- RecallResponse with results, optional entities, and optional trace
242
- """
243
- from hindsight_client_api.models import include_options, entity_include_options
244
-
245
- include_opts = include_options.IncludeOptions(
246
- entities=entity_include_options.EntityIncludeOptions(max_tokens=max_entity_tokens) if include_entities else None
247
- )
248
-
249
- request_obj = recall_request.RecallRequest(
250
- query=query,
251
- types=types,
252
- budget=budget,
253
- max_tokens=max_tokens,
254
- trace=trace,
255
- query_timestamp=query_timestamp,
256
- include=include_opts,
257
- )
258
-
259
- return _run_async(self._api.recall_memories(bank_id, request_obj))
260
-
261
227
  def list_memories(
262
228
  self,
263
229
  bank_id: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hindsight-client
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Python client for Hindsight - Semantic memory system with personality-driven thinking
5
5
  Author: Hindsight Team
6
6
  Requires-Python: >=3.10
@@ -1,5 +1,5 @@
1
1
  hindsight_client/__init__.py,sha256=Qq8DtPOglZOQfPkAyEWulmyBU4QMeNm6C5bb6TAY0jI,1679
2
- hindsight_client/hindsight_client.py,sha256=hQQIlSHYrXvTs099XTjmR3vJsZBoDP7gb_ErmhYohsY,13681
2
+ hindsight_client/hindsight_client.py,sha256=kTb-tpvinPgcPEasBmQgbuQIjTNs0IrL_zQxqvZp9pc,12647
3
3
  hindsight_client_api/__init__.py,sha256=7hfGgOu50_bmmuoz4-e4JVqubo5W39g_p3HHgaWZGRs,5941
4
4
  hindsight_client_api/api_client.py,sha256=gO_s4kVFGPJMawvNcdoqbpqptHIIKELylVni48b7rqU,27860
5
5
  hindsight_client_api/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
@@ -126,6 +126,6 @@ hindsight_client_api/test/test_retain_response.py,sha256=L_83q5aYZAb9mZhHwF7WAe4
126
126
  hindsight_client_api/test/test_update_disposition_request.py,sha256=bHQG7SqMD_KESLs61kVOTknYH-flvX5UjW9yJ9UK3RI,1550
127
127
  hindsight_client_api/test/test_validation_error.py,sha256=FiG2lcCSznxrbqRk2rcKv1ctpin0gGM5YGReZWMRnkw,1549
128
128
  hindsight_client_api/test/test_validation_error_loc_inner.py,sha256=Cy-VdSn1aBCRzpiI-2OSCrK376C5eHDywvbF16KNhMQ,1398
129
- hindsight_client-0.1.0.dist-info/METADATA,sha256=31gVaZCCyDdtpL8PGjDeu5Rxv28TF0DFgTesRdu-TIo,598
130
- hindsight_client-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
131
- hindsight_client-0.1.0.dist-info/RECORD,,
129
+ hindsight_client-0.1.1.dist-info/METADATA,sha256=CkDKkGnWYdq0ep78TUtcHgay-CZETOUf6HvVWENOCjU,598
130
+ hindsight_client-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
131
+ hindsight_client-0.1.1.dist-info/RECORD,,