This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/@mistralai/mistralai/docs/sdks/jobs

Jobs

(fineTuning.jobs)

Overview

Available Operations

  • list - Get Fine Tuning Jobs
  • create - Create Fine Tuning Job
  • get - Get Fine Tuning Job
  • cancel - Cancel Fine Tuning Job
  • start - Start Fine Tuning Job

list

Get a list of fine-tuning jobs for your organization and user.

Example Usage

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const result = await mistral.fineTuning.jobs.list({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MistralCore } from "@mistralai/mistralai/core.js";
import { fineTuningJobsList } from "@mistralai/mistralai/funcs/fineTuningJobsList.js";

// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const res = await fineTuningJobsList(mistral, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("fineTuningJobsList failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.JobsApiRoutesFineTuningGetFineTuningJobsRequest ✔️ The request object to use for the request.
options RequestOptions ➖ Used to set various options for making HTTP requests.
options.fetchOptions RequestInit ➖ Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig ➖ Enables retrying HTTP requests under certain failure conditions.

Response

Promise<components.JobsOut>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

create

Create a new fine-tuning job, it will be queued for processing.

Example Usage

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const result = await mistral.fineTuning.jobs.create({
    model: "Camaro",
    hyperparameters: {
      learningRate: 0.0001,
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MistralCore } from "@mistralai/mistralai/core.js";
import { fineTuningJobsCreate } from "@mistralai/mistralai/funcs/fineTuningJobsCreate.js";

// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const res = await fineTuningJobsCreate(mistral, {
    model: "Camaro",
    hyperparameters: {
      learningRate: 0.0001,
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("fineTuningJobsCreate failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request components.JobIn ✔️ The request object to use for the request.
options RequestOptions ➖ Used to set various options for making HTTP requests.
options.fetchOptions RequestInit ➖ Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig ➖ Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.JobsApiRoutesFineTuningCreateFineTuningJobResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get

Get a fine-tuned job details by its UUID.

Example Usage

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const result = await mistral.fineTuning.jobs.get({
    jobId: "c167a961-ffca-4bcf-93ac-6169468dd389",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MistralCore } from "@mistralai/mistralai/core.js";
import { fineTuningJobsGet } from "@mistralai/mistralai/funcs/fineTuningJobsGet.js";

// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const res = await fineTuningJobsGet(mistral, {
    jobId: "c167a961-ffca-4bcf-93ac-6169468dd389",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("fineTuningJobsGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.JobsApiRoutesFineTuningGetFineTuningJobRequest ✔️ The request object to use for the request.
options RequestOptions ➖ Used to set various options for making HTTP requests.
options.fetchOptions RequestInit ➖ Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig ➖ Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.JobsApiRoutesFineTuningGetFineTuningJobResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

cancel

Request the cancellation of a fine tuning job.

Example Usage

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const result = await mistral.fineTuning.jobs.cancel({
    jobId: "6188a2f6-7513-4e0f-89cc-3f8088523a49",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MistralCore } from "@mistralai/mistralai/core.js";
import { fineTuningJobsCancel } from "@mistralai/mistralai/funcs/fineTuningJobsCancel.js";

// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const res = await fineTuningJobsCancel(mistral, {
    jobId: "6188a2f6-7513-4e0f-89cc-3f8088523a49",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("fineTuningJobsCancel failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.JobsApiRoutesFineTuningCancelFineTuningJobRequest ✔️ The request object to use for the request.
options RequestOptions ➖ Used to set various options for making HTTP requests.
options.fetchOptions RequestInit ➖ Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig ➖ Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.JobsApiRoutesFineTuningCancelFineTuningJobResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

start

Request the start of a validated fine tuning job.

Example Usage

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const result = await mistral.fineTuning.jobs.start({
    jobId: "56553e4d-0679-471e-b9ac-59a77d671103",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MistralCore } from "@mistralai/mistralai/core.js";
import { fineTuningJobsStart } from "@mistralai/mistralai/funcs/fineTuningJobsStart.js";

// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
  apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});

async function run() {
  const res = await fineTuningJobsStart(mistral, {
    jobId: "56553e4d-0679-471e-b9ac-59a77d671103",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("fineTuningJobsStart failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.JobsApiRoutesFineTuningStartFineTuningJobRequest ✔️ The request object to use for the request.
options RequestOptions ➖ Used to set various options for making HTTP requests.
options.fetchOptions RequestInit ➖ Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig ➖ Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.JobsApiRoutesFineTuningStartFineTuningJobResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*