ReiCore SDK
You can integrate a Unit to your existing service using our Rei Core SDK or via REST API.
Quick start
npm install reicore-sdkpip install reicore_sdkConstructor
Import the SDK or the client and then initialize it with your API key
const ReiCoreSdk = require('reicore-sdk');
const apiKey = 'your_unit_secret_token';
const reiAgent = new ReiCoreSdk({ agentSecretKey: apiKey });from reicore_sdk import ReiCoreSdk
# Initialize the SDK with your Reigent Secret key
rei_agent = ReiCoreSdk("your-reiagent-secret-key")Functions
Get Agent
Retrieve details about the Rei Agent using the getAgent function.
reiAgent
.getAgent()
.then((agent) => {
console.log('Agent Details:', agent);
})
.catch((error) => {
console.error('Error fetching agent:', error);
});agent = rei_agent.get_agent()
print("Agent Details:", agent)Chat Completions
Send a message to the Rei Agent and receive a chat completion using the chatCompletions function.
Some examples
Get the Latest Biology Research
Example Response:
Track Crypto Market Trends
Example Response:
Get the Latest News
Example Response:
Tips & Tricks
Specific Questions Get Better Answers: "What are the three biggest advancements in CRISPR this year?" works better than "Tell me about CRISPR."
Handle Errors Like a Pro:
Common Issues
"Can't connect to api.reisearch.box" - Check your internet or VPN. REIgent needs to access the web.
"Invalid API key" - Double-check your key. Copy-paste issues happen to the best of us.
Timeout errors - Research queries might take longer. Increase your timeout settings.
Last updated