solana-agent 22.0.3__py3-none-any.whl → 22.0.5__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/services/agent.py +10 -6
- {solana_agent-22.0.3.dist-info → solana_agent-22.0.5.dist-info}/METADATA +3 -5
- {solana_agent-22.0.3.dist-info → solana_agent-22.0.5.dist-info}/RECORD +5 -5
- {solana_agent-22.0.3.dist-info → solana_agent-22.0.5.dist-info}/LICENSE +0 -0
- {solana_agent-22.0.3.dist-info → solana_agent-22.0.5.dist-info}/WHEEL +0 -0
solana_agent/services/agent.py
CHANGED
@@ -5,6 +5,7 @@ This service manages AI and human agents, their registration, tool assignments,
|
|
5
5
|
and response generation.
|
6
6
|
"""
|
7
7
|
import asyncio
|
8
|
+
from copy import deepcopy
|
8
9
|
import datetime as main_datetime
|
9
10
|
from datetime import datetime
|
10
11
|
import json
|
@@ -199,12 +200,8 @@ class AgentService(AgentServiceInterface):
|
|
199
200
|
else:
|
200
201
|
query_text = query
|
201
202
|
|
202
|
-
# Get system prompt
|
203
|
+
# Get system prompt
|
203
204
|
system_prompt = self.get_agent_system_prompt(agent_name)
|
204
|
-
if self.tool_registry:
|
205
|
-
tool_usage_prompt = self._get_tool_usage_prompt(agent_name)
|
206
|
-
if tool_usage_prompt:
|
207
|
-
system_prompt = f"{system_prompt}\n\n{tool_usage_prompt}"
|
208
205
|
|
209
206
|
# Add User ID and memory context
|
210
207
|
system_prompt += f"\n\nUser ID: {user_id}"
|
@@ -213,6 +210,13 @@ class AgentService(AgentServiceInterface):
|
|
213
210
|
if prompt:
|
214
211
|
system_prompt += f"\n\nADDITIONAL PROMPT: {prompt}"
|
215
212
|
|
213
|
+
# make tool calling prompt
|
214
|
+
tool_calling_system_prompt = deepcopy(system_prompt)
|
215
|
+
if self.tool_registry:
|
216
|
+
tool_usage_prompt = self._get_tool_usage_prompt(agent_name)
|
217
|
+
if tool_usage_prompt:
|
218
|
+
tool_calling_system_prompt += f"\n\nTOOL CALLING PROMPT: {tool_usage_prompt}"
|
219
|
+
|
216
220
|
# Variables for tracking the response
|
217
221
|
complete_text_response = ""
|
218
222
|
|
@@ -226,7 +230,7 @@ class AgentService(AgentServiceInterface):
|
|
226
230
|
# Generate and stream response
|
227
231
|
async for chunk in self.llm_provider.generate_text(
|
228
232
|
prompt=query_text,
|
229
|
-
system_prompt=
|
233
|
+
system_prompt=tool_calling_system_prompt,
|
230
234
|
internet_search=internet_search,
|
231
235
|
):
|
232
236
|
# Check if the chunk is JSON or a tool call
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: solana-agent
|
3
|
-
Version: 22.0.
|
3
|
+
Version: 22.0.5
|
4
4
|
Summary: Agentic IQ
|
5
5
|
License: MIT
|
6
6
|
Keywords: ai,openai,ai agents,agi
|
@@ -275,15 +275,13 @@ config = {
|
|
275
275
|
},
|
276
276
|
"tools": {
|
277
277
|
"search_internet": {
|
278
|
-
"api_key": "your-perplexity-key",
|
279
|
-
"citations": True, # Optional, defaults to True
|
280
|
-
"model": "sonar" # Optional, defaults to "sonar"
|
278
|
+
"api_key": "your-perplexity-api-key",
|
281
279
|
},
|
282
280
|
},
|
283
281
|
"agents": [
|
284
282
|
{
|
285
283
|
"name": "research_specialist",
|
286
|
-
"instructions": "You are an expert researcher who synthesizes complex information clearly.",
|
284
|
+
"instructions": "You are an expert researcher who synthesizes complex information clearly. You use your search_internet tool to get the latest information.",
|
287
285
|
"specialization": "Research and knowledge synthesis",
|
288
286
|
"tools": ["search_internet"],
|
289
287
|
},
|
@@ -26,10 +26,10 @@ solana_agent/plugins/tools/auto_tool.py,sha256=DgES_cZ6xKSf_HJpFINpvJxrjVlk5oeqa
|
|
26
26
|
solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
|
27
27
|
solana_agent/repositories/memory.py,sha256=mrpmNSQ0D_eLebNY-cBqtecVVpIGXE7s9jCzOWEAuR4,6984
|
28
28
|
solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
|
29
|
-
solana_agent/services/agent.py,sha256=
|
29
|
+
solana_agent/services/agent.py,sha256=bIVC4VGCv8qS5AF0nh_hfUjz8nu70Owll-VuvHJ9X48,20047
|
30
30
|
solana_agent/services/query.py,sha256=os_LRkDIwXQuWW_zJMtm__n0Lvi-AvItdanpCs1bXv0,11362
|
31
31
|
solana_agent/services/routing.py,sha256=PMCSG5m3uLMaHMj3dxNvNfcFZaeaDi7kMr7AEBCzwDE,6499
|
32
|
-
solana_agent-22.0.
|
33
|
-
solana_agent-22.0.
|
34
|
-
solana_agent-22.0.
|
35
|
-
solana_agent-22.0.
|
32
|
+
solana_agent-22.0.5.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
33
|
+
solana_agent-22.0.5.dist-info/METADATA,sha256=8BZiXr6XrbOkbBAwaDxBzFuf3d267GBMIGnwwuX_XBY,14818
|
34
|
+
solana_agent-22.0.5.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
35
|
+
solana_agent-22.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|