solana-agent 0.0.20__py3-none-any.whl → 0.0.21__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 +19 -15
- {solana_agent-0.0.20.dist-info → solana_agent-0.0.21.dist-info}/METADATA +1 -1
- solana_agent-0.0.21.dist-info/RECORD +6 -0
- solana_agent-0.0.20.dist-info/RECORD +0 -6
- {solana_agent-0.0.20.dist-info → solana_agent-0.0.21.dist-info}/LICENSE +0 -0
- {solana_agent-0.0.20.dist-info → solana_agent-0.0.21.dist-info}/WHEEL +0 -0
solana_agent/ai.py
CHANGED
|
@@ -377,15 +377,15 @@ class AI:
|
|
|
377
377
|
limit (int, optional): Maximum number of facts to return. Defaults to 10.
|
|
378
378
|
|
|
379
379
|
Returns:
|
|
380
|
-
|
|
380
|
+
str: JSON string of matched facts or error message
|
|
381
381
|
|
|
382
382
|
Example:
|
|
383
383
|
```python
|
|
384
384
|
facts = ai.search_facts(
|
|
385
385
|
user_id="user123",
|
|
386
|
-
query="
|
|
386
|
+
query="How many cats do I have?"
|
|
387
387
|
)
|
|
388
|
-
# Returns: ["
|
|
388
|
+
# Returns: [{"fact": "user123 has 4 cats", ...}]
|
|
389
389
|
```
|
|
390
390
|
|
|
391
391
|
Note:
|
|
@@ -393,18 +393,22 @@ class AI:
|
|
|
393
393
|
This is a synchronous tool method required for OpenAI function calling.
|
|
394
394
|
"""
|
|
395
395
|
if self._sync_zep:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
396
|
+
try:
|
|
397
|
+
facts = []
|
|
398
|
+
results = self._sync_zep.memory.search_sessions(
|
|
399
|
+
user_id=user_id,
|
|
400
|
+
session_ids=[user_id],
|
|
401
|
+
text=query,
|
|
402
|
+
limit=limit,
|
|
403
|
+
)
|
|
404
|
+
for result in results.results:
|
|
405
|
+
fact = result.fact
|
|
406
|
+
facts.append(fact)
|
|
407
|
+
return json.dumps(facts)
|
|
408
|
+
except Exception as e:
|
|
409
|
+
return f"Failed to search facts. Error: {e}"
|
|
410
|
+
else:
|
|
411
|
+
return "Zep integration not configured."
|
|
408
412
|
|
|
409
413
|
# search internet tool - has to be sync
|
|
410
414
|
def search_internet(
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
+
solana_agent/ai.py,sha256=rzb7854cnM6abePB6uPrCSPddLiZ8njTC52BGUqaPFc,33867
|
|
3
|
+
solana_agent-0.0.21.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
+
solana_agent-0.0.21.dist-info/METADATA,sha256=MP86I2MaIHLGCE7TqW1Ay6WVo0uACFct3f0rxIdTb3k,5577
|
|
5
|
+
solana_agent-0.0.21.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
6
|
+
solana_agent-0.0.21.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
-
solana_agent/ai.py,sha256=UsGmhg710HrujIEsyXykhLYVvGMAT-fuHORMrtoAZ28,33672
|
|
3
|
-
solana_agent-0.0.20.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
-
solana_agent-0.0.20.dist-info/METADATA,sha256=wOdfWqoaZHVooYnutm1fGbPTaOfszhBWN-wHeBHus-8,5577
|
|
5
|
-
solana_agent-0.0.20.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
6
|
-
solana_agent-0.0.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|