solana-agent 15.1.0__tar.gz → 15.1.2__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.
Files changed (37) hide show
  1. {solana_agent-15.1.0 → solana_agent-15.1.2}/PKG-INFO +1 -1
  2. {solana_agent-15.1.0 → solana_agent-15.1.2}/pyproject.toml +1 -1
  3. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/adapters/llm_adapter.py +4 -0
  4. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/client/solana_agent.py +3 -0
  5. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/factories/agent_factory.py +1 -1
  6. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/client/client.py +3 -1
  7. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/providers/llm.py +2 -0
  8. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/services/agent.py +2 -0
  9. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/services/query.py +2 -0
  10. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/services/agent.py +9 -6
  11. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/services/query.py +7 -3
  12. {solana_agent-15.1.0 → solana_agent-15.1.2}/LICENSE +0 -0
  13. {solana_agent-15.1.0 → solana_agent-15.1.2}/README.md +0 -0
  14. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/__init__.py +0 -0
  15. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/adapters/__init__.py +0 -0
  16. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/adapters/mongodb_adapter.py +0 -0
  17. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/client/__init__.py +0 -0
  18. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/domains/__init__.py +0 -0
  19. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/domains/agent.py +0 -0
  20. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/domains/routing.py +0 -0
  21. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/factories/__init__.py +0 -0
  22. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/__init__.py +0 -0
  23. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/plugins/plugins.py +0 -0
  24. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/providers/data_storage.py +0 -0
  25. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/providers/memory.py +0 -0
  26. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/repositories/agent.py +0 -0
  27. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/interfaces/services/routing.py +0 -0
  28. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/plugins/__init__.py +0 -0
  29. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/plugins/manager.py +0 -0
  30. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/plugins/registry.py +0 -0
  31. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/plugins/tools/__init__.py +0 -0
  32. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/plugins/tools/auto_tool.py +0 -0
  33. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/repositories/__init__.py +0 -0
  34. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/repositories/agent.py +0 -0
  35. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/repositories/memory.py +0 -0
  36. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/services/__init__.py +0 -0
  37. {solana_agent-15.1.0 → solana_agent-15.1.2}/solana_agent/services/routing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 15.1.0
3
+ Version: 15.1.2
4
4
  Summary: The Future of Work
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "15.1.0"
3
+ version = "15.1.2"
4
4
  description = "The Future of Work"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -30,6 +30,8 @@ class OpenAIAdapter(LLMProvider):
30
30
  instructions: str = "",
31
31
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
32
32
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
33
+ response_format: Literal['mp3', 'opus',
34
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
33
35
  ) -> AsyncGenerator[bytes, None]: # pragma: no cover
34
36
  """Stream text-to-speech audio from OpenAI models.
35
37
 
@@ -37,6 +39,7 @@ class OpenAIAdapter(LLMProvider):
37
39
  text: Text to convert to speech
38
40
  instructions: Optional instructions for speech generation
39
41
  voice: Voice to use for synthesis
42
+ response_format: Audio format
40
43
 
41
44
  Yields:
42
45
  Audio bytes as they become available
@@ -47,6 +50,7 @@ class OpenAIAdapter(LLMProvider):
47
50
  voice=voice,
48
51
  input=text,
49
52
  instructions=instructions,
53
+ response_format=response_format
50
54
  )
51
55
 
52
56
  # Stream the bytes in chunks
@@ -48,6 +48,8 @@ class SolanaAgent(SolanaAgentInterface):
48
48
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
49
49
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
50
50
  audio_instructions: Optional[str] = None,
51
+ response_format: Literal['mp3', 'opus',
52
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
51
53
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
52
54
  """Process a user message and return the response stream.
53
55
 
@@ -57,6 +59,7 @@ class SolanaAgent(SolanaAgentInterface):
57
59
  output_format: Response format ("text" or "audio")
58
60
  voice: Voice to use for audio output (only used if output_format is "audio")
