本文へスキップ
ドキュメントのナビゲーション: 意思決定モデル / バージョン

バージョン

RightNow AI意思決定モデルバージョン 更新日

このページの内容

現在のモデルに従うにはエイリアスを、バージョンを選ぶには固定した ID を使います。

decide.ts
import { RightNowClient } from '@rightnowai/rightnow';

const client = new RightNowClient({
  apiKey: process.env.RIGHTNOW_API_KEY,
  baseURL: "https://api.rightnowai.co/v1",
});
const reply = await client.decide({
  "model": "rightnow-decision-3.0.0",
  "state": "The blender I ordered arrived with a cracked jar.",
  "questions": {
    "damaged": {
      "type": "boolean",
      "instructions": "Did the item arrive damaged?"
    }
  }
});
console.log(JSON.stringify(reply, null, 2));

// Set RIGHTNOW_API_KEY to your API key before running this example.
// Run this example on your server.
// SDK defaults: The default is 5 retries, also the maximum, with 150 seconds
// per attempt and a 60-second total retry budget. A single wait longer than 60
// seconds raises the last error.
// Use Retry-After-Ms, or Retry-After when milliseconds are absent. The wait is
// never shorter than a random backoff floor: a random fraction of 0.5 seconds
// doubled for each attempt, capped at 8 seconds.

rnsk_ で始まるキーは、通常の HTTP で決定のパスを呼び出します。

SDK パッケージのバージョンは 0.5.1 です。パッケージのバージョンとモデル ID は別のものです。

エイリアス

rightnow-decision は、検証済みのエイリアスの参照先に従います。その参照先は、モデル一覧の alias_for で確かめられます。 一覧では同じモデルが以前の ID で示されます。リクエストはどちらの ID も受け付けます。

固定したバージョン

固定した ID は、検証済みのモデルの特定のバージョンを指します。 rightnow-decision は rightnow-decision-3.0.0 で答えます。これは提供中の唯一のバージョンで、固定することもできます。

利用できる名前を確かめるには、認証付きの GET /v1/models を使います。モデルのリファレンスに、その確認のリクエストがあります。

信頼度

新しい回答には decision、confidence、alternatives、calibrated が含まれます。confidence は選ばれた結果の確率で、このリリースでは calibrated は false です。以前の冪等な再送は保存された回答の形のままです。それらにはこの信頼度の意味を当てはめないでください。

提供終了

固定したモデル ID は提供を終えることがあります。その後は 404 model_not_found を返すので、エイリアスかモデル一覧のバージョンを使ってください。アプリの固定を変える前に、代わりのモデルを確認してください。