Prerequisite: Please install Node.js (version 19 or higher) before proceeding.

Follow these steps to install and run Humiris on your operating system:

Step 1: Install Humiris:

Prerequisite: At this step you will need your Moai Apikey to continue. How to get my Moai Apikey ?

Step 2: Use a mixtuning via npm:

After creating your API key, you’ll need to add your cloud provider API keys to our platform as indicated here.

Once you’ve done that, you’ll be able to perform your mixtuning after completing the necessary action in the mixtuning sction on the platform.

Typescript exemple
import MoAi from "humiris-ai";

const apiKey = "your_moai_apikey";
const moai = new MoAi(apiKey);

const payload = {
  mixTuningId: "your_mix_tuning_id",
  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: 10,
  maxTokens: 100,
};

async function testUseMixtuning() {
  try {
    const response = await moai.useMixtuning(payload);
    console.log("Response:", response.data);
  } catch (error) {
    console.error("Error:", (error as Error)?.message ?? "Unknown error");
  }
}

testUseMixtuning();

Step 3: Use a mixtuning via api request:

api request
const response = await axios.post(
  "https://moai-service-app.humiris.ai/api/api-key-operators/use-basic-mixtuning",
  payload,
  {
    headers: {
      "moai-api-key": this.apiKey,
      "Content-Type": "application/json",
    },
  }
);
return response;

###Payload

api url
const payload = {
  mixTuningId: "your_mix_tuning_id",
  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: 10,
  maxTokens: 100,
};
  • mixTuningId: you can find it on the platform, in your mixtuning list.

  • messages: add your message here .

  • temperature: must be an integer

  • maxTokens: must be an integer