solana-agent 25.0.2__tar.gz → 27.0.0__tar.gz
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-25.0.2/README.md → solana_agent-27.0.0/PKG-INFO +35 -46
- solana_agent-25.0.2/PKG-INFO → solana_agent-27.0.0/README.md +9 -72
- {solana_agent-25.0.2 → solana_agent-27.0.0}/pyproject.toml +5 -5
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/adapters/llm_adapter.py +2 -3
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/client/solana_agent.py +1 -1
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/factories/agent_factory.py +11 -31
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/repositories/memory.py +21 -8
- {solana_agent-25.0.2 → solana_agent-27.0.0}/LICENSE +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/adapters/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/client/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/domains/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/domains/agent.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/domains/routing.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/factories/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/client/client.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/providers/llm.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/providers/memory.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/services/agent.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/services/query.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/services/routing.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/plugins/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/plugins/manager.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/plugins/registry.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/plugins/tools/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/repositories/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/services/__init__.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/services/agent.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/services/query.py +0 -0
- {solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/services/routing.py +0 -0
@@ -1,3 +1,28 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: solana-agent
|
3
|
+
Version: 27.0.0
|
4
|
+
Summary: Agentic IQ
|
5
|
+
License: MIT
|
6
|
+
Keywords: ai,openai,ai agents,agi
|
7
|
+
Author: Bevan Hunt
|
8
|
+
Author-email: bevan@bevanhunt.com
|
9
|
+
Requires-Python: >=3.12,<4.0
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
11
|
+
Classifier: Intended Audience :: Developers
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
+
Requires-Dist: instructor (>=1.7.9,<2.0.0)
|
18
|
+
Requires-Dist: openai (>=1.72.0,<2.0.0)
|
19
|
+
Requires-Dist: pydantic (>=2.11.3,<3.0.0)
|
20
|
+
Requires-Dist: pymongo (>=4.12.0,<5.0.0)
|
21
|
+
Requires-Dist: zep-cloud (>=2.10.0,<3.0.0)
|
22
|
+
Project-URL: Documentation, https://docs.solana-agent.com
|
23
|
+
Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
|
24
|
+
Description-Content-Type: text/markdown
|
25
|
+
|
1
26
|
# Solana Agent
|
2
27
|
|
3
28
|
[](https://pypi.org/project/solana-agent/)
|
@@ -51,14 +76,14 @@ Build your AI business in three lines of code!
|
|
51
76
|
### Tech
|
52
77
|
|
53
78
|
* [Python](https://python.org) - Programming Language
|
54
|
-
* [OpenAI](https://openai.com)
|
79
|
+
* [OpenAI](https://openai.com) - LLM Provider
|
55
80
|
* [MongoDB](https://mongodb.com) - Conversational History (optional)
|
56
81
|
* [Zep Cloud](https://getzep.com) - Conversational Memory (optional)
|
57
82
|
|
58
83
|
### LLMs
|
59
84
|
|
60
|
-
* [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
61
|
-
* [
|
85
|
+
* [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
86
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1)
|
62
87
|
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
|
63
88
|
|
64
89
|
|
@@ -121,9 +146,6 @@ Keep this in mind while designing your agentic systems using Solana Agent.
|
|
121
146
|
from solana_agent import SolanaAgent
|
122
147
|
|
123
148
|
config = {
|
124
|
-
"gemini": {
|
125
|
-
"api_key": "your-gemini-api-key",
|
126
|
-
},
|
127
149
|
"openai": {
|
128
150
|
"api_key": "your-openai-api-key",
|
129
151
|
},
|
@@ -153,9 +175,6 @@ async for response in solana_agent.process("user123", "What are the latest AI de
|
|
153
175
|
from solana_agent import SolanaAgent
|
154
176
|
|
155
177
|
config = {
|
156
|
-
"gemini": {
|
157
|
-
"api_key": "your-gemini-api-key",
|
158
|
-
},
|
159
178
|
"openai": {
|
160
179
|
"api_key": "your-openai-api-key",
|
161
180
|
},
|
@@ -187,9 +206,6 @@ async for response in solana_agent.process("user123", audio_content, output_form
|
|
187
206
|
from solana_agent import SolanaAgent
|
188
207
|
|
189
208
|
config = {
|
190
|
-
"gemini": {
|
191
|
-
"api_key": "your-gemini-api-key",
|
192
|
-
},
|
193
209
|
"openai": {
|
194
210
|
"api_key": "your-openai-api-key",
|
195
211
|
},
|
@@ -219,9 +235,6 @@ async for response in solana_agent.process("user123", "What is the latest news o
|
|
219
235
|
from solana_agent import SolanaAgent
|
220
236
|
|
221
237
|
config = {
|
222
|
-
"gemini": {
|
223
|
-
"api_key": "your-gemini-api-key",
|
224
|
-
},
|
225
238
|
"openai": {
|
226
239
|
"api_key": "your-openai-api-key",
|
227
240
|
},
|
@@ -288,25 +301,6 @@ config = {
|
|
288
301
|
}
|
289
302
|
```
|
290
303
|
|
291
|
-
### Customize Speech
|
292
|
-
|
293
|
-
This is an audio to audio example using the `audio_instructions` parameter.
|
294
|
-
|
295
|
-
You can prompt to control aspects of speech, including:
|
296
|
-
|
297
|
-
* Accent
|
298
|
-
* Emotional range
|
299
|
-
* Intonation
|
300
|
-
* Impressions
|
301
|
-
* Speed of speech
|
302
|
-
* Tone
|
303
|
-
* Whispering
|
304
|
-
|
305
|
-
```python
|
306
|
-
async for response in solana_agent.process("user123", audio_content, output_format="audio", audio_voice="nova", audio_input_format="webm", audio_output_format="aac", audio_instructions="You speak with an American southern accent"):
|
307
|
-
print(response, end="")
|
308
|
-
```
|
309
|
-
|
310
304
|
## Tools
|
311
305
|
|
312
306
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -324,9 +318,6 @@ Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools
|
|
324
318
|
from solana_agent import SolanaAgent
|
325
319
|
|
326
320
|
config = {
|
327
|
-
"gemini": {
|
328
|
-
"api_key": "your-gemini-api-key",
|
329
|
-
},
|
330
321
|
"openai": {
|
331
322
|
"api_key": "your-openai-api-key",
|
332
323
|
},
|
@@ -409,9 +400,6 @@ class TestTool(Tool):
|
|
409
400
|
}
|
410
401
|
|
411
402
|
config = {
|
412
|
-
"gemini": {
|
413
|
-
"api_key": "your-gemini-api-key",
|
414
|
-
},
|
415
403
|
"openai": {
|
416
404
|
"api_key": "your-openai-api-key",
|
417
405
|
},
|
@@ -451,9 +439,6 @@ This knowledge is accessible to all your AI agents.
|
|
451
439
|
from solana_agent import SolanaAgent
|
452
440
|
|
453
441
|
config = {
|
454
|
-
"gemini": {
|
455
|
-
"api_key": "your-gemini-api-key",
|
456
|
-
},
|
457
442
|
"openai": {
|
458
443
|
"api_key": "your-openai-api-key",
|
459
444
|
},
|
@@ -481,9 +466,6 @@ from solana_agent import SolanaAgent
|
|
481
466
|
from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
|
482
467
|
|
483
468
|
config = {
|
484
|
-
"gemini": {
|
485
|
-
"api_key": "your-gemini-api-key",
|
486
|
-
},
|
487
469
|
"openai": {
|
488
470
|
"api_key": "your-openai-api-key",
|
489
471
|
},
|
@@ -536,6 +518,12 @@ The official example app written in FastAPI and Next.js
|
|
536
518
|
|
537
519
|
[Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
|
538
520
|
|
521
|
+
## Demo App
|
522
|
+
|
523
|
+
The official demo app written in FastAPI and Next.js
|
524
|
+
|
525
|
+
[Solana Agent Demo App](https://demo.solana-agent.com)
|
526
|
+
|
539
527
|
## Agent Framework Comparisons
|
540
528
|
|
541
529
|
[Compare Python Agent Frameworks](https://github.com/truemagic-coder/solana-agent/wiki/Agent-Framework-Comparisons)
|
@@ -555,3 +543,4 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
|
|
555
543
|
## License
|
556
544
|
|
557
545
|
This project is licensed under the MIT License - see the LICENSE file for details.
|
546
|
+
|
@@ -1,28 +1,3 @@
|
|
1
|
-
Metadata-Version: 2.3
|
2
|
-
Name: solana-agent
|
3
|
-
Version: 25.0.2
|
4
|
-
Summary: Agentic IQ
|
5
|
-
License: MIT
|
6
|
-
Keywords: ai,openai,ai agents,agi
|
7
|
-
Author: Bevan Hunt
|
8
|
-
Author-email: bevan@bevanhunt.com
|
9
|
-
Requires-Python: >=3.12,<4.0
|
10
|
-
Classifier: Development Status :: 5 - Production/Stable
|
11
|
-
Classifier: Intended Audience :: Developers
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
16
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
-
Requires-Dist: instructor (>=1.7.9,<2.0.0)
|
18
|
-
Requires-Dist: openai (>=1.71.0,<2.0.0)
|
19
|
-
Requires-Dist: pydantic (>=2.11.2,<3.0.0)
|
20
|
-
Requires-Dist: pymongo (>=4.11.3,<5.0.0)
|
21
|
-
Requires-Dist: zep-cloud (>=2.9.0,<3.0.0)
|
22
|
-
Project-URL: Documentation, https://docs.solana-agent.com
|
23
|
-
Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
|
24
|
-
Description-Content-Type: text/markdown
|
25
|
-
|
26
1
|
# Solana Agent
|
27
2
|
|
28
3
|
[](https://pypi.org/project/solana-agent/)
|
@@ -76,14 +51,14 @@ Build your AI business in three lines of code!
|
|
76
51
|
### Tech
|
77
52
|
|
78
53
|
* [Python](https://python.org) - Programming Language
|
79
|
-
* [OpenAI](https://openai.com)
|
54
|
+
* [OpenAI](https://openai.com) - LLM Provider
|
80
55
|
* [MongoDB](https://mongodb.com) - Conversational History (optional)
|
81
56
|
* [Zep Cloud](https://getzep.com) - Conversational Memory (optional)
|
82
57
|
|
83
58
|
### LLMs
|
84
59
|
|
85
|
-
* [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
86
|
-
* [
|
60
|
+
* [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
61
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1)
|
87
62
|
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
|
88
63
|
|
89
64
|
|
@@ -146,9 +121,6 @@ Keep this in mind while designing your agentic systems using Solana Agent.
|
|
146
121
|
from solana_agent import SolanaAgent
|
147
122
|
|
148
123
|
config = {
|
149
|
-
"gemini": {
|
150
|
-
"api_key": "your-gemini-api-key",
|
151
|
-
},
|
152
124
|
"openai": {
|
153
125
|
"api_key": "your-openai-api-key",
|
154
126
|
},
|
@@ -178,9 +150,6 @@ async for response in solana_agent.process("user123", "What are the latest AI de
|
|
178
150
|
from solana_agent import SolanaAgent
|
179
151
|
|
180
152
|
config = {
|
181
|
-
"gemini": {
|
182
|
-
"api_key": "your-gemini-api-key",
|
183
|
-
},
|
184
153
|
"openai": {
|
185
154
|
"api_key": "your-openai-api-key",
|
186
155
|
},
|
@@ -212,9 +181,6 @@ async for response in solana_agent.process("user123", audio_content, output_form
|
|
212
181
|
from solana_agent import SolanaAgent
|
213
182
|
|
214
183
|
config = {
|
215
|
-
"gemini": {
|
216
|
-
"api_key": "your-gemini-api-key",
|
217
|
-
},
|
218
184
|
"openai": {
|
219
185
|
"api_key": "your-openai-api-key",
|
220
186
|
},
|
@@ -244,9 +210,6 @@ async for response in solana_agent.process("user123", "What is the latest news o
|
|
244
210
|
from solana_agent import SolanaAgent
|
245
211
|
|
246
212
|
config = {
|
247
|
-
"gemini": {
|
248
|
-
"api_key": "your-gemini-api-key",
|
249
|
-
},
|
250
213
|
"openai": {
|
251
214
|
"api_key": "your-openai-api-key",
|
252
215
|
},
|
@@ -313,25 +276,6 @@ config = {
|
|
313
276
|
}
|
314
277
|
```
|
315
278
|
|
316
|
-
### Customize Speech
|
317
|
-
|
318
|
-
This is an audio to audio example using the `audio_instructions` parameter.
|
319
|
-
|
320
|
-
You can prompt to control aspects of speech, including:
|
321
|
-
|
322
|
-
* Accent
|
323
|
-
* Emotional range
|
324
|
-
* Intonation
|
325
|
-
* Impressions
|
326
|
-
* Speed of speech
|
327
|
-
* Tone
|
328
|
-
* Whispering
|
329
|
-
|
330
|
-
```python
|
331
|
-
async for response in solana_agent.process("user123", audio_content, output_format="audio", audio_voice="nova", audio_input_format="webm", audio_output_format="aac", audio_instructions="You speak with an American southern accent"):
|
332
|
-
print(response, end="")
|
333
|
-
```
|
334
|
-
|
335
279
|
## Tools
|
336
280
|
|
337
281
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -349,9 +293,6 @@ Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools
|
|
349
293
|
from solana_agent import SolanaAgent
|
350
294
|
|
351
295
|
config = {
|
352
|
-
"gemini": {
|
353
|
-
"api_key": "your-gemini-api-key",
|
354
|
-
},
|
355
296
|
"openai": {
|
356
297
|
"api_key": "your-openai-api-key",
|
357
298
|
},
|
@@ -434,9 +375,6 @@ class TestTool(Tool):
|
|
434
375
|
}
|
435
376
|
|
436
377
|
config = {
|
437
|
-
"gemini": {
|
438
|
-
"api_key": "your-gemini-api-key",
|
439
|
-
},
|
440
378
|
"openai": {
|
441
379
|
"api_key": "your-openai-api-key",
|
442
380
|
},
|
@@ -476,9 +414,6 @@ This knowledge is accessible to all your AI agents.
|
|
476
414
|
from solana_agent import SolanaAgent
|
477
415
|
|
478
416
|
config = {
|
479
|
-
"gemini": {
|
480
|
-
"api_key": "your-gemini-api-key",
|
481
|
-
},
|
482
417
|
"openai": {
|
483
418
|
"api_key": "your-openai-api-key",
|
484
419
|
},
|
@@ -506,9 +441,6 @@ from solana_agent import SolanaAgent
|
|
506
441
|
from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
|
507
442
|
|
508
443
|
config = {
|
509
|
-
"gemini": {
|
510
|
-
"api_key": "your-gemini-api-key",
|
511
|
-
},
|
512
444
|
"openai": {
|
513
445
|
"api_key": "your-openai-api-key",
|
514
446
|
},
|
@@ -561,6 +493,12 @@ The official example app written in FastAPI and Next.js
|
|
561
493
|
|
562
494
|
[Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
|
563
495
|
|
496
|
+
## Demo App
|
497
|
+
|
498
|
+
The official demo app written in FastAPI and Next.js
|
499
|
+
|
500
|
+
[Solana Agent Demo App](https://demo.solana-agent.com)
|
501
|
+
|
564
502
|
## Agent Framework Comparisons
|
565
503
|
|
566
504
|
[Compare Python Agent Frameworks](https://github.com/truemagic-coder/solana-agent/wiki/Agent-Framework-Comparisons)
|
@@ -580,4 +518,3 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
|
|
580
518
|
## License
|
581
519
|
|
582
520
|
This project is licensed under the MIT License - see the LICENSE file for details.
|
583
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "solana-agent"
|
3
|
-
version = "
|
3
|
+
version = "27.0.0"
|
4
4
|
description = "Agentic IQ"
|
5
5
|
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
|
6
6
|
license = "MIT"
|
@@ -23,10 +23,10 @@ python_paths = [".", "tests"]
|
|
23
23
|
|
24
24
|
[tool.poetry.dependencies]
|
25
25
|
python = ">=3.12,<4.0"
|
26
|
-
openai = "^1.
|
27
|
-
pydantic = "^2.11.
|
28
|
-
pymongo = "^4.
|
29
|
-
zep-cloud = "^2.
|
26
|
+
openai = "^1.72.0"
|
27
|
+
pydantic = "^2.11.3"
|
28
|
+
pymongo = "^4.12.0"
|
29
|
+
zep-cloud = "^2.10.0"
|
30
30
|
instructor = "^1.7.9"
|
31
31
|
|
32
32
|
[tool.poetry.group.dev.dependencies]
|
@@ -23,7 +23,7 @@ class OpenAIAdapter(LLMProvider):
|
|
23
23
|
self.parse_model = "gpt-4o-mini"
|
24
24
|
self.text_model = "gpt-4o-mini"
|
25
25
|
self.transcription_model = "gpt-4o-mini-transcribe"
|
26
|
-
self.tts_model = "
|
26
|
+
self.tts_model = "tts-1"
|
27
27
|
|
28
28
|
async def tts(
|
29
29
|
self,
|
@@ -38,7 +38,7 @@ class OpenAIAdapter(LLMProvider):
|
|
38
38
|
|
39
39
|
Args:
|
40
40
|
text: Text to convert to speech
|
41
|
-
instructions:
|
41
|
+
instructions: Not used in this implementation
|
42
42
|
voice: Voice to use for synthesis
|
43
43
|
response_format: Audio format
|
44
44
|
|
@@ -49,7 +49,6 @@ class OpenAIAdapter(LLMProvider):
|
|
49
49
|
async with self.client.audio.speech.with_streaming_response.create(
|
50
50
|
model=self.tts_model,
|
51
51
|
voice=voice,
|
52
|
-
instructions=instructions,
|
53
52
|
input=text,
|
54
53
|
response_format=response_format
|
55
54
|
) as stream:
|
@@ -65,7 +65,7 @@ class SolanaAgent(SolanaAgentInterface):
|
|
65
65
|
prompt: Optional prompt for the agent
|
66
66
|
output_format: Response format ("text" or "audio")
|
67
67
|
audio_voice: Voice to use for audio output
|
68
|
-
audio_instructions:
|
68
|
+
audio_instructions: Not used in this version
|
69
69
|
audio_output_format: Audio output format
|
70
70
|
audio_input_format: Audio input format
|
71
71
|
router: Optional routing service for processing
|
@@ -86,38 +86,18 @@ class SolanaAgentFactory:
|
|
86
86
|
zep_api_key=config["zep"].get("api_key")
|
87
87
|
)
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
api_key=config["gemini"]["api_key"],
|
96
|
-
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
97
|
-
model="gemini-2.0-flash",
|
98
|
-
)
|
99
|
-
|
100
|
-
# Create routing service
|
101
|
-
routing_service = RoutingService(
|
102
|
-
llm_provider=llm_adapter,
|
103
|
-
agent_service=agent_service,
|
104
|
-
api_key=config["gemini"]["api_key"],
|
105
|
-
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
106
|
-
model="gemini-2.0-flash",
|
107
|
-
)
|
108
|
-
else:
|
109
|
-
# Create primary services
|
110
|
-
agent_service = AgentService(
|
111
|
-
llm_provider=llm_adapter,
|
112
|
-
business_mission=business_mission,
|
113
|
-
config=config,
|
114
|
-
)
|
89
|
+
# Create primary services
|
90
|
+
agent_service = AgentService(
|
91
|
+
llm_provider=llm_adapter,
|
92
|
+
business_mission=business_mission,
|
93
|
+
config=config,
|
94
|
+
)
|
115
95
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
96
|
+
# Create routing service
|
97
|
+
routing_service = RoutingService(
|
98
|
+
llm_provider=llm_adapter,
|
99
|
+
agent_service=agent_service,
|
100
|
+
)
|
121
101
|
|
122
102
|
# Debug the agent service tool registry
|
123
103
|
print(
|
@@ -121,17 +121,30 @@ class MemoryRepository(MemoryProvider):
|
|
121
121
|
|
122
122
|
async def retrieve(self, user_id: str) -> str:
|
123
123
|
"""Retrieve memory context from Zep only."""
|
124
|
-
if not self.zep:
|
125
|
-
return ""
|
126
|
-
|
127
124
|
try:
|
128
|
-
|
129
|
-
if
|
130
|
-
|
131
|
-
|
125
|
+
memories = ""
|
126
|
+
if self.zep:
|
127
|
+
memory = await self.zep.memory.get(session_id=user_id)
|
128
|
+
if memory and memory.context:
|
129
|
+
memories = memory.context
|
130
|
+
if self.mongo:
|
131
|
+
mongo_memory = self.mongo.find(
|
132
|
+
self.collection,
|
133
|
+
{"user_id": user_id},
|
134
|
+
sort=[("timestamp", -1)],
|
135
|
+
limit=3
|
136
|
+
)
|
137
|
+
if mongo_memory:
|
138
|
+
# Concatenate MongoDB memory with Zep memory
|
139
|
+
mongo_memory = [
|
140
|
+
f"{msg['user_message']} {msg['assistant_message']}"
|
141
|
+
for msg in mongo_memory
|
142
|
+
]
|
143
|
+
memories += " ".join(mongo_memory)
|
144
|
+
return memories
|
132
145
|
|
133
146
|
except Exception as e:
|
134
|
-
print(f"Error retrieving
|
147
|
+
print(f"Error retrieving memories: {e}")
|
135
148
|
return ""
|
136
149
|
|
137
150
|
async def delete(self, user_id: str) -> None:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{solana_agent-25.0.2 → solana_agent-27.0.0}/solana_agent/interfaces/providers/data_storage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|