solana-agent 15.1.2__py3-none-any.whl → 16.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/adapters/llm_adapter.py +8 -14
- solana_agent/adapters/mongodb_adapter.py +6 -1
- solana_agent/client/solana_agent.py +17 -12
- solana_agent/interfaces/client/client.py +9 -7
- solana_agent/interfaces/providers/data_storage.py +5 -0
- solana_agent/interfaces/providers/llm.py +5 -3
- solana_agent/interfaces/services/agent.py +9 -7
- solana_agent/interfaces/services/query.py +9 -7
- solana_agent/repositories/memory.py +3 -3
- solana_agent/services/agent.py +19 -16
- solana_agent/services/query.py +18 -15
- {solana_agent-15.1.2.dist-info → solana_agent-16.0.0.dist-info}/METADATA +1 -1
- {solana_agent-15.1.2.dist-info → solana_agent-16.0.0.dist-info}/RECORD +15 -15
- {solana_agent-15.1.2.dist-info → solana_agent-16.0.0.dist-info}/LICENSE +0 -0
- {solana_agent-15.1.2.dist-info → solana_agent-16.0.0.dist-info}/WHEEL +0 -0
@@ -3,8 +3,7 @@ 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
|
7
|
-
from typing import AsyncGenerator, BinaryIO, List, Literal, Type, TypeVar, Union
|
6
|
+
from typing import AsyncGenerator, List, Literal, Type, TypeVar, Union
|
8
7
|
|
9
8
|
from openai import OpenAI
|
10
9
|
from pydantic import BaseModel
|
@@ -71,24 +70,24 @@ class OpenAIAdapter(LLMProvider):
|
|
71
70
|
|
72
71
|
async def transcribe_audio(
|
73
72
|
self,
|
74
|
-
|
73
|
+
audio_bytes: bytes,
|
74
|
+
input_format: Literal[
|
75
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
76
|
+
] = "mp4",
|
75
77
|
) -> AsyncGenerator[str, None]: # pragma: no cover
|
76
78
|
"""Stream transcription of an audio file.
|
77
79
|
|
78
80
|
Args:
|
79
|
-
|
81
|
+
audio_bytes: Audio file bytes
|
82
|
+
input_format: Format of the input audio file
|
80
83
|
|
81
84
|
Yields:
|
82
85
|
Transcript text chunks as they become available
|
83
86
|
"""
|
84
87
|
try:
|
85
|
-
# Handle file path vs file object
|
86
|
-
if isinstance(audio_file, (str, Path)):
|
87
|
-
audio_file = open(audio_file, "rb")
|
88
|
-
|
89
88
|
stream = self.client.audio.transcriptions.create(
|
90
89
|
model=self.transcription_model,
|
91
|
-
file=
|
90
|
+
file=(f"file.{input_format}", audio_bytes),
|
92
91
|
response_format="text",
|
93
92
|
stream=True
|
94
93
|
)
|
@@ -103,11 +102,6 @@ class OpenAIAdapter(LLMProvider):
|
|
103
102
|
print(traceback.format_exc())
|
104
103
|
yield f"I apologize, but I encountered an error transcribing the audio: {str(e)}"
|
105
104
|
|
106
|
-
finally:
|
107
|
-
# Close file if we opened it
|
108
|
-
if isinstance(audio_file, (str, Path)):
|
109
|
-
audio_file.close()
|
110
|
-
|
111
105
|
async def generate_text(
|
112
106
|
self,
|
113
107
|
prompt: str,
|
@@ -57,7 +57,12 @@ class MongoDBAdapter(DataStorageProvider):
|
|
57
57
|
|
58
58
|
def delete_one(self, collection: str, query: Dict) -> bool:
|
59
59
|
result = self.db[collection].delete_one(query)
|
60
|
-
return result.deleted_count
|
60
|
+
return result.deleted_count == 1
|
61
|
+
|
62
|
+
def delete_all(self, collection: str, query: Dict) -> bool:
|
63
|
+
total_documents = self.db[collection].count_documents(query)
|
64
|
+
deleted_result = self.db[collection].delete_many(query)
|
65
|
+
return deleted_result.deleted_count == total_documents
|
61
66
|
|
62
67
|
def count_documents(self, collection: str, query: Dict) -> int:
|
63
68
|
return self.db[collection].count_documents(query)
|
@@ -6,8 +6,7 @@ the agent system without dealing with internal implementation details.
|
|
6
6
|
"""
|
7
7
|
import json
|
8
8
|
import importlib.util
|
9
|
-
from
|
10
|
-
from typing import AsyncGenerator, BinaryIO, Dict, Any, Literal, Optional, Union
|
9
|
+
from typing import AsyncGenerator, Dict, Any, Literal, Optional, Union
|
11
10
|
|
12
11
|
from solana_agent.factories.agent_factory import SolanaAgentFactory
|
13
12
|
from solana_agent.interfaces.client.client import SolanaAgent as SolanaAgentInterface
|
@@ -43,23 +42,27 @@ class SolanaAgent(SolanaAgentInterface):
|
|
43
42
|
async def process(
|
44
43
|
self,
|
45
44
|
user_id: str,
|
46
|
-
message: Union[str,
|
45
|
+
message: Union[str, bytes],
|
47
46
|
output_format: Literal["text", "audio"] = "text",
|
48
|
-
|
49
|
-
|
47
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
48
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
50
49
|
audio_instructions: Optional[str] = None,
|
51
|
-
|
52
|
-
|
50
|
+
audio_response_format: Literal['mp3', 'opus',
|
51
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
52
|
+
audio_input_format: Literal[
|
53
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
54
|
+
] = "mp4",
|
53
55
|
) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
|
54
56
|
"""Process a user message and return the response stream.
|
55
57
|
|
56
58
|
Args:
|
57
59
|
user_id: User ID
|
58
|
-
message: Text message or audio
|
60
|
+
message: Text message or audio bytes
|
59
61
|
output_format: Response format ("text" or "audio")
|
60
|
-
|
62
|
+
audio_voice: Voice to use for audio output
|
61
63
|
audio_instructions: Optional instructions for audio synthesis
|
62
|
-
|
64
|
+
audio_response_format: Audio format
|
65
|
+
audio_input_format: Audio input format
|
63
66
|
|
64
67
|
Returns:
|
65
68
|
Async generator yielding response chunks (text strings or audio bytes)
|
@@ -68,8 +71,10 @@ class SolanaAgent(SolanaAgentInterface):
|
|
68
71
|
user_id=user_id,
|
69
72
|
query=message,
|
70
73
|
output_format=output_format,
|
71
|
-
|
72
|
-
audio_instructions=audio_instructions
|
74
|
+
audio_voice=audio_voice,
|
75
|
+
audio_instructions=audio_instructions,
|
76
|
+
audio_response_format=audio_response_format,
|
77
|
+
audio_input_format=audio_input_format,
|
73
78
|
):
|
74
79
|
yield chunk
|
75
80
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
-
from
|
3
|
-
from typing import Any, AsyncGenerator, BinaryIO, Dict, Literal, Union
|
2
|
+
from typing import Any, AsyncGenerator, Dict, Literal, Union
|
4
3
|
|
5
4
|
|
6
5
|
class SolanaAgent(ABC):
|
@@ -10,13 +9,16 @@ class SolanaAgent(ABC):
|
|
10
9
|
async def process(
|
11
10
|
self,
|
12
11
|
user_id: str,
|
13
|
-
message: Union[str,
|
12
|
+
message: Union[str, bytes],
|
14
13
|
output_format: Literal["text", "audio"] = "text",
|
15
|
-
|
16
|
-
|
14
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
15
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
17
16
|
audio_instructions: str = None,
|
18
|
-
|
19
|
-
|
17
|
+
audio_response_format: Literal['mp3', 'opus',
|
18
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
19
|
+
audio_input_format: Literal[
|
20
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
21
|
+
] = "mp4",
|
20
22
|
) -> AsyncGenerator[Union[str, bytes], None]:
|
21
23
|
"""Process a user message and return the response stream."""
|
22
24
|
pass
|
@@ -42,6 +42,11 @@ class DataStorageProvider(ABC):
|
|
42
42
|
"""Delete a document."""
|
43
43
|
pass
|
44
44
|
|
45
|
+
@abstractmethod
|
46
|
+
def delete_all(self, collection: str, query: Dict) -> bool:
|
47
|
+
"""Delete all documents matching query."""
|
48
|
+
pass
|
49
|
+
|
45
50
|
@abstractmethod
|
46
51
|
def create_index(self, collection: str, keys: List, **kwargs) -> None:
|
47
52
|
"""Create an index."""
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
-
from
|
3
|
-
from typing import AsyncGenerator, BinaryIO, List, Literal, Type, TypeVar, Union
|
2
|
+
from typing import AsyncGenerator, List, Literal, Type, TypeVar, Union
|
4
3
|
|
5
4
|
from pydantic import BaseModel
|
6
5
|
|
@@ -48,7 +47,10 @@ class LLMProvider(ABC):
|
|
48
47
|
@abstractmethod
|
49
48
|
async def transcribe_audio(
|
50
49
|
self,
|
51
|
-
|
50
|
+
audio_bytes: bytes,
|
51
|
+
input_format: Literal[
|
52
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
53
|
+
] = "mp4",
|
52
54
|
) -> AsyncGenerator[str, None]:
|
53
55
|
"""Transcribe audio from the language model."""
|
54
56
|
pass
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
-
from
|
3
|
-
from typing import Any, AsyncGenerator, BinaryIO, Dict, List, Literal, Union
|
2
|
+
from typing import Any, AsyncGenerator, Dict, List, Literal, Union
|
4
3
|
|
5
4
|
from solana_agent.domains.agent import AIAgent
|
6
5
|
|
@@ -28,14 +27,17 @@ class AgentService(ABC):
|
|
28
27
|
self,
|
29
28
|
agent_name: str,
|
30
29
|
user_id: str,
|
31
|
-
query: Union[str,
|
30
|
+
query: Union[str, bytes],
|
32
31
|
memory_context: str = "",
|
33
32
|
output_format: Literal["text", "audio"] = "text",
|
34
|
-
|
35
|
-
|
33
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
34
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
36
35
|
audio_instructions: str = None,
|
37
|
-
|
38
|
-
|
36
|
+
audio_response_format: Literal['mp3', 'opus',
|
37
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
38
|
+
audio_input_format: Literal[
|
39
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
40
|
+
] = "mp4",
|
39
41
|
) -> AsyncGenerator[Union[str, bytes], None]:
|
40
42
|
"""Generate a response from an agent."""
|
41
43
|
pass
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
-
from
|
3
|
-
from typing import Any, AsyncGenerator, BinaryIO, Dict, Literal, Optional, Union
|
2
|
+
from typing import Any, AsyncGenerator, Dict, Literal, Optional, Union
|
4
3
|
|
5
4
|
|
6
5
|
class QueryService(ABC):
|
@@ -10,13 +9,16 @@ class QueryService(ABC):
|
|
10
9
|
async def process(
|
11
10
|
self,
|
12
11
|
user_id: str,
|
13
|
-
query: Union[str,
|
12
|
+
query: Union[str, bytes],
|
14
13
|
output_format: Literal["text", "audio"] = "text",
|
15
|
-
|
16
|
-
|
14
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
15
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
17
16
|
audio_instructions: Optional[str] = None,
|
18
|
-
|
19
|
-
|
17
|
+
audio_response_format: Literal['mp3', 'opus',
|
18
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
19
|
+
audio_input_format: Literal[
|
20
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
21
|
+
] = "mp4",
|
20
22
|
) -> AsyncGenerator[Union[str, bytes], None]:
|
21
23
|
"""Process the user request and generate a response."""
|
22
24
|
pass
|
@@ -4,7 +4,7 @@ from zep_cloud.client import AsyncZep as AsyncZepCloud
|
|
4
4
|
from zep_python.client import AsyncZep
|
5
5
|
from zep_cloud.types import Message
|
6
6
|
from solana_agent.interfaces.providers.memory import MemoryProvider
|
7
|
-
from solana_agent.
|
7
|
+
from solana_agent.adapters.mongodb_adapter import MongoDBAdapter
|
8
8
|
|
9
9
|
|
10
10
|
class MemoryRepository(MemoryProvider):
|
@@ -12,7 +12,7 @@ class MemoryRepository(MemoryProvider):
|
|
12
12
|
|
13
13
|
def __init__(
|
14
14
|
self,
|
15
|
-
mongo_adapter:
|
15
|
+
mongo_adapter: MongoDBAdapter,
|
16
16
|
zep_api_key: Optional[str] = None,
|
17
17
|
zep_base_url: Optional[str] = None
|
18
18
|
):
|
@@ -94,7 +94,7 @@ class MemoryRepository(MemoryProvider):
|
|
94
94
|
async def delete(self, user_id: str) -> None:
|
95
95
|
"""Delete memory from both systems."""
|
96
96
|
try:
|
97
|
-
self.mongo.
|
97
|
+
self.mongo.delete_all(
|
98
98
|
self.collection,
|
99
99
|
{"user_id": user_id}
|
100
100
|
)
|
solana_agent/services/agent.py
CHANGED
@@ -7,8 +7,7 @@ and response generation.
|
|
7
7
|
import datetime as main_datetime
|
8
8
|
from datetime import datetime
|
9
9
|
import json
|
10
|
-
from
|
11
|
-
from typing import AsyncGenerator, BinaryIO, Dict, List, Literal, Optional, Any, Union
|
10
|
+
from typing import AsyncGenerator, Dict, List, Literal, Optional, Any, Union
|
12
11
|
|
13
12
|
from solana_agent.interfaces.services.agent import AgentService as AgentServiceInterface
|
14
13
|
from solana_agent.interfaces.providers.llm import LLMProvider
|
@@ -189,26 +188,30 @@ class AgentService(AgentServiceInterface):
|
|
189
188
|
self,
|
190
189
|
agent_name: str,
|
191
190
|
user_id: str,
|
192
|
-
query: Union[str,
|
191
|
+
query: Union[str, bytes],
|
193
192
|
memory_context: str = "",
|
194
193
|
output_format: Literal["text", "audio"] = "text",
|
195
|
-
|
196
|
-
|
194
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
195
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
197
196
|
audio_instructions: Optional[str] = None,
|
198
|
-
|
199
|
-
|
197
|
+
audio_response_format: Literal['mp3', 'opus',
|
198
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
199
|
+
audio_input_format: Literal[
|
200
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
201
|
+
] = "mp4",
|
200
202
|
) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
|
201
203
|
"""Generate a response with support for text/audio input/output.
|
202
204
|
|
203
205
|
Args:
|
204
206
|
agent_name: Agent name
|
205
207
|
user_id: User ID
|
206
|
-
query: Text query or audio
|
208
|
+
query: Text query or audio bytes
|
207
209
|
memory_context: Optional conversation context
|
208
210
|
output_format: Response format ("text" or "audio")
|
209
|
-
|
211
|
+
audio_voice: Voice to use for audio output
|
210
212
|
audio_instructions: Optional instructions for audio synthesis
|
211
|
-
|
213
|
+
audio_response_format: Audio format
|
214
|
+
audio_input_format: Audio input format
|
212
215
|
|
213
216
|
Yields:
|
214
217
|
Text chunks or audio bytes depending on output_format
|
@@ -217,7 +220,7 @@ class AgentService(AgentServiceInterface):
|
|
217
220
|
if not agent:
|
218
221
|
error_msg = f"Agent '{agent_name}' not found."
|
219
222
|
if output_format == "audio":
|
220
|
-
async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=
|
223
|
+
async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice):
|
221
224
|
yield chunk
|
222
225
|
else:
|
223
226
|
yield error_msg
|
@@ -227,7 +230,7 @@ class AgentService(AgentServiceInterface):
|
|
227
230
|
# Handle audio input if provided
|
228
231
|
query_text = ""
|
229
232
|
if not isinstance(query, str):
|
230
|
-
async for transcript in self.llm_provider.transcribe_audio(query):
|
233
|
+
async for transcript in self.llm_provider.transcribe_audio(query, input_format=audio_input_format):
|
231
234
|
query_text += transcript
|
232
235
|
else:
|
233
236
|
query_text = query
|
@@ -258,7 +261,7 @@ class AgentService(AgentServiceInterface):
|
|
258
261
|
agent_name, chunk,
|
259
262
|
)
|
260
263
|
if output_format == "audio":
|
261
|
-
async for audio_chunk in self.llm_provider.tts(result, instructions=audio_instructions, response_format=
|
264
|
+
async for audio_chunk in self.llm_provider.tts(result, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice):
|
262
265
|
yield audio_chunk
|
263
266
|
else:
|
264
267
|
yield result
|
@@ -268,7 +271,7 @@ class AgentService(AgentServiceInterface):
|
|
268
271
|
text_buffer += chunk
|
269
272
|
if any(punct in chunk for punct in ".!?"):
|
270
273
|
async for audio_chunk in self.llm_provider.tts(
|
271
|
-
text_buffer, instructions=audio_instructions, response_format=
|
274
|
+
text_buffer, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice
|
272
275
|
):
|
273
276
|
yield audio_chunk
|
274
277
|
text_buffer = ""
|
@@ -278,14 +281,14 @@ class AgentService(AgentServiceInterface):
|
|
278
281
|
# Handle any remaining text in buffer
|
279
282
|
if output_format == "audio" and text_buffer:
|
280
283
|
async for audio_chunk in self.llm_provider.tts(
|
281
|
-
text_buffer, instructions=audio_instructions, response_format=
|
284
|
+
text_buffer, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice
|
282
285
|
):
|
283
286
|
yield audio_chunk
|
284
287
|
|
285
288
|
except Exception as e:
|
286
289
|
error_msg = f"I apologize, but I encountered an error: {str(e)}"
|
287
290
|
if output_format == "audio":
|
288
|
-
async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=
|
291
|
+
async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice):
|
289
292
|
yield chunk
|
290
293
|
else:
|
291
294
|
yield error_msg
|
solana_agent/services/query.py
CHANGED
@@ -5,8 +5,7 @@ This service orchestrates the processing of user queries, coordinating
|
|
5
5
|
other services to provide comprehensive responses while maintaining
|
6
6
|
clean separation of concerns.
|
7
7
|
"""
|
8
|
-
from
|
9
|
-
from typing import Any, AsyncGenerator, BinaryIO, Dict, Literal, Optional, Union
|
8
|
+
from typing import Any, AsyncGenerator, Dict, Literal, Optional, Union
|
10
9
|
|
11
10
|
from solana_agent.interfaces.services.query import QueryService as QueryServiceInterface
|
12
11
|
from solana_agent.services.agent import AgentService
|
@@ -37,23 +36,27 @@ class QueryService(QueryServiceInterface):
|
|
37
36
|
async def process(
|
38
37
|
self,
|
39
38
|
user_id: str,
|
40
|
-
query: Union[str,
|
39
|
+
query: Union[str, bytes],
|
41
40
|
output_format: Literal["text", "audio"] = "text",
|
42
|
-
|
43
|
-
|
41
|
+
audio_voice: Literal["alloy", "ash", "ballad", "coral", "echo",
|
42
|
+
"fable", "onyx", "nova", "sage", "shimmer"] = "nova",
|
44
43
|
audio_instructions: Optional[str] = None,
|
45
|
-
|
46
|
-
|
44
|
+
audio_response_format: Literal['mp3', 'opus',
|
45
|
+
'aac', 'flac', 'wav', 'pcm'] = "aac",
|
46
|
+
audio_input_format: Literal[
|
47
|
+
"flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
|
48
|
+
] = "mp4",
|
47
49
|
) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
|
48
50
|
"""Process the user request with appropriate agent.
|
49
51
|
|
50
52
|
Args:
|
51
53
|
user_id: User ID
|
52
|
-
query: Text query or audio
|
54
|
+
query: Text query or audio bytes
|
53
55
|
output_format: Response format ("text" or "audio")
|
54
|
-
|
56
|
+
audio_voice: Voice to use for audio output
|
55
57
|
audio_instructions: Optional instructions for audio synthesis
|
56
|
-
|
58
|
+
audio_response_format: Audio response format
|
59
|
+
audio_input_format: Audio input format
|
57
60
|
|
58
61
|
Yields:
|
59
62
|
Response chunks (text strings or audio bytes)
|
@@ -62,7 +65,7 @@ class QueryService(QueryServiceInterface):
|
|
62
65
|
# Handle audio input if provided
|
63
66
|
user_text = ""
|
64
67
|
if not isinstance(query, str):
|
65
|
-
async for transcript in self.agent_service.llm_provider.transcribe_audio(query):
|
68
|
+
async for transcript in self.agent_service.llm_provider.transcribe_audio(query, audio_input_format):
|
66
69
|
user_text += transcript
|
67
70
|
else:
|
68
71
|
user_text = query
|
@@ -71,7 +74,7 @@ class QueryService(QueryServiceInterface):
|
|
71
74
|
if user_text.strip().lower() in ["test", "hello", "hi", "hey", "ping"]:
|
72
75
|
response = "Hello! How can I help you today?"
|
73
76
|
if output_format == "audio":
|
74
|
-
async for chunk in self.agent_service.llm_provider.tts(response, instructions=audio_instructions, response_format=
|
77
|
+
async for chunk in self.agent_service.llm_provider.tts(response, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice):
|
75
78
|
yield chunk
|
76
79
|
else:
|
77
80
|
yield response
|
@@ -97,8 +100,8 @@ class QueryService(QueryServiceInterface):
|
|
97
100
|
query=user_text,
|
98
101
|
memory_context=memory_context,
|
99
102
|
output_format=output_format,
|
100
|
-
|
101
|
-
|
103
|
+
audio_voice=audio_voice,
|
104
|
+
audio_response_format=audio_response_format,
|
102
105
|
):
|
103
106
|
yield chunk
|
104
107
|
if output_format == "text":
|
@@ -123,7 +126,7 @@ class QueryService(QueryServiceInterface):
|
|
123
126
|
except Exception as e:
|
124
127
|
error_msg = f"I apologize for the technical difficulty. {str(e)}"
|
125
128
|
if output_format == "audio":
|
126
|
-
async for chunk in self.agent_service.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=
|
129
|
+
async for chunk in self.agent_service.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=audio_response_format, voice=audio_voice):
|
127
130
|
yield chunk
|
128
131
|
else:
|
129
132
|
yield error_msg
|
@@ -1,23 +1,23 @@
|
|
1
1
|
solana_agent/__init__.py,sha256=ceYeUpjIitpln8YK1r0JVJU8mzG6cRPYu-HLny3d-Tw,887
|
2
2
|
solana_agent/adapters/__init__.py,sha256=tiEEuuy0NF3ngc_tGEcRTt71zVI58v3dYY9RvMrF2Cg,204
|
3
|
-
solana_agent/adapters/llm_adapter.py,sha256=
|
4
|
-
solana_agent/adapters/mongodb_adapter.py,sha256=
|
3
|
+
solana_agent/adapters/llm_adapter.py,sha256=9pnQr_386LK2sX38-BLWFjFqoYMxlmVZ6t-nByrcqN8,6133
|
4
|
+
solana_agent/adapters/mongodb_adapter.py,sha256=qqEFbY_v1XGyFXBmwd5HSXSSHnA9wWo-Hm1vGEyIG0k,2718
|
5
5
|
solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
solana_agent/client/solana_agent.py,sha256=
|
6
|
+
solana_agent/client/solana_agent.py,sha256=SIcddD9Ww2EawEmCdKylixmpZEdnyAjEuv42QMPceFQ,4210
|
7
7
|
solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
|
8
8
|
solana_agent/domains/agent.py,sha256=Ak_hD5gTCzRqAHLmqtxnny0Xki1qAKR7RzLW9LOQBTg,2930
|
9
9
|
solana_agent/domains/routing.py,sha256=UDlgTjUoC9xIBVYu_dnf9-KG_bBgdEXAv_UtDOrYo0w,650
|
10
10
|
solana_agent/factories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
solana_agent/factories/agent_factory.py,sha256=7krNpsAHnle-IFjKqYz4aJgfvlj7yMRhfSeqi-4S2sI,5563
|
12
12
|
solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
|
13
|
-
solana_agent/interfaces/client/client.py,sha256=
|
13
|
+
solana_agent/interfaces/client/client.py,sha256=XrdbzXalBONqxU4S4ry4gysivc7Qb7LvZ43-IU8VUh0,1261
|
14
14
|
solana_agent/interfaces/plugins/plugins.py,sha256=TMmTXwHhmkdJpIhgADfrpGGGk7PHP7O9Qi89uA26uMI,3013
|
15
|
-
solana_agent/interfaces/providers/data_storage.py,sha256=
|
16
|
-
solana_agent/interfaces/providers/llm.py,sha256=
|
15
|
+
solana_agent/interfaces/providers/data_storage.py,sha256=NqGeFvAzhz9rr-liLPRNCGjooB2EIhe-EVsMmX__b0M,1658
|
16
|
+
solana_agent/interfaces/providers/llm.py,sha256=Ay0-37ppAirGZdGS2LrDq0xAr_WY1_Gis84OXPGsaWs,1653
|
17
17
|
solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
|
18
18
|
solana_agent/interfaces/repositories/agent.py,sha256=r2MzVYOpEBVN00yqRxr3bUgWUgSwqoI1hRrdHhgFpFU,819
|
19
|
-
solana_agent/interfaces/services/agent.py,sha256=
|
20
|
-
solana_agent/interfaces/services/query.py,sha256=
|
19
|
+
solana_agent/interfaces/services/agent.py,sha256=Ht0EvO5uLAvlNztipoYuaE89suJVcDrzMUbAqOncAsQ,2159
|
20
|
+
solana_agent/interfaces/services/query.py,sha256=9fR9eE0EM56MFhCFXqUsFVPpcAYnLixI-QKHpKV7BSs,1275
|
21
21
|
solana_agent/interfaces/services/routing.py,sha256=gohkt5f9uYDLpu4iDVDk9yj8js9P56R6QHSIDNylgwA,438
|
22
22
|
solana_agent/plugins/__init__.py,sha256=coZdgJKq1ExOaj6qB810i3rEhbjdVlrkN76ozt_Ojgo,193
|
23
23
|
solana_agent/plugins/manager.py,sha256=GWwhfMBn9THwVn7biOvVa25GLthCA1ilWIoDkt5hXNI,5084
|
@@ -26,12 +26,12 @@ solana_agent/plugins/tools/__init__.py,sha256=c0z7ij42gs94_VJrcn4Y8gUlTxMhsFNY6a
|
|
26
26
|
solana_agent/plugins/tools/auto_tool.py,sha256=Z3CcOzwdXpzciH-5yphhd9qt1b9owTxhwC-dYmPF6B0,1489
|
27
27
|
solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
|
28
28
|
solana_agent/repositories/agent.py,sha256=e1rnsQiigkKwJNLKro86a3b6TBiky3GMfmCRc5b_jPw,3187
|
29
|
-
solana_agent/repositories/memory.py,sha256=
|
29
|
+
solana_agent/repositories/memory.py,sha256=GABGwaz00thjviHewLvb18NeKE8dkBROxy_stsiiWrE,4722
|
30
30
|
solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
|
31
|
-
solana_agent/services/agent.py,sha256=
|
32
|
-
solana_agent/services/query.py,sha256=
|
31
|
+
solana_agent/services/agent.py,sha256=eiS9HOajywYOrF3JTbZROIvKP8kqeHqiiCBU3M8OKTQ,14228
|
32
|
+
solana_agent/services/query.py,sha256=wCnFx4oW64KJe4M9vjr5yIFwFntPtWVOV8G0OJpDves,10774
|
33
33
|
solana_agent/services/routing.py,sha256=TPJ2Pas4acE93QzMEV6ZP670OtTNrVEPa76fz6urEV4,4996
|
34
|
-
solana_agent-
|
35
|
-
solana_agent-
|
36
|
-
solana_agent-
|
37
|
-
solana_agent-
|
34
|
+
solana_agent-16.0.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
35
|
+
solana_agent-16.0.0.dist-info/METADATA,sha256=_lZPx9BIWliiZu087sfYUtt9x81t-tTKAGFSZ2HAbKA,4956
|
36
|
+
solana_agent-16.0.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
37
|
+
solana_agent-16.0.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|