{"id":7438,"date":"2023-03-03T07:53:41","date_gmt":"2023-03-02T22:53:41","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=7438"},"modified":"2023-03-03T23:11:03","modified_gmt":"2023-03-03T14:11:03","slug":"post-7438","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=7438","title":{"rendered":"GAS\u3067ChatGPT\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u65b9\u6cd5\uff01\u6587\u8108\u306b\u6cbf\u3063\u305f\u5fdc\u7b54\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac"},"content":{"rendered":"\n<p>2023\u5e743\u67082\u65e5\u3088\u308a\u3001ChatGPT\u306eAPI\u304c\u4e00\u822c\u516c\u958b\u3055\u308c\u3066\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>ChatGPT\u306eAPI\u3092\u4f7f\u3048\u3070\u3001OpenAI\u306e\u5f93\u6765\u306e\u6587\u7ae0\u751f\u6210API\u3067\u306f\u3067\u304d\u306a\u304b\u3063\u305f\u6587\u8108\u306b\u5fdc\u3058\u305f\u5fdc\u7b54\u3092\u8fd4\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001Google Apps Script(GAS)\u3092\u4f7f\u3063\u3066\u3001ChatGPT\u306eAPI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u6587\u8108\u306b\u6cbf\u3063\u305f\u5fdc\u7b54\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u3092\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"ChatGPT\u306eAPI\u3092GAS\u3067\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\uff01API\u7d4c\u7531\u3067\u6587\u8108\u306b\u6cbf\u3063\u305f\u5fdc\u7b54\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/JLrD6wmwIis?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306eAPI\u304c\u3064\u3044\u306b3\/2\u4e00\u822c\u516c\u958b<\/h2>\n\n\n\n<p>ChatGPT\u306eAPI\u304c\u65e5\u672c\u6642\u95932023\u5e743\u67082\u65e5\u306b\u4e00\u822c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JK9Z8rt1iy\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=7428\">ChatGPT\u306eAPI\u304c3\/2\u304b\u3089\u4e00\u822c\u516c\u958b\uff01\u6599\u91d1\u3084\u30c7\u30fc\u30bf\u5229\u7528\u3084\u4f7f\u3044\u65b9\u3092\u89e3\u8aac<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;ChatGPT\u306eAPI\u304c3\/2\u304b\u3089\u4e00\u822c\u516c\u958b\uff01\u6599\u91d1\u3084\u30c7\u30fc\u30bf\u5229\u7528\u3084\u4f7f\u3044\u65b9\u3092\u89e3\u8aac&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=7428&#038;embed=true#?secret=JN1W8UetKI#?secret=JK9Z8rt1iy\" data-secret=\"JK9Z8rt1iy\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>ChatGPT\u306eAPI\u306b\u3064\u3044\u3066\u306f\u7d041\u30f6\u6708\u534a\u524d\u306e2023\u5e741\u670817\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u4e88\u5b9a\u3068\u306e\u767a\u8868\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"tgECFtcikR\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=7119\">ChatGPT\u304cAPI\u30ea\u30ea\u30fc\u30b9\u4e88\u5b9a\u30681\/17\u306b\u767a\u8868!\u30a6\u30a7\u30a4\u30c8\u30ea\u30b9\u30c8\u306e\u767b\u9332\u624b\u9806\u3082\u7d39\u4ecb<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;ChatGPT\u304cAPI\u30ea\u30ea\u30fc\u30b9\u4e88\u5b9a\u30681\/17\u306b\u767a\u8868!\u30a6\u30a7\u30a4\u30c8\u30ea\u30b9\u30c8\u306e\u767b\u9332\u624b\u9806\u3082\u7d39\u4ecb&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=7119&#038;embed=true#?secret=cSV9nFZHdu#?secret=tgECFtcikR\" data-secret=\"tgECFtcikR\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u7279\u306b\u30a6\u30a7\u30a4\u30c8\u30ea\u30b9\u30c8\u306b\u767b\u9332\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u9806\u6b21\u3068\u3044\u3046\u5f62\u3067\u306f\u306a\u304f\u3001\u65e5\u672c\u3067\u306f\u4e00\u6589\u306bChatGPT\u306eAPI\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306eAPI\u3092GAS\u3067\u5229\u7528<\/h2>\n\n\n\n<p>ChatGPT\u306eAPI\u3092\u8a66\u3057\u305f\u3044\u5834\u5408\u306b\u30aa\u30b9\u30b9\u30e1\u306a\u306e\u304c\u3001Google Apps Script(GAS)\u3067\u3059\u3002<\/p>\n\n\n\n<p>GAS\u306f\u7121\u6599\u3067\u5229\u7528\u3067\u304d\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u30c8\u30ea\u30ac\u30fc\u5b9f\u884c\u3084\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084Google\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u9023\u643a\u3067\u304d\u308b\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>LINE\u3084Slack\u3067\u306eAI\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3084\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8a66\u4f5c\u3059\u308b\u306e\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001GAS\u3067ChatGPT\u306eAPI\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u521d\u5fc3\u8005\u5411\u3051\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306eAPI\u5229\u7528\u767b\u9332\u3068API\u30ad\u30fc\u767a\u884c<\/h2>\n\n\n\n<p>ChatpGPT\u306eAPI\u3092\u5229\u7528\u3059\u308b\u306b\u306fOpenAI\u3078\u306e\u5229\u7528\u767b\u9332\u3068API\u30ad\u30fc\u767a\u884c\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>ChatGPT\u306eAPI\u306f\u5f93\u6765\u306eOpenAI\u306eAPI\u30b5\u30fc\u30d3\u30b9\u306e1\u3064\u3068\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u5229\u7528\u767b\u9332\u3068API\u30ad\u30fc\u767a\u884c\u624b\u9806\u306f\u5f93\u6765\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u203bOpenAI\u306eAPI\u5229\u7528\u767b\u9332\u3068API\u30ad\u30fc\u306e\u767a\u884c\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"vXpOYh7vig\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=6988\">\u30102023\u5e74\u7248\u3011OpenAI\u306eAPI\u30ad\u30fc\u767a\u884c\u30fb\u53d6\u5f97\u624b\u9806\uff01ChatGPT\u3084GPT-4\u3001DALL-E3\u3092API\u7d4c\u7531\u3067\u5229\u7528\u53ef\u80fd<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u30102023\u5e74\u7248\u3011OpenAI\u306eAPI\u30ad\u30fc\u767a\u884c\u30fb\u53d6\u5f97\u624b\u9806\uff01ChatGPT\u3084GPT-4\u3001DALL-E3\u3092API\u7d4c\u7531\u3067\u5229\u7528\u53ef\u80fd&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=6988&#038;embed=true#?secret=q0IYQHBvIM#?secret=vXpOYh7vig\" data-secret=\"vXpOYh7vig\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u643a\u5e2f\u96fb\u8a71\u756a\u53f7\u3055\u3048\u3042\u308c\u3070\u89e3\u8aac\u8a18\u4e8b\u306e\u624b\u9806\u306b\u5f93\u3063\u3066\u3001OpenAI\u306b\u4f1a\u54e1\u767b\u9332\u3057\u3066\u3001API\u30ad\u30fc\u3092\u767a\u884c\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u203b3\u30f6\u6708\u9593\u5229\u7528\u53ef\u80fd\u306a$18\u30c9\u30eb\u5206\u306e\u30af\u30ec\u30b8\u30c3\u30c8\u304c\u4ed8\u4e0e\u3055\u308c\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p>API\u30ad\u30fc\u306e\u767a\u884c\u304c\u3067\u304d\u305f\u3089\u3001Google Apps Script(GAS)\u3067API\u30ad\u30fc\u3092\u4f7f\u7528\u3059\u308b\u306e\u3067\u3001\u30e1\u30e2\u5e33\u306a\u3069\u306b\u63a7\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306eAPI\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30ed\u30fc\u30eb\u306f3\u7a2e\u985e<\/h2>\n\n\n\n<p>ChatGPT\u306eAPI\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u306f\u3001\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8\u5185\u5bb9\u306b\u52a0\u3048\u3066\u30013\u7a2e\u985e\u306e\u30ed\u30fc\u30eb\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb<\/li><li>\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u30ed\u30fc\u30eb<\/li><li>\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb<\/li><\/ol>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u306f\u3001ChatGPT\u306e\u5229\u7528\u8005\u306b\u5f53\u305f\u308b\u5f79\u5272\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306fChatGPT\u306e\u5229\u7528\u8005\u304c\u6295\u7a3f\u3057\u305f\u6587\u7ae0\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u65b9\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u30ed\u30fc\u30eb\u306f\u3001ChatGPT\u306e\u5fdc\u7b54AI\u306b\u5f53\u305f\u308b\u5f79\u5272\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306fChatGPT\u306e\u5fdc\u7b54AI\u304c\u8fd4\u7b54\u3057\u305f\u6587\u7ae0\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u306f\u3001\u521d\u56de\u5b9f\u884c\u6642\u306a\u3069\u306b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u3057\u3066\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u306b\u6307\u793a\u3059\u308b\u5f79\u5272\u3067\u3059\u3002<\/p>\n\n\n\n<p>ChatGPT\u306eAPI\u3067AI\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092\u4f5c\u308b\u5834\u5408\u306b\u3001\u3069\u3093\u306a\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u6295\u7a3f\u306e\u5834\u5408\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u3067ChatGPT\u306b\u632f\u308b\u821e\u3044\u306b\u3064\u3044\u3066\u521d\u671f\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u300c\u6bce\u56de\u8a9e\u5c3e\u306b\u7279\u5b9a\u30ef\u30fc\u30c9\u3092\u3064\u3051\u308b\u300d\u3084\u300c\u524d\u63d0\u6761\u4ef6\u3092\u8a2d\u3051\u305f\u4e0a\u3067ChatGPT\u306b\u56de\u7b54\u3055\u305b\u308b\u300d\u3068\u3044\u3063\u305f\u6319\u52d5\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u3001\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u30ed\u30fc\u30eb\u3001\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u306f\u6587\u7ae0\u306e\u8aac\u660e\u3060\u3051\u3067\u306f\u308f\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u3001\u5b9f\u969b\u306b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u52d5\u304b\u3057\u3066\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067ChatGPT\u306eAPI\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u524d\u6e96\u5099<\/h2>\n\n\n\n<p>Google Apps Script(GAS)\u3067ChatGPT\u306eAPI\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u4e8b\u524d\u6e96\u5099\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u524d\u8ff0\u3057\u305f\u624b\u9806\u3067\u53d6\u5f97\u3057\u305fChatGPT\u306eAPI\u30ad\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p>API\u30ad\u30fc\u306fGAS\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u76f4\u66f8\u304d\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3092Github\u306a\u3069\u3067\u7ba1\u7406\u3059\u308b\u969b\u306b\u6d41\u51fa\u3059\u308b\u6050\u308c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001GAS\u3067\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306bAPI\u30ad\u30fc\u3092\u683c\u7d0d\u3057\u3066\u3001\u30b3\u30fc\u30c9\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8aad\u307f\u8fbc\u3080\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n\n\n\n<p>\uff11\uff0eGAS\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u958b\u3044\u305f\u3089\u3001\u5de6\u30e1\u30cb\u30e5\u30fc\u306b\u3042\u308b\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"465\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005.jpg\" alt=\"Google Apps Script(GAS)\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u958b\u304f\u305f\u3081\u3001\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u300d\u3092\u30af\u30ea\u30c3\u30af\" class=\"wp-image-7446\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-300x174.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-768x446.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-530x308.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-565x328.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-710x413.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_005-725x421.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\uff12\uff0e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u753b\u9762\u3092\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u9805\u76ee\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u300c\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\uff13\uff0e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u300cAPIKEY\u300d\u3068\u5165\u308c\u3066\u3001\u5024\u306b\u4e8b\u524d\u306b\u53d6\u5f97\u3057\u305fChatGPT\u306eAPI\u30ad\u30fc\u3092\u30b3\u30d4\u30da\u3057\u3001\u300c\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4fdd\u5b58\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"438\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006.jpg\" alt=\"Google Apps Script(GAS)\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u304b\u3089\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u8ffd\u52a0\u3067\u30ad\u30fc\u3068\u5024\u3092\u30bb\u30c3\u30c8\u3057\u3066ChatGPT\u306eAPI\u30ad\u30fc\u3092\u683c\u7d0d\" class=\"wp-image-7447\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-300x164.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-768x420.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-530x290.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-565x309.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-710x389.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_006-725x397.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306bChatGPT\u306eAPI\u30ad\u30fc\u3092\u8ffd\u52a0\u3057\u3001GAS\u30b3\u30fc\u30c9\u304b\u3089\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5de6\u30e1\u30cb\u30e5\u30fc\u306b\u3042\u308b\u30a8\u30c7\u30a3\u30bf\u3092\u8868\u3059\u300c&lt;&gt;\u300d\u30a2\u30a4\u30b3\u30f3\u3001GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306b\u623b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306eAPI\u3092\u53e9\u304fGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u2460<\/h2>\n\n\n\n<p>\u307e\u305a\u306f\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u5f62\u3067ChatGPT\u306eAPI\u3092\u53e9\u304fGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u306e\u307f\u5358\u4f53\u6295\u7a3f\u3092API\u7d4c\u7531\u3067\u9001\u308a\u3001ChatGPT\u306eAPI\u306e\u5fdc\u7b54\u7d50\u679c\u3092\u30ed\u30b0\u51fa\u529b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"530\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-1024x530.jpg\" alt=\"ChatGPT\u306eAPI\u306b\u59cb\u3081\u3066\u5fdc\u7b54\u3059\u308b\u30b1\u30fc\u30b9\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092Google Apps Script(GAS)\u3067\u5b9f\u884c\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-7441\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-1024x530.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-300x155.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-768x397.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-530x274.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-565x292.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-710x367.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001-725x375.jpg 725w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_001.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function requestChatCompletion() {\n  \/\/\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u8a2d\u5b9a\u3057\u305fOpenAI\u306eAPI\u30ad\u30fc\u3092\u53d6\u5f97\n  const apiKey = ScriptProperties.getProperty('APIKEY');\n  \/\/ChatGPT\u306eAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\n  const apiUrl = 'https:\/\/api.openai.com\/v1\/chat\/completions';\n  \/\/ChatGPT\u306b\u6295\u3052\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5b9a\u7fa9(\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u306e\u6295\u7a3f\u6587\u306e\u307f)\n  const messages = [{'role': 'user', 'content': 'Google Apps Script\u306e\u6d3b\u7528\u4e8b\u4f8b\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044'}];\n  \/\/OpenAI\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u30d8\u30c3\u30c0\u30fc\u60c5\u5831\u3092\u8a2d\u5b9a\n  const headers = {\n    'Authorization':'Bearer '+ apiKey,\n    'Content-type': 'application\/json',\n    'X-Slack-No-Retry': 1\n  };\n  \/\/ChatGPT\u30e2\u30c7\u30eb\u3084\u30c8\u30fc\u30af\u30f3\u4e0a\u9650\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u8a2d\u5b9a\n  const options = {\n    'muteHttpExceptions' : true,\n    'headers': headers, \n    'method': 'POST',\n    'payload': JSON.stringify({\n      'model': 'gpt-3.5-turbo',\n      'max_tokens' : 1024,\n      'temperature' : 0.9,\n      'messages': messages})\n  };\n  \/\/OpenAI\u306eChatGPT\u306bAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308a\u3001\u7d50\u679c\u3092\u5909\u6570\u306b\u683c\u7d0d\n  const response = JSON.parse(UrlFetchApp.fetch(apiUrl, options).getContentText());\n  \/\/ChatGPT\u306eAPI\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u30ed\u30b0\u51fa\u529b\n  console.log(response.choices[0].message.content);\n}\n<\/code><\/pre>\n\n\n\n<p>\u307e\u305a\u3001\u4e8b\u524d\u306b\u8a2d\u5b9a\u3057\u305fChatGPT\u306eAPI\u30ad\u30fc\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306bChatGPT\u306eAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8(URL)\u3067\u3042\u308b\u300c<em>https:\/\/api.openai.com\/v1\/chat\/completions<\/em>\u300d\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>role\u3068content\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u914d\u5217\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001role\u306fuser\u3001content\u306bChatGPT\u306b\u5fdc\u7b54\u3057\u3066\u307b\u3057\u3044\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>API\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fc5\u8981\u306aAPI\u30ad\u30fc\u3092\u542b\u3081\u305f\u30d8\u30c3\u30c0\u30fc\u60c5\u5831\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>model\u306bChatGPT\u306e\u30e2\u30c7\u30eb\u3067\u3042\u308b\u300cgpt-3.5-turbo\u300d\u3084\u3001\u6700\u5927\u30c8\u30fc\u30af\u30f3\u6570\u3001\u6295\u7a3f\u306e\u5275\u9020\u6027\u3092\u8abf\u6574\u3059\u308btemperature(0-1.0\u307e\u3067\u9078\u629e\u30011\u306b\u8fd1\u3065\u304f\u307b\u3069\u5275\u9020\u6027\u304c\u9ad8\u307e\u308b)\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u30b3\u30fc\u30c9\u5185\u3067\u4e00\u901a\u308a\u306eAPI\u306b\u95a2\u3059\u308b\u5b9a\u7fa9\u304c\u3067\u304d\u305f\u3089\u3001UrlFetchApp\u3067API\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3001\u5fdc\u7b54\u7d50\u679c\u306eJSON\u30c7\u30fc\u30bf\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3057\u3001ChatGPT\u306eAPI\u7d4c\u7531\u3067\u306e\u5fdc\u7b54\u6587\u3092\u30ed\u30b0\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203bChatGPT\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u7d50\u679c\u306eresponse\u3067\u306f\u3001\u300c<em>response.choices[0].message.content<\/em>\u300d\u306b\u6295\u7a3f\u6587\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u30b9\u30af\u30ea\u30d7\u30c8\u300crequestChatCompletion\u300d\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5b9f\u884c\u30ed\u30b0\u306bChatGPT\u306eAPI\u304b\u3089\u306e\u5fdc\u7b54\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"527\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-1024x527.jpg\" alt=\"ChatGPT\u306eAPI\u306b\u59cb\u3081\u3066\u5fdc\u7b54\u3059\u308b\u30b1\u30fc\u30b9\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092Google Apps Script(GAS)\u3067\u5b9f\u884c\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3067ChatGPT\u304b\u3089\u306e\u5fdc\u7b54\u7d50\u679c\u304c\u30ed\u30b0\u51fa\u529b\" class=\"wp-image-7442\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-1024x527.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-300x155.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-768x396.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-530x273.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-565x291.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-710x366.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002-725x373.jpg 725w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_002.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u203bGAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u521d\u56de\u5b9f\u884c\u6642\u306f\u627f\u8a8d\u4f5c\u696d\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u8a31\u53ef\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"vA2GvxxhDz\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=609\">Google Apps Script(GAS)\u5165\u9580 \u521d\u56de\u30b3\u30fc\u30c9\u5b9f\u884c\u6642\u306e\u627f\u8a8d\u30fb\u8a31\u53ef\u65b9\u6cd5\u3092\u89e3\u8aac\u3010\u56f3\u8aac\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Google Apps Script(GAS)\u5165\u9580 \u521d\u56de\u30b3\u30fc\u30c9\u5b9f\u884c\u6642\u306e\u627f\u8a8d\u30fb\u8a31\u53ef\u65b9\u6cd5\u3092\u89e3\u8aac\u3010\u56f3\u8aac\u3011&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=609&#038;embed=true#?secret=vjhfCxgkGM#?secret=vA2GvxxhDz\" data-secret=\"vA2GvxxhDz\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306bChatGPT\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u884c\u3057\u306a\u304f\u3066\u3082\u3001API\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u5fdc\u7b54\u7d50\u679c\u3092GAS\u30b9\u30af\u30ea\u30d7\u30c8\u7d4c\u7531\u3067\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT\u306e\u6587\u8108\u306b\u6cbf\u3063\u305f\u5fdc\u7b54\u3092\u8fd4\u3059GAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u2461<\/h2>\n\n\n\n<p>\u5148\u7a0b\u306eGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306fChatGPT\u306eAPI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u307e\u3057\u305f\u304c\u3001ChatGPT\u306e\u7279\u5fb4\u3067\u3042\u308b\u300c\u6587\u8108\u306b\u6cbf\u3063\u305f\u300d\u5fdc\u7b54\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>ChatGPT\u306eAPI\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u305fmessages\u306b\u306f\u5f79\u5272\u3054\u3068\u306e\u8907\u6570\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u914d\u5217\u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u904e\u53bb\u306eChatGPT\u3078\u306e\u6295\u7a3f\u6587\u3068\u5fdc\u7b54\u6587\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u6587\u8108\u306b\u6cbf\u3063\u305f\u56de\u7b54\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function requestChatCompletionV2() {\n  \/\/\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u8a2d\u5b9a\u3057\u305fOpenAI\u306eAPI\u30ad\u30fc\u3092\u53d6\u5f97\n  const apiKey = ScriptProperties.getProperty('APIKEY');\n  \/\/ChatGPT\u306eAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\n  const apiUrl = 'https:\/\/api.openai.com\/v1\/chat\/completions';\n  \/\/ChatGPT\u306b\u6295\u3052\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5b9a\u7fa9(\u904e\u53bb\u306e\u3084\u308a\u53d6\u308a\u3082\u542b\u3081\u305f\u5f62)\n  const messages = [\n    {'role': 'user', 'content': '\u65e5\u672c\u3067\u6700\u3082\u4eba\u53e3\u306e\u591a\u3044\u90fd\u5e02\u306f\u3069\u3053\u3067\u3059\u304b\uff1f'},\n    {'role': 'assistant', 'content': '\u6771\u4eac\u3067\u3059\u3002'},\n    {'role': 'user', 'content': '\u305d\u306e\u6b21\u306f\u3069\u3053\u3067\u3059\u304b\uff1f'},\n    {'role': 'assistant', 'content': '\u6a2a\u6d5c\u5e02\u3067\u3059\u3002'},\n    {'role': 'user', 'content': '\u305d\u306e\u6b21\u306f\u3069\u3053\u3067\u3059\u304b\uff1f'},\n  ];\n  \/\/OpenAI\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u30d8\u30c3\u30c0\u30fc\u60c5\u5831\u3092\u8a2d\u5b9a\n  const headers = {\n    'Authorization':'Bearer '+ apiKey,\n    'Content-type': 'application\/json',\n    'X-Slack-No-Retry': 1\n  };\n  \/\/ChatGPT\u30e2\u30c7\u30eb\u3084\u30c8\u30fc\u30af\u30f3\u4e0a\u9650\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u8a2d\u5b9a\n  const options = {\n    'muteHttpExceptions' : true,\n    'headers': headers, \n    'method': 'POST',\n    'payload': JSON.stringify({\n      'model': 'gpt-3.5-turbo',\n      'max_tokens' : 1024,\n      'temperature' : 0.9,\n      'messages': messages})\n  };\n  \/\/OpenAI\u306eChatGPT\u306bAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308a\u3001\u7d50\u679c\u3092\u5909\u6570\u306b\u683c\u7d0d\n  const response = JSON.parse(UrlFetchApp.fetch(apiUrl, options).getContentText());\n  \/\/ChatGPT\u306eAPI\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u30ed\u30b0\u51fa\u529b\n  console.log(response.choices[0].message.content);\n}\n<\/code><\/pre>\n\n\n\n<p>GAS\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u307b\u3068\u3093\u3069\u540c\u3058\u3067\u3001messages\u5b9a\u6570\u5b9a\u7fa9\u306e\u90e8\u5206\u304c\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300c\u65e5\u672c\u306e\u4eba\u53e3\u304c\u6700\u3082\u591a\u3044\u90fd\u5e02\u306f\u3069\u3053\u304b\uff1f\u300d\u3068\u3044\u3046\u8cea\u554f\u306e\u56de\u7b54\u3068\u3057\u3066\u3001\u300c\u6771\u4eac\u300d\u3068\u53d7\u3051\u305f\u3042\u3068\u3001\u300c\u305d\u306e\u6b21\u306f\u3069\u3053\u304b\uff1f\u300d\u3068\u3044\u3046\u8cea\u554f\u3092\u6295\u7a3f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300c\u305d\u306e\u6b21\u306f\u3069\u3053\u304b\uff1f\u300d\u3068\u3044\u3046\u8cea\u554f\u306f\u524d\u6bb5\u306e\u6587\u8108\u304c\u7406\u89e3\u3067\u304d\u3066\u3044\u306a\u3051\u308c\u3070\u56de\u7b54\u3067\u304d\u306a\u3044\u8cea\u554f\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3046\u3057\u305f\u904e\u53bb\u306eChatGPT\u3078\u306e\u6295\u7a3f\u6587\u3092\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u3067\u8a2d\u5b9a\u3057\u3001ChatGPT\u306e\u5fdc\u7b54\u6587\u3092\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u30ed\u30fc\u30eb\u3067\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3001\u6587\u8108\u306b\u6cbf\u3063\u305f\u56de\u7b54\u3092ChatGPT\u306eAPI\u306f\u8fd4\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"527\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-1024x527.jpg\" alt=\"ChatGPT\u306eAPI\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u904e\u53bb\u306e\u5165\u529b\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u5fdc\u7b54\u7d50\u679c\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u3001\u6587\u8108\u306b\u5fdc\u3058\u305f\u5fdc\u7b54\u304c\u53ef\u80fd\u306b\u306a\u3063\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308bGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-7443\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-1024x527.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-768x395.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-530x273.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-565x291.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-710x365.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003-725x373.jpg 725w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_003.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>GAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u300c\u5927\u962a\u5e02\u300d\u3068\u6587\u8108\u306b\u6cbf\u3063\u305f\u56de\u7b54\u304c\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e88\u3081\u30b7\u30b9\u30c6\u30e0\u304c\u30eb\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u2462<\/h2>\n\n\n\n<p>\u6700\u5f8c\u306f\u3001ChatGPT\u306eAPI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u969b\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u3067\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u524d\u6bb5\u306eGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306emessages\u306e\u5b9a\u7fa9\u3092\u4e0b\u8a18\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">  \/\/ChatGPT\u306b\u6295\u3052\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5b9a\u7fa9(\u5192\u982d\u306b\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u8a2d\u5b9a)\n  const messages = [\n    {'role': 'system', 'content': '\u8a9e\u5c3e\u306f80%\u306e\u78ba\u7387\u3067\u30cb\u30e3\u30f3\u300120%\u306e\u78ba\u7387\u3067\u30b7\u30e3\u30fc\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002'},\n    {'role': 'user', 'content': '\u5143\u6c17\u304c\u51fa\u306a\u3044\u306e\u3067\u52b1\u307e\u3057\u3066\u304f\u3060\u3055\u3044\u3002'},\n  ];<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306buser\u30ed\u30fc\u30eb\u3067\u306f\u306a\u304f\u3001system\u30ed\u30fc\u30eb\u3067\u30c1\u30e3\u30c3\u30c8\u5fdc\u7b54\u306b\u5bfe\u3059\u308b\u30eb\u30fc\u30eb\u3084\u53d6\u308a\u6c7a\u3081\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"521\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-1024x521.jpg\" alt=\"ChatGPT\u306eAPI\u3067system\u30ed\u30fc\u30eb\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4ed8\u4e0e\u3057\u3066ChatGPT\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046Google Apps Script\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u5b9f\u884c\u30ed\u30b0\u306e\u7d50\u679c\" class=\"wp-image-7444\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-1024x521.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-768x390.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-530x269.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-565x287.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-710x361.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004-725x369.jpg 725w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/03\/20230303_auto_004.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>GAS\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001system\u30ed\u30fc\u30eb\u3067\u6307\u793a\u3057\u305f\u30eb\u30fc\u30eb\u306b\u3057\u305f\u304c\u3063\u3066\u3001\u5fdc\u7b54\u7d50\u679c\u304c\u8fd4\u5374\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>system\u30ed\u30fc\u30eb\u306fuser\u30ed\u30fc\u30eb\u3067\u3082\u4ee3\u66ff\u3067\u304d\u305d\u3046\u3067\u3059\u304c\u3001\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u969b\u306bsystem\u30ed\u30fc\u30eb\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308c\u3070\u3001\u300cChatGPT\u5fdc\u7b54\u30eb\u30fc\u30eb\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u300d\u3068\u5206\u304b\u308b\u306e\u3067\u53ef\u8aad\u6027\u304c\u9ad8\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001user\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u904e\u53bb\u306eChatGPT\u306e\u3084\u308a\u53d6\u308a\u3084\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001ChatGPT\u306eAPI\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u3001ChatGPT\u306eAPI\u3092Google Apps Script(GAS)\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>OpenAI\u306eAPI\u5229\u7528\u767b\u9332\u3068API\u30ad\u30fc\u3092\u767a\u884c\u3059\u308c\u3070\u3001GAS\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u7c21\u5358\u306bAPI\u3092\u53e9\u3044\u3066\u3001ChatGPT\u306e\u5fdc\u7b54\u7d50\u679c\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>ChatGPT\u306eAPI\u3067\u306f\u3001\u3053\u308c\u307e\u3067\u306eOpenAI\u306eAPI\u3068\u7570\u306a\u308a\u3001\u904e\u53bb\u306eChatGPT\u3078\u306e\u6295\u7a3f\u6587\u3084\u5fdc\u7b54\u6587\u306e\u3084\u308a\u53d6\u308a\u3092\u30bb\u30c3\u30c8\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3046\u3057\u305f\u904e\u53bb\u306eChatGPT\u306e\u3084\u308a\u53d6\u308a\u3092\u4ed8\u4e0e\u3057\u3066API\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u3001\u6587\u8108\u306b\u6cbf\u3063\u305f\u5fdc\u7b54\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u30ed\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001ChatGPT\u306e\u632f\u308b\u821e\u3044\u65b9\u3092\u4e8b\u524d\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u3092\u4f7f\u3048\u3070\u3001ChatGPT\u306eAPI\u3092\u7c21\u5358\u306b\u8a66\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305c\u3072\u4eca\u56de\u7d39\u4ecb\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u6539\u826f\u3057\u3066\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2023\u5e743\u67082\u65e5\u3088\u308a\u3001ChatGPT\u306eAPI\u304c\u4e00\u822c\u516c\u958b\u3055\u308c\u3066\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 ChatGPT\u306eAPI\u3092\u4f7f\u3048\u3070\u3001OpenAI\u306e\u5f93\u6765\u306e\u6587\u7ae0\u751f\u6210API\u3067\u306f\u3067\u304d\u306a\u304b\u3063\u305f\u6587\u8108\u306b\u5fdc\u3058\u305f\u5fdc\u7b54\u3092\u8fd4\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002 \u305d\u3053\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[1136,1152,14],"class_list":["post-7438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-gas","tag-chatgpt","tag-chatgpt-api","tag-gas"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7438"}],"version-history":[{"count":5,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7438\/revisions"}],"predecessor-version":[{"id":7455,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7438\/revisions\/7455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/7443"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}