solana-agent 0.0.101__py3-none-any.whl → 1.0.0__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 +29 -1
- {solana_agent-0.0.101.dist-info → solana_agent-1.0.0.dist-info}/METADATA +2 -2
- solana_agent-1.0.0.dist-info/RECORD +6 -0
- solana_agent-0.0.101.dist-info/RECORD +0 -6
- {solana_agent-0.0.101.dist-info → solana_agent-1.0.0.dist-info}/LICENSE +0 -0
- {solana_agent-0.0.101.dist-info → solana_agent-1.0.0.dist-info}/WHEEL +0 -0
solana_agent/ai.py
CHANGED
|
@@ -429,12 +429,40 @@ class AI:
|
|
|
429
429
|
except Exception as e:
|
|
430
430
|
return f"Failed to search X. Error: {e}"
|
|
431
431
|
|
|
432
|
+
async def clear_user_history(self, user_id: str):
|
|
433
|
+
"""Clear stored conversation history for a specific user.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
user_id (str): Unique identifier for the user whose history should be cleared
|
|
437
|
+
|
|
438
|
+
Example:
|
|
439
|
+
```python
|
|
440
|
+
await ai.clear_user_history("user123")
|
|
441
|
+
# Clears all stored messages, facts, and threads for user123
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Note:
|
|
445
|
+
This is an async method and must be awaited.
|
|
446
|
+
"""
|
|
447
|
+
try:
|
|
448
|
+
await self.delete_assistant_thread(user_id)
|
|
449
|
+
except Exception:
|
|
450
|
+
pass
|
|
451
|
+
try:
|
|
452
|
+
await self._database.clear_user_history(user_id)
|
|
453
|
+
except Exception:
|
|
454
|
+
pass
|
|
455
|
+
try:
|
|
456
|
+
await self.delete_facts(user_id)
|
|
457
|
+
except Exception:
|
|
458
|
+
pass
|
|
459
|
+
|
|
432
460
|
async def delete_assistant_thread(self, user_id: str):
|
|
433
461
|
"""Delete stored conversation thread for a user on OpenAI.
|
|
434
462
|
|
|
435
463
|
Example:
|
|
436
464
|
```python
|
|
437
|
-
await ai.delete_assistant_thread(
|
|
465
|
+
await ai.delete_assistant_thread("user123")
|
|
438
466
|
# Deletes the assistant conversation thread for a user
|
|
439
467
|
```
|
|
440
468
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: solana-agent
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Build self-learning AI Agents
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: ai,openai,ai agents
|
|
@@ -98,7 +98,7 @@ pip install solana-agent
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Documentation
|
|
101
|
-
*
|
|
101
|
+
* Each public method has a docstring for real-time IDE hinting
|
|
102
102
|
|
|
103
103
|
## Production Apps
|
|
104
104
|
* [Solana Agent Copilot](https://ai.solana-agent.com) - Solana Token AI Copilot using streaming text conversations
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
+
solana_agent/ai.py,sha256=d0F9B4D-mfRqt-7t0imAH8x1sB_UIiVZhTPiZZF1vGo,29103
|
|
3
|
+
solana_agent-1.0.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
+
solana_agent-1.0.0.dist-info/METADATA,sha256=0kpQ3rD9T0cVG8zeIQ6LVMeIxtGBpGhaofDsYdMq0TI,4341
|
|
5
|
+
solana_agent-1.0.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
6
|
+
solana_agent-1.0.0.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
-
solana_agent/ai.py,sha256=XMXAXwFG62PRSfjH0cbRMRixMulCJECFtg7B9z0nmSk,28291
|
|
3
|
-
solana_agent-0.0.101.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
-
solana_agent-0.0.101.dist-info/METADATA,sha256=DPGz_VxS2T56RDxrIrgdFq0HBRksmRzVmJmoe67sI6Q,4343
|
|
5
|
-
solana_agent-0.0.101.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
6
|
-
solana_agent-0.0.101.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|