You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`I understand you want to ${message.toLowerCase()}. As a ${agent.provider} agent with ${agent.tools.join(', ')} tools, I can help you with Polkadot operations.`,
253
-
`Let me process your request: "${message}". I have access to ${agent.tools.length} tools to assist you.`,
254
-
`Based on your message about "${message}", I can help you with various Polkadot operations using my available tools.`,
255
-
];
256
-
257
-
returnresponses[Math.floor(Math.random()*responses.length)]||'I\'m sorry, I don\'t have the information to answer that question.';
245
+
try{
246
+
logger.info("Go to here again in send message to agent ");
247
+
// Initialize the Polkadot CLI Agent
248
+
constcliAgent=newPolkadotCLIAgent(agent);
249
+
awaitcliAgent.initialize();
250
+
// Send the message to the agent
251
+
constresponse=awaitcliAgent.ask(message);
252
+
253
+
returnresponse;
254
+
}catch(error){
255
+
logger.error(`Agent communication failed: ${errorinstanceofError ? error.message : String(error)}`);
256
+
return`I encountered an error processing your request: ${errorinstanceofError ? error.message : String(error)}. Please try again or check your configuration.`;
0 commit comments