solana-agent 29.1.2__py3-none-any.whl → 29.1.4__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/repositories/memory.py +16 -1
- {solana_agent-29.1.2.dist-info → solana_agent-29.1.4.dist-info}/METADATA +48 -10
- {solana_agent-29.1.2.dist-info → solana_agent-29.1.4.dist-info}/RECORD +6 -6
- {solana_agent-29.1.2.dist-info → solana_agent-29.1.4.dist-info}/LICENSE +0 -0
- {solana_agent-29.1.2.dist-info → solana_agent-29.1.4.dist-info}/WHEEL +0 -0
- {solana_agent-29.1.2.dist-info → solana_agent-29.1.4.dist-info}/entry_points.txt +0 -0
@@ -129,13 +129,28 @@ class MemoryRepository(MemoryProvider):
|
|
129
129
|
return
|
130
130
|
|
131
131
|
async def retrieve(self, user_id: str) -> str:
|
132
|
-
"""Retrieve memory context from Zep
|
132
|
+
"""Retrieve memory context from Zep and MongoDB."""
|
133
133
|
try:
|
134
134
|
memories = ""
|
135
135
|
if self.zep:
|
136
136
|
memory = await self.zep.memory.get(session_id=user_id)
|
137
137
|
if memory and memory.context:
|
138
138
|
memories = memory.context
|
139
|
+
|
140
|
+
if self.mongo:
|
141
|
+
query = {"user_id": user_id}
|
142
|
+
sort = [("timestamp", -1)]
|
143
|
+
limit = 1
|
144
|
+
skip = 0
|
145
|
+
mongo_memory = self.mongo.find(
|
146
|
+
self.collection, query, sort=sort, limit=limit, skip=skip
|
147
|
+
)
|
148
|
+
if mongo_memory:
|
149
|
+
for doc in mongo_memory:
|
150
|
+
user_message = doc.get("user_message")
|
151
|
+
assistant_message = doc.get("assistant_message")
|
152
|
+
if user_message and assistant_message:
|
153
|
+
memories += f"\nUser: {user_message}\nAssistant: {assistant_message}"
|
139
154
|
return memories
|
140
155
|
|
141
156
|
except Exception as e:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: solana-agent
|
3
|
-
Version: 29.1.
|
3
|
+
Version: 29.1.4
|
4
4
|
Summary: AI Agents for Solana
|
5
5
|
License: MIT
|
6
6
|
Keywords: solana,solana ai,solana agent,ai,ai agent,ai agents
|
@@ -14,20 +14,20 @@ Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
-
Requires-Dist: instructor (==1.
|
18
|
-
Requires-Dist: llama-index-core (==0.12.
|
17
|
+
Requires-Dist: instructor (==1.8.2)
|
18
|
+
Requires-Dist: llama-index-core (==0.12.37)
|
19
19
|
Requires-Dist: llama-index-embeddings-openai (==0.3.1)
|
20
|
-
Requires-Dist: logfire (==3.
|
21
|
-
Requires-Dist: openai (==1.
|
20
|
+
Requires-Dist: logfire (==3.16.0)
|
21
|
+
Requires-Dist: openai (==1.79.0)
|
22
22
|
Requires-Dist: pillow (==11.2.1)
|
23
23
|
Requires-Dist: pinecone (==6.0.2)
|
24
24
|
Requires-Dist: pydantic (>=2)
|
25
|
-
Requires-Dist: pymongo (==4.
|
26
|
-
Requires-Dist: pypdf (==5.
|
25
|
+
Requires-Dist: pymongo (==4.13.0)
|
26
|
+
Requires-Dist: pypdf (==5.5.0)
|
27
27
|
Requires-Dist: rich (>=13,<14.0)
|
28
28
|
Requires-Dist: scrubadub (==2.0.1)
|
29
|
-
Requires-Dist: typer (==0.15.
|
30
|
-
Requires-Dist: zep-cloud (==2.12.
|
29
|
+
Requires-Dist: typer (==0.15.4)
|
30
|
+
Requires-Dist: zep-cloud (==2.12.3)
|
31
31
|
Project-URL: Documentation, https://docs.solana-agent.com
|
32
32
|
Project-URL: Homepage, https://solana-agent.com
|
33
33
|
Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
|
@@ -760,7 +760,7 @@ from solana_agent import SolanaAgent
|
|
760
760
|
config = {
|
761
761
|
"tools": {
|
762
762
|
"image_gen": {
|
763
|
-
"provider": "
|
763
|
+
"provider": "openai", # Required: either "openai", "grok", or "gemini"
|
764
764
|
"api_key": "your-api-key", # Required: your OpenAI or Grok or Gemini API key
|
765
765
|
"s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
|
766
766
|
"s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
|
@@ -786,6 +786,44 @@ async for response in solana_agent.process("user123", "Generate an image of a sm
|
|
786
786
|
print(response, end="")
|
787
787
|
```
|
788
788
|
|
789
|
+
### Nemo Agent
|
790
|
+
|
791
|
+
This plugin allows the agent to generate python programs using [Nemo Agent](https://nemo-agent.com) and uploads the files in a ZIP file to s3-compatible storage. It returns the public URL of the zip file.
|
792
|
+
|
793
|
+
This has been tested using [Cloudflare R2](https://developers.cloudflare.com/r2/).
|
794
|
+
|
795
|
+
```python
|
796
|
+
from solana_agent import SolanaAgent
|
797
|
+
|
798
|
+
config = {
|
799
|
+
"tools": {
|
800
|
+
"nemo_agent": {
|
801
|
+
"provider": "openai", # Required: either "openai" or "gemini"
|
802
|
+
"api_key": "your-api-key", # Required: your OpenAI or Gemini API key
|
803
|
+
"s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
|
804
|
+
"s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
|
805
|
+
"s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
|
806
|
+
"s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
|
807
|
+
"s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
|
808
|
+
"s3_public_url_base": "https://your-cdn-or-bucket-url.com/", # Optional: Custom base URL for public links (include trailing slash). If omitted, a standard URL is constructed.
|
809
|
+
}
|
810
|
+
},
|
811
|
+
"agents": [
|
812
|
+
{
|
813
|
+
"name": "python_dev",
|
814
|
+
"instructions": "You are an expert Python Developer. You always use your nemo_agent tool to generate python code.",
|
815
|
+
"specialization": "Python Developer",
|
816
|
+
"tools": ["nemo_agent"], # Enable the tool for this agent
|
817
|
+
}
|
818
|
+
]
|
819
|
+
}
|
820
|
+
|
821
|
+
solana_agent = SolanaAgent(config=config)
|
822
|
+
|
823
|
+
async for response in solana_agent.process("user123", "Generate an example leetcode medium in Python and give me the zip file."):
|
824
|
+
print(response, end="")
|
825
|
+
```
|
826
|
+
|
789
827
|
### Inline Tool Example
|
790
828
|
|
791
829
|
```python
|
@@ -30,14 +30,14 @@ solana_agent/plugins/registry.py,sha256=VAG0BWdUUIsEE-VpATtHi8qat7ziPuh7pKuzGXau
|
|
30
30
|
solana_agent/plugins/tools/__init__.py,sha256=VDjJxvUjefIy10VztQ9WDKgIegvDbIXBQWsHLhxdZ3o,125
|
31
31
|
solana_agent/plugins/tools/auto_tool.py,sha256=uihijtlc9CCqCIaRcwPuuN7o1SHIpWL2GV3vr33GG3E,1576
|
32
32
|
solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
|
33
|
-
solana_agent/repositories/memory.py,sha256=
|
33
|
+
solana_agent/repositories/memory.py,sha256=SKQJJisrERccqd4cm4ERlp5BmKHVQAp1fzp8ce4i2bw,8377
|
34
34
|
solana_agent/services/__init__.py,sha256=iko0c2MlF8b_SA_nuBGFllr2E3g_JowOrOzGcnU9tkA,162
|
35
35
|
solana_agent/services/agent.py,sha256=QoeQq_OEWyLdBS0FPa-lXm5qiE0RnRfrCKiFTfOSGE0,42369
|
36
36
|
solana_agent/services/knowledge_base.py,sha256=ZvOPrSmcNDgUzz4bJIQ4LeRl9vMZiK9hOfs71IpB7Bk,32735
|
37
37
|
solana_agent/services/query.py,sha256=ENUfs4WSTpODMRXppDVW-Y3li9jYn8pOfQIHIPerUdQ,18498
|
38
38
|
solana_agent/services/routing.py,sha256=C5Ku4t9TqvY7S8wlUPMTC04HCrT4Ib3E8Q8yX0lVU_s,7137
|
39
|
-
solana_agent-29.1.
|
40
|
-
solana_agent-29.1.
|
41
|
-
solana_agent-29.1.
|
42
|
-
solana_agent-29.1.
|
43
|
-
solana_agent-29.1.
|
39
|
+
solana_agent-29.1.4.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
40
|
+
solana_agent-29.1.4.dist-info/METADATA,sha256=HkmnzAr3_OWmlQjK8SjtdYL3dXe6pDBPruZZCsUUZB0,35804
|
41
|
+
solana_agent-29.1.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
42
|
+
solana_agent-29.1.4.dist-info/entry_points.txt,sha256=-AuT_mfqk8dlZ0pHuAjx1ouAWpTRjpqvEUa6YV3lmc0,53
|
43
|
+
solana_agent-29.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|