▶︎動画でも話してるので、文章読むのが面倒な方はこちらをみてもらえればと思います。
今回はMyGPTのCustom Actionについて解説します。
これを読めば誰でも簡単にクオリティーの高いAI美女が作れるようになっているので興味がある人は、下のバナーをクリックして購入してみてね🎶
MyGPTのCustom Actionについて
この動画はMyGPTの解説シリーズの続きです。

なお、このページへのリンクは下に貼っておきますので、そちらをご確認ください。
前回までは「名言博士」という名前のMyGPTを作成しました。

今回は、このGPTにCustom Actionを追加していきます。
まずは「Editボタン」をクリックして編集画面に移動します。

編集画面が表示されたら、次に「Configureボタン」をクリックします。

画面が切り替わったら「Create new action」と書かれているボタンをクリックします。

これでCustom Actionを設定するための準備が整いました。

Custom Actionは「Schema」というタイトルの下にあるテキストボックスに処理内容を設定します。

まずは、あらかじめ用意してある設定内容を追加していきましょう。
下記に貼ってあるテキストをコピーします。
{
"openapi": "3.1.0",
"info": {
"title": "日替わり名言集",
"description": "今日の名言を取得します。01-01〜12-31の日付で名言を取得できます。",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://meigen365.vercel.app"
}
],
"paths": {
"/posts/{date}": {
"get": {
"description": "指定日時の名言を取得する。",
"operationId": "GetDailyWisdom",
"parameters": [
{
"name": "date",
"in": "path",
"description": "MM-DD形式の日付のテキスト(例:01-01(1月1日))。",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-1][0-9]-[0-3][0-9]$"
}
}
],
"responses": {
"200": {
"description": "データの取得に成功しました",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DailyWisdomResponse"
}
}
}
},
"404": {
"description": "名言が見つかりませんでした",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"DailyWisdomResponse": {
"type": "object",
"properties": {
"quote": {
"type": "string"
},
"author": {
"type": "string"
},
"reference": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
テキストをコピーしたら、先ほどの画面に戻ります。
そして、「Schema」というタイトルの下にあるテキストボックスにコピーしたテキストを貼り付けます。

このように、Custom ActionはJSON形式のフォーマットで指定することができます。
今回は、このサイトの情報をGPTに組み込むようにします。

それでは、この連携させるサイトを表示してみましょう。

このサイトは日替わりの名言サイトです。
全部で366件の名言が設定されています。
名言を確認するには、「/posts」にアクセスします。

そうすると、366日分の名言が一覧で表示されます。

そして、ポストの後ろに日付を指定すると、その日付の名言を確認することができます。
トップページにリンクが貼ってあるのでクリックします。

この場合は、1月1日の名言が表示されています。

“author”が発言者、“quote”が名言、そして“reference”が作品名というルールでデータが表示されます。
データはこのようにJSON形式で管理されています。
このサイトにはさらにもう1つ、プライバシーポリシーのページがあります。

このプライバシーポリシーのURLをコピーします。

そして、GPTの編集画面に戻ります。

Custom Actionで連携するサイトのプライバシーポリシーを指定するテキストボックスが用意されています。
そのため、先ほどコピーしたプライバシーポリシーのURLを貼り付けます。

これでCustom Actionの設定が完了しました。
右上の「セーブ」ボタンをクリックします。

次に、「Confirm」ボタンをクリックします。

設定が反映されたら、「View GPT」というボタンが表示されます。

このボタンをクリックします。
そうすると、作成したGPTの画面に移動します。

それでは早速、Custom Actionの動作を確認してみましょう。
「今日の名言を教えてください」と入力します。

そうすると、このようにCustom Actionで設定したサイトにアクセスするための確認ボタンが表示されます。

アクセスして処理を進めて欲しいので、「Allowボタン」をクリックします。

これで、先ほど設定したサイトのデータを取得してくれます。
そして、取得したデータを元にGPTが回答してくれます。
今回は、このような回答になりました。

この動画を収録している日付は11月17日です。
連携しているサイトに登録されている11月17日の名言がこちらです。

名言や発言者、そして作品名の情報が一致しています。
それでは次に、「昨日の名言を教えてください」と聞いてみましょう。

先ほどと同じように、連携サイトへのアクセスの許可を求められます。
これ以降のやり取りで連携サイトにアクセスすることを全て許可しておきたいので、「Always allow」と書かれているボタンをクリックします。

しばらく待っていると、このような回答が返ってきました。

この動画を収録している日付は11月17日です。
そのため、昨日の日付は11月16日です。
連携サイトに登録されている11月16日の名言がこちらです。

期待通り、昨日の日付の名言のデータを元に回答が作成されています。
それでは次に、日付を指定してみましょう。
「5月5日の名言を教えてください」と入力します。

そうすると、このような回答が返ってきました。

この回答も、連携サイトの5月5日の名言を元に作成してくれています。

このように、Custom Actionを組み込むことで、外部のサーバーと連携させたGPTを作成することができます。
是非お試しください。