59
61
  audio_instructions: Optional instructions for audio synthesis
62
+ response_format: Audio format
60
63
 
61
64
  Returns:
62
65
  Async generator yielding response chunks (text strings or audio bytes)
@@ -104,7 +104,7 @@ class SolanaAgentFactory:
104
104
  agent_repo.delete_ai_agent(agent_name)
105
105
 
106
106
  # Register predefined agents
107
- for agent_config in config.get("ai_agents", []):
107
+ for agent_config in config.get("agents", []):
108
108
  agent_service.register_ai_agent(
109
109
  name=agent_config["name"],
110
110
  instructions=agent_config["instructions"],
@@ -14,7 +14,9 @@ class SolanaAgent(ABC):
14
14
  output_format: Literal["text", "audio"] = "text",
15
15
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
16
16
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
17
- audio_instructions: str = None
17
+ audio_instructions: str = None,
18
+ response_format: Literal['mp3', 'opus',
19
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
18
20
  ) -> AsyncGenerator[Union[str, bytes], None]:
19
21
  """Process a user message and return the response stream."""
20
22
  pass
@@ -39,6 +39,8 @@ class LLMProvider(ABC):
39
39
  instructions: str = "",
40
40
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
41
41
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
42
+ response_format: Literal['mp3', 'opus',
43
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
42
44
  ) -> AsyncGenerator[bytes, None]:
43
45
  """Stream text-to-speech audio from the language model."""
44
46
  pass
@@ -34,6 +34,8 @@ class AgentService(ABC):
34
34
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
35
35
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
36
36
  audio_instructions: str = None,
37
+ response_format: Literal['mp3', 'opus',
38
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
37
39
  ) -> AsyncGenerator[Union[str, bytes], None]:
38
40
  """Generate a response from an agent."""
39
41
  pass
@@ -15,6 +15,8 @@ class QueryService(ABC):
15
15
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
16
16
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
17
17
  audio_instructions: Optional[str] = None,
18
+ response_format: Literal['mp3', 'opus',
19
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
18
20
  ) -> AsyncGenerator[Union[str, bytes], None]:
19
21
  """Process the user request and generate a response."""
20
22
  pass
@@ -195,6 +195,8 @@ class AgentService(AgentServiceInterface):
195
195
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
196
196
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
197
197
  audio_instructions: Optional[str] = None,
198
+ response_format: Literal['mp3', 'opus',
199
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
198
200
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
199
201
  """Generate a response with support for text/audio input/output.
200
202
 
@@ -206,6 +208,7 @@ class AgentService(AgentServiceInterface):
206
208
  output_format: Response format ("text" or "audio")
207
209
  voice: Voice to use for audio output
208
210
  audio_instructions: Optional instructions for audio synthesis
211
+ response_format: Audio format
209
212
 
210
213
  Yields:
211
214
  Text chunks or audio bytes depending on output_format
@@ -214,7 +217,7 @@ class AgentService(AgentServiceInterface):
214
217
  if not agent:
215
218
  error_msg = f"Agent '{agent_name}' not found."
216
219
  if output_format == "audio":
217
- async for chunk in self.llm_provider.tts(error_msg, voice=voice):
220
+ async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=response_format, voice=voice):
218
221
  yield chunk
219
222
  else:
220
223
  yield error_msg
@@ -252,10 +255,10 @@ class AgentService(AgentServiceInterface):
252
255
  if chunk.strip().startswith("{"):
253
256
  # Handle tool calls
254
257
  result = await self._handle_tool_call(
255
- agent_name, chunk, output_format, voice
258
+ agent_name, chunk,
256
259
  )
257
260
  if output_format == "audio":
258
- async for audio_chunk in self.llm_provider.tts(result, instructions=audio_instructions, voice=voice):
261
+ async for audio_chunk in self.llm_provider.tts(result, instructions=audio_instructions, response_format=response_format, voice=voice):
259
262
  yield audio_chunk
260
263
  else:
261
264
  yield result
@@ -265,7 +268,7 @@ class AgentService(AgentServiceInterface):
265
268
  text_buffer += chunk
266
269
  if any(punct in chunk for punct in ".!?"):
267
270
  async for audio_chunk in self.llm_provider.tts(
268
- text_buffer, instructions=audio_instructions, voice=voice
271
+ text_buffer, instructions=audio_instructions, response_format=response_format, voice=voice
269
272
  ):
270
273
  yield audio_chunk
271
274
  text_buffer = ""
@@ -275,14 +278,14 @@ class AgentService(AgentServiceInterface):
275
278
  # Handle any remaining text in buffer
276
279
  if output_format == "audio" and text_buffer:
277
280
  async for audio_chunk in self.llm_provider.tts(
278
- text_buffer, instructions=audio_instructions, voice=voice
281
+ text_buffer, instructions=audio_instructions, response_format=response_format, voice=voice
279
282
  ):
280
283
  yield audio_chunk
281
284
 
282
285
  except Exception as e:
283
286
  error_msg = f"I apologize, but I encountered an error: {str(e)}"
284
287
  if output_format == "audio":
285
- async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, voice=voice):
288
+ async for chunk in self.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=response_format, voice=voice):
286
289
  yield chunk
287
290
  else:
288
291
  yield error_msg
@@ -42,6 +42,8 @@ class QueryService(QueryServiceInterface):
42
42
  voice: Literal["alloy", "ash", "ballad", "coral", "echo",
43
43
  "fable", "onyx", "nova", "sage", "shimmer"] = "nova",
44
44
  audio_instructions: Optional[str] = None,
45
+ response_format: Literal['mp3', 'opus',
46
+ 'aac', 'flac', 'wav', 'pcm'] = "aac",
45
47
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
46
48
  """Process the user request with appropriate agent.
47
49
 
@@ -51,6 +53,7 @@ class QueryService(QueryServiceInterface):
51
53
  output_format: Response format ("text" or "audio")
52
54
  voice: Voice to use for audio output
53
55
  audio_instructions: Optional instructions for audio synthesis
56
+ response_format: Audio response format
54
57
 
55
58
  Yields:
56
59
  Response chunks (text strings or audio bytes)
@@ -68,7 +71,7 @@ class QueryService(QueryServiceInterface):
68
71
  if user_text.strip().lower() in ["test", "hello", "hi", "hey", "ping"]:
69
72
  response = "Hello! How can I help you today?"
70
73
  if output_format == "audio":
71
- async for chunk in self.agent_service.llm_provider.tts(response, instructions=audio_instructions, voice=voice):
74
+ async for chunk in self.agent_service.llm_provider.tts(response, instructions=audio_instructions, response_format=response_format, voice=voice):
72
75
  yield chunk
73
76
  else:
74
77
  yield response
@@ -94,7 +97,8 @@ class QueryService(QueryServiceInterface):
94
97
  query=user_text,
95
98
  memory_context=memory_context,
96
99
  output_format=output_format,
97
- voice=voice
100
+ voice=voice,
101
+ response_format=response_format,
98
102
  ):
99
103
  yield chunk
100
104
  if output_format == "text":
@@ -119,7 +123,7 @@ class QueryService(QueryServiceInterface):
119
123
  except Exception as e:
120
124
  error_msg = f"I apologize for the technical difficulty. {str(e)}"
121
125
  if output_format == "audio":
122
- async for chunk in self.agent_service.llm_provider.tts(error_msg, instructions=audio_instructions, voice=voice):
126
+ async for chunk in self.agent_service.llm_provider.tts(error_msg, instructions=audio_instructions, response_format=response_format, voice=voice):
123
127
  yield chunk
124
128
  else:
125
129
  yield error_msg
File without changes
File without changes