Integration with Existing Agents
const ReiCoreSdk = require('reicore-sdk');
const apiKey = 'your_unit_secret_token';
const reiAgent = new ReiCoreSdk({ agentSecretKey: apiKey });
// Example function to query Rei Agent
async function queryReiAgent(message) {
try {
const response = await reiAgent.chatCompletions(message);
return response;
} catch (error) {
console.error('Error querying Rei Agent:', error);
return null;
}
}
// Example usage in your agent
async function yourAgentFunction() {
// Your agent's logic here
const query = "What are the latest developments in quantum computing?";
const reiResponse = await queryReiAgent(query);
// Process the response
}Example integration with OpenAI
Last updated