Prerequisite: Please install Node.js (version 19 or higher) before
proceeding.
Prerequisite: At this step you will need your Moai Apikey to continue.
How to get my Moai Apikey ?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Humiris AI is a library that allows developers to seamlessly integrate Mixture of AI Basic and Advanced into their applications. This library is designed to simplify the process of adding Mixture of AI features and functionalities, making it accessible for developers of all levels
npm install humiris-ai
yarn add humiris-ai
import { BasicMoAi, AdvancedMoAi } from 'humiris-ai';
import { BasicMoAi } from "humiris-ai";
const moai = new BasicMoAi("your_api_key");
const payload = {
mixTuningId: "exampleId",
messages: [
{
role: "system",
content:
"You are a helpful assistant that answers questions about technology.",
},
{
role: "user",
content:
"What is the diference between a microprocessor and a central processing unit?",
},
],
temperature: 0.7,
maxTokens: 150,
};
moai
.useBasicMixtuning(payload)
.then((response) => {
console.log("Response from AI:", response);
})
.catch((error) => {
console.error("Error:", error);
});
import { AdvancedMoAi } from "humiris-ai";
const advancedMoai = new AdvancedMoAi("your_api_key");
const advancedPayload = {
mixTuningId: "advancedExampleId",
messages: [
{
role: "system",
content:
"You are a helpful assistant that answers questions about technology.",
},
{
role: "user",
content:
"What is the diference between a microprocessor and a central processing unit?",
},
],
temperature: 0.9,
maxTokens: 250,
};
advancedMoai
.useAdvancedMixtuning(advancedPayload)
.then((response) => {
console.log("Advanced response from AI:", response);
})
.catch((error) => {
console.error("Advanced error:", error);
});
