solana-agent 0.0.17__py3-none-any.whl → 0.0.19__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.
solana_agent/ai.py CHANGED
@@ -367,14 +367,14 @@ class AI:
367
367
  self,
368
368
  user_id: str,
369
369
  query: str,
370
- limit: int | None = None,
371
- ) -> List[str] | None:
370
+ limit: int = 10,
371
+ ) -> str:
372
372
  """Search stored conversation facts using Zep memory integration.
373
373
 
374
374
  Args:
375
375
  user_id (str): Unique identifier for the user
376
376
  query (str): Search query to find relevant facts
377
- limit (int | None, optional): Maximum number of facts to return. Defaults to None.
377
+ limit (int, optional): Maximum number of facts to return. Defaults to 10.
378
378
 
379
379
  Returns:
380
380
  List[str] | None: List of found facts or None if Zep is not configured
@@ -383,28 +383,27 @@ class AI:
383
383
  ```python
384
384
  facts = ai.search_facts(
385
385
  user_id="user123",
386
- query="project requirements",
387
- limit=5
386
+ query="project requirements"
388
387
  )
389
388
  # Returns: ["Fact 1", "Fact 2", ...]
390
389
  ```
391
390
 
392
391
  Note:
393
- Requires Zep integration to be configured with valid API key and URL.
392
+ Requires Zep integration to be configured with valid API key.
394
393
  This is a synchronous tool method required for OpenAI function calling.
395
394
  """
396
395
  if self._sync_zep:
397
396
  facts = []
398
397
  results = self._sync_zep.memory.search_sessions(
399
398
  user_id=user_id,
399
+ session_ids=[user_id],
400
400
  text=query,
401
401
  limit=limit,
402
402
  )
403
403
  for result in results.results:
404
404
  fact = result.fact.fact
405
- if fact:
406
- facts.append(fact)
407
- return facts
405
+ facts.append(fact)
406
+ return json.dumps(facts)
408
407
  return None
409
408
 
410
409
  # search internet tool - has to be sync
@@ -523,8 +522,6 @@ class AI:
523
522
  try:
524
523
  if use_facts:
525
524
  facts = self.search_facts(user_id, query)
526
- if not facts:
527
- facts = ""
528
525
  else:
529
526
  facts = ""
530
527
  if use_perplexity:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 0.0.17
3
+ Version: 0.0.19
4
4
  Summary: Build self-learning AI Agents
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents
@@ -0,0 +1,6 @@
1
+ solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
2
+ solana_agent/ai.py,sha256=3u-mVeh1t26tAnvbu8S24VvCJ9VtryGqUOUOWAgGsgs,33615
3
+ solana_agent-0.0.19.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
4
+ solana_agent-0.0.19.dist-info/METADATA,sha256=LIFyc8pPHlMUFkc1zovP3FeL4rCyKQbe3YM2j2xWcuE,5577
5
+ solana_agent-0.0.19.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
+ solana_agent-0.0.19.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
2
- solana_agent/ai.py,sha256=touZTaRIq2ENMa1ZfgD6sX4c50EBCQk0Pu-1ORxYT-Q,33718
3
- solana_agent-0.0.17.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
4
- solana_agent-0.0.17.dist-info/METADATA,sha256=P5_3dMq2a4kr08L004NS95uL7pdziABqCbvih85yLo0,5577
5
- solana_agent-0.0.17.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
- solana_agent-0.0.17.dist-info/RECORD,,