solana-agent 25.0.1__tar.gz → 26.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.1 → solana_agent-26.0.0}/PKG-INFO +3 -22
- {solana_agent-25.0.1 → solana_agent-26.0.0}/README.md +2 -21
- {solana_agent-25.0.1 → solana_agent-26.0.0}/pyproject.toml +1 -1
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/adapters/llm_adapter.py +9 -11
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/client/solana_agent.py +1 -1
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/repositories/memory.py +21 -8
- {solana_agent-25.0.1 → solana_agent-26.0.0}/LICENSE +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/adapters/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/client/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/domains/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/domains/agent.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/domains/routing.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/factories/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/factories/agent_factory.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/client/client.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/providers/llm.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/providers/memory.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/services/agent.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/services/query.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/interfaces/services/routing.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/plugins/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/plugins/manager.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/plugins/registry.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/plugins/tools/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/repositories/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/services/__init__.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/services/agent.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/services/query.py +0 -0
- {solana_agent-25.0.1 → solana_agent-26.0.0}/solana_agent/services/routing.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: solana-agent
|
3
|
-
Version:
|
3
|
+
Version: 26.0.0
|
4
4
|
Summary: Agentic IQ
|
5
5
|
License: MIT
|
6
6
|
Keywords: ai,openai,ai agents,agi
|
@@ -82,8 +82,8 @@ Build your AI business in three lines of code!
|
|
82
82
|
|
83
83
|
### LLMs
|
84
84
|
|
85
|
-
* [
|
86
|
-
* [
|
85
|
+
* [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash) or [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
86
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1)
|
87
87
|
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
|
88
88
|
|
89
89
|
|
@@ -313,25 +313,6 @@ config = {
|
|
313
313
|
}
|
314
314
|
```
|
315
315
|
|
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
316
|
## Tools
|
336
317
|
|
337
318
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -57,8 +57,8 @@ Build your AI business in three lines of code!
|
|
57
57
|
|
58
58
|
### LLMs
|
59
59
|
|
60
|
-
* [
|
61
|
-
* [
|
60
|
+
* [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash) or [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
|
61
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1)
|
62
62
|
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
|
63
63
|
|
64
64
|
|
@@ -288,25 +288,6 @@ config = {
|
|
288
288
|
}
|
289
289
|
```
|
290
290
|
|
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
291
|
## Tools
|
311
292
|
|
312
293
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -3,7 +3,6 @@ LLM provider adapters for the Solana Agent system.
|
|
3
3
|
|
4
4
|
These adapters implement the LLMProvider interface for different LLM services.
|
5
5
|
"""
|
6
|
-
from copy import deepcopy
|
7
6
|
from typing import AsyncGenerator, Literal, Optional, Type, TypeVar
|
8
7
|
|
9
8
|
from openai import AsyncOpenAI
|
@@ -24,7 +23,7 @@ class OpenAIAdapter(LLMProvider):
|
|
24
23
|
self.parse_model = "gpt-4o-mini"
|
25
24
|
self.text_model = "gpt-4o-mini"
|
26
25
|
self.transcription_model = "gpt-4o-mini-transcribe"
|
27
|
-
self.tts_model = "
|
26
|
+
self.tts_model = "tts-1"
|
28
27
|
|
29
28
|
async def tts(
|
30
29
|
self,
|
@@ -39,7 +38,7 @@ class OpenAIAdapter(LLMProvider):
|
|
39
38
|
|
40
39
|
Args:
|
41
40
|
text: Text to convert to speech
|
42
|
-
instructions:
|
41
|
+
instructions: Not used in this implementation
|
43
42
|
voice: Voice to use for synthesis
|
44
43
|
response_format: Audio format
|
45
44
|
|
@@ -50,7 +49,6 @@ class OpenAIAdapter(LLMProvider):
|
|
50
49
|
async with self.client.audio.speech.with_streaming_response.create(
|
51
50
|
model=self.tts_model,
|
52
51
|
voice=voice,
|
53
|
-
instructions=instructions,
|
54
52
|
input=text,
|
55
53
|
response_format=response_format
|
56
54
|
) as stream:
|
@@ -125,11 +123,10 @@ class OpenAIAdapter(LLMProvider):
|
|
125
123
|
"model": self.text_model,
|
126
124
|
}
|
127
125
|
|
128
|
-
client = deepcopy(self.client)
|
129
|
-
|
130
126
|
if api_key and base_url:
|
131
|
-
client
|
132
|
-
|
127
|
+
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
128
|
+
else:
|
129
|
+
client = self.client
|
133
130
|
|
134
131
|
if model:
|
135
132
|
request_params["model"] = model
|
@@ -166,15 +163,16 @@ class OpenAIAdapter(LLMProvider):
|
|
166
163
|
|
167
164
|
try:
|
168
165
|
if api_key and base_url:
|
169
|
-
|
170
|
-
|
166
|
+
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
167
|
+
else:
|
168
|
+
client = self.client
|
171
169
|
|
172
170
|
if model:
|
173
171
|
self.parse_model = model
|
174
172
|
|
175
173
|
# Create a patched client with TOOLS_STRICT mode
|
176
174
|
patched_client = instructor.from_openai(
|
177
|
-
|
175
|
+
client, mode=Mode.TOOLS_STRICT)
|
178
176
|
|
179
177
|
# Use instructor's structured generation with function calling
|
180
178
|
response = await patched_client.chat.completions.create(
|
@@ -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
|
@@ -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
|
File without changes
|
{solana_agent-25.0.1 → solana_agent-26.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
|