{"id":6873,"date":"2023-03-14T09:45:54","date_gmt":"2023-03-14T00:45:54","guid":{"rendered":"https:\/\/www.lancard.com\/blog\/?p=6873"},"modified":"2025-03-12T11:23:57","modified_gmt":"2025-03-12T02:23:57","slug":"chatgpt-api-alexa-skill","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2023\/03\/14\/chatgpt-api-alexa-skill\/","title":{"rendered":"Alexa\u3067ChatGPT"},"content":{"rendered":"<p>ChatGPT API\u3092\u4f7f\u3063\u305f\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092Alexa\u30b9\u30ad\u30eb\u3067\u4f5c\u30ea\u307e\u3057\u305f\u3002<\/p>\n<h5>Alexa\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u306e\u8868\u793a<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2023\/03\/alexa_simulator.png\" alt=\"\" width=\"421\" height=\"691\" class=\"aligncenter size-full wp-image-6880\" srcset=\"https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2023\/03\/alexa_simulator.png 421w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2023\/03\/alexa_simulator-244x400.png 244w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/p>\n<p><!--more--><\/p>\n<h2>\u6e96\u5099<\/h2>\n<p>Serverless Framework\u3092\u4f7f\u3044\u3001AWS Lambda\u3092\u4f5c\u6210\u30fb\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3059\u3002<br \/>\u4e8b\u524d\u306b\u4ee5\u4e0b\u306e\u6e96\u5099\u3092\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>OpenAI\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057API\u30ad\u30fc\u3092\u751f\u6210<\/li>\n<li>AWS CLI\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u3001AWS IAM\u30e6\u30fc\u30b6\u3092\u4f5c\u6210\u3057\u3066\u304a\u304f<\/li>\n<li>npm install -g serverless<\/code>\u3067Serverless Framework\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<\/ul>\n<h2>\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"bash\">sls create -t aws-alexa-typescript -p alexa_chatgpt\n<\/code><\/pre>\n<p>\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb<code>serverless.yml<\/code>\u3092\u898b\u308b\u3068\u3001Step 1\u301c8 \u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u57fa\u672c\u3001\u3053\u306e\u901a\u308a\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\u6700\u521d\u306b<code>npm install<\/code>\u3057\u307e\u3059\u3002<br \/><code>sls alexa auth<\/code>\u3067Amazon\u958b\u767a\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30ed\u30b0\u30a4\u30f3\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>serverless.yml\u3092\u66f4\u65b0<\/h2>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code class=\"bash\">service: alexa-chatgpt\n\n# app and org for use with dashboard.serverless.com\n#app: your-app-name\n#org: your-org-name\n\nframeworkVersion: '3'\n\nplugins:\n  - serverless-webpack\n  - serverless-alexa-skills\n\nprovider:\n  name: aws\n  runtime: nodejs18.x\n  region: ap-northeast-1\n  environment:\n    OPENAI_API_KEY: ${env:OPENAI_API_KEY}  \ncustom:\n  alexa:\n    # Step 1: Run `sls alexa auth` to authenticate\n    # Step 2: Run `sls alexa create --name \"Serverless Alexa Typescript\" --locale en-GB --type custom` to create a new skill\n    skills:\n      # Step 3: Paste the skill id returned by the create command here:\n      - id: amzn1.ask.skill.xxxx-xxxx-xxxx-xxxx-xxxx\n        manifest:\n          publishingInformation:\n            locales:\n              ja-JP:\n                name: \u4f1a\u8a71\u30dc\u30c3\u30c8\n          apis:\n            custom:\n              endpoint:\n                # Step 4: Do your first deploy of your Serverless stack\n                # Step 5: Paste the ARN of your lambda here:\n                uri: arn:aws:lambda:[region]:[account-id]:function:[function-name]\n                # Step 6: Run `sls alexa update` to deploy the skill manifest\n                # Step 7: Run `sls alexa build` to build the skill interaction model\n                # Step 8: Enable the skill in the Alexa app to start testing.\n          manifestVersion: '1.0'\n        models:\n          ja-JP:\n            interactionModel:\n              languageModel:\n                invocationName: \u4f1a\u8a71\u30dc\u30c3\u30c8\n                intents:              \n                  - name: PromptIntent\n                    slots:\n                    - name: Content\n                      type: AMAZON.City                \n                    samples:\n                      - '{Content}'\n                  - name: AMAZON.StopIntent\n                    samples:\n                      - '\u30b9\u30c8\u30c3\u30d7'                \n                      - '\u7d42\u4e86'                \n                      - '\u6b62\u3081\u3066'                \n                      - '\u7d42\u308f\u308a'                \n                      - '\u3055\u3088\u3046\u306a\u3089'                        \n                      - '\u3042\u308a\u304c\u3068\u3046'                        \nfunctions:\n  alexa:\n    handler: handler.alexa\n    events:\n      - alexaSkill: ${self:custom.alexa.skills.0.id}\n    timeout: 60  \n\n<\/code><\/pre>\n<p>\u4e3b\u306a\u5909\u66f4\u7b87\u6240\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n<ul>\n<li><code>runtime<\/code>\u3092nodejs18.*\u306b\u4fee\u6b63<\/li>\n<li><code>region\u3092ap-northeast-1<\/code>\u306b\u4fee\u6b63<\/li>\n<li>\u74b0\u5883\u5909\u6570<code>OPENAI_API_KEY<\/code>\u306e\u8a2d\u5b9a<\/li>\n<li>custom \u2192 alexa \u2192 skills \u2192 models \u3067intents\u53ca\u3073samples\u306e\u8a2d\u5b9a<\/li>\n<li>functions \u2192 alexa \u2192 timeout \u3067Lambda\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306e\u8a2d\u5b9a<\/li>\n<\/ul>\n<h2>\u30a2\u30ec\u30af\u30b5\u30b9\u30ad\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a2\u30ec\u30af\u30b5\u30b9\u30ad\u30eb\u306e\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"bash\">sls alexa create --name \"\u4f1a\u8a71\u30dc\u30c3\u30c8\" --locale ja-JP --type custom\n<\/code><\/pre>\n<p><a href=\"https:\/\/developer.amazon.com\/alexa\/console\/ask\">Alexa developer console<\/a>\u306b\u4f5c\u6210\u3057\u305f\u30b9\u30ad\u30eb\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u51fa\u529b\u3055\u308c\u305f\u30b9\u30ad\u30ebID\u3092serverless.yml\u306ecustom \u2192 alexa \u2192 skills \u2192 id\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h2>Lambda\u306e\u4f5c\u6210<\/h2>\n<p>handler.ts\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code class=\"bash\">import {\n  ErrorHandler,\n  HandlerInput,\n  RequestHandler,\n  SkillBuilders,\n} from 'ask-sdk-core';\nimport {\n  Response,\n} from 'ask-sdk-model';\nimport 'source-map-support\/register';\nimport chatgpt from '.\/chatgpt';\n\nconst ErrorHandler : ErrorHandler = {\n  canHandle(handlerInput : HandlerInput, error : Error ) : boolean {\n    return true;\n  },\n  handle(handlerInput : HandlerInput, error : Error) : Response {\n    console.error('error!!!');\n    console.error(error);\n\n    return handlerInput.responseBuilder\n      .speak('\u3059\u307f\u307e\u305b\u3093\u3002\u30b3\u30de\u30f3\u30c9\u3092\u7406\u89e3\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3082\u3046\u4e00\u5ea6\u8a00\u3063\u3066\u304f\u3060\u3055\u3044\u3002')\n      .reprompt('\u3059\u307f\u307e\u305b\u3093\u3002\u30b3\u30de\u30f3\u30c9\u3092\u7406\u89e3\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3082\u3046\u4e00\u5ea6\u8a00\u3063\u3066\u304f\u3060\u3055\u3044\u3002')\n      .getResponse();\n  }\n};\n\nconst LaunchRequestHandler : RequestHandler = {\n  canHandle(handlerInput : HandlerInput) : boolean {\n    const request = handlerInput.requestEnvelope.request;\n    return request.type === 'LaunchRequest';        \n  },\n  handle(handlerInput : HandlerInput) : Response {\n    const speechText = '\u4f1a\u8a71\u30dc\u30c3\u30c8\u3092\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002\u8cea\u554f\u3057\u3066\u304f\u3060\u3055\u3044\u3002';\n\n    return handlerInput.responseBuilder\n      .speak(speechText)\n      .reprompt(speechText)\n      .withSimpleCard(speechText, speechText)\n      .getResponse();\n  },\n};\n\nconst PromptIntentHandler : RequestHandler = {\n  canHandle(handlerInput : HandlerInput) : boolean {\n    const request = handlerInput.requestEnvelope.request;  \n    return request.type === 'IntentRequest'\n      &amp;&amp; request.intent.name === 'PromptIntent';\n  },\n  async handle(handlerInput : HandlerInput) : Promise&lt;Response&gt; {\n    const request = handlerInput.requestEnvelope.request;  \n    if (request.type !== 'IntentRequest') return;\n\n    try {\n      let sessionAttributes = handlerInput.attributesManager.getSessionAttributes();\n      if (!('messages' in sessionAttributes)) {\n        sessionAttributes.messages = [\n          {\"role\": \"system\", \"content\": \"\u3042\u306a\u305f\u306f\u30b9\u30de\u30fc\u30c8\u30b9\u30d4\u30fc\u30ab\u30fc\u3067\u3059\u3002150\u6587\u5b57\u4ee5\u5185\u3067\u56de\u7b54\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"},\n        ];\n      }\n      const question = request.intent.slots.Content.value;\n      sessionAttributes.messages.push(\n        {\"role\": \"user\", \"content\": question},\n      );      \n      const resonseContent = await chatgpt.createChat(sessionAttributes.messages);\n      sessionAttributes.messages.push(\n        {\"role\": \"assistant\", \"content\": resonseContent}\n      );\n      handlerInput.attributesManager.setSessionAttributes(sessionAttributes);        \n      return handlerInput.responseBuilder\n      .speak(resonseContent)\n      .reprompt('\u4f55\u304b\u554f\u3044\u304b\u3051\u3066\u307f\u3066\u304f\u3060\u3055\u3044')\n      .withSimpleCard('\u56de\u7b54', resonseContent)\n      .getResponse();   \n    } catch (e) {\n      console.error(e)\n    }           \n  },\n};\n\nconst CancelAndStopIntentHandler : RequestHandler = {\n  canHandle(handlerInput : HandlerInput) : boolean {\n    const request = handlerInput.requestEnvelope.request;\n    return request.type === 'IntentRequest'\n      &amp;&amp; (request.intent.name === 'AMAZON.CancelIntent'\n         || request.intent.name === 'AMAZON.StopIntent');\n  },\n  handle(handlerInput : HandlerInput) : Response {\n    const speechText = '\u3053\u308c\u3067\u4f1a\u8a71\u30dc\u30c3\u30c8\u3092\u7d42\u4e86\u3057\u307e\u3059';\n    console.log('bye!!')\n    return handlerInput.responseBuilder\n      .speak(speechText)\n      .withSimpleCard(speechText, speechText)\n      .withShouldEndSession(true)      \n      .getResponse();\n  },\n};\n\nexport const alexa = SkillBuilders.custom()\n  .addRequestHandlers(\n    LaunchRequestHandler,\n    PromptIntentHandler,\n    CancelAndStopIntentHandler,\n  )\n  .addErrorHandlers(ErrorHandler)\n  .lambda();\n<\/code><\/pre>\n<p>\u307e\u305f\u3001chatgpt.ts\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code class=\"bash\">const { Configuration, OpenAIApi } = require(\"openai\");\nconst configuration = new Configuration({\n  apiKey: process.env.OPENAI_API_KEY,\n});\nconst openai = new OpenAIApi(configuration);\n\n\nconst createChat = async (messages: any): Promise&lt;string&gt; =&gt; {\n    console.log('messages', messages);\n    const res = await openai.createChatCompletion({\n        model: \"gpt-3.5-turbo\",\n        messages,\n    });\n    const responseContent = res.data.choices[0].message.content;\n    console.log('\"' + responseContent + '\"');\n    return responseContent;\n}\n\nexport default {\n    createChat\n}\n<\/code><\/pre>\n<p>PromptIntent\u3067reprompt\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u30011\u56de\u306e\u4f1a\u8a71\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u305b\u305a\u3001\u9023\u7d9a\u3057\u3066\u4f1a\u8a71\u304c\u884c\u3048\u307e\u3059\u3002<br \/>\n\u4f1a\u8a71\u306e\u7d42\u4e86\u306f\u3001StopIntent\u3092\u547c\u3073\u307e\u3059\uff08\u4f8b\u300c\u3042\u308a\u304c\u3068\u3046\u300d\uff09\u3002<br \/>\n\u307e\u305f\u3001<a href=\"https:\/\/developer.amazon.com\/ja-JP\/docs\/alexa\/custom-skills\/manage-skill-session-and-session-attributes.html\">\u30b9\u30ad\u30eb\u30bb\u30c3\u30b7\u30e7\u30f3<\/a>\u306b\u4f1a\u8a71\u5c65\u6b74\u3092\u4fdd\u5b58\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u8cea\u554f\u3068\u4e00\u7dd2\u306b\u6295\u3052\u308b\u3053\u3068\u3067\u540c\u4e00\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u306f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304c\u7dad\u6301\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>AWS Lambda\u306e\u30c7\u30d7\u30ed\u30a4<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067AWS Lambda\u306e\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"bash\">sls deploy\n<\/code><\/pre>\n<p>\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u524d\u306b\u3001\u74b0\u5883\u5909\u6570OPENAI_API_KEY\u3092export\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"bash\">export OPENAI_API_KEY=********\n<\/code><\/pre>\n<p>\u307e\u305f\u3001\u79c1\u306e\u74b0\u5883\u3067\u306f<code>error:0308010C:digital envelope routines::unsupported<\/code>\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u5f8c\u306bsls deploy\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code class=\"bash\">export NODE_OPTIONS=--openssl-legacy-provider\n<\/code><\/pre>\n<p>\u30c7\u30d7\u30ed\u30a4\u5f8c\u3001Lambda\u95a2\u6570\u306eARN\u3092serverless.yml\u306ecustom \u2192 alexa \u2192 skills \u2192 id \u2192 apis \u2192 custom \u2192 endpoint \u2192 uri\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30ad\u30eb\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u304a\u3088\u3073\u30d3\u30eb\u30c9<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b9\u30ad\u30eb\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u304a\u3088\u3073\u30d3\u30eb\u30c9\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"bash\">sls alexa update\nsls alexa build\n<\/code><\/pre>\n<h2>\u30c6\u30b9\u30c8<\/h2>\n<p><a href=\"https:\/\/developer.amazon.com\/alexa\/console\/ask\">Alexa developer console<\/a>\u306e\u30c6\u30b9\u30c8\u30bf\u30d6\u3067\u72b6\u614b\u3092\u300c\u958b\u767a\u4e2d\u300d\u306b\u3059\u308b\u3068\u3001Alexa\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u304a\u3088\u3073\u5b9f\u6a5f\u3067\u30c6\u30b9\u30c8\u3092\u884c\u3048\u307e\u3059\u3002<\/p>\n<h2>\u8ab2\u984c<\/h2>\n<p>OpenAI\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u9045\u3044\u305f\u3081\u3001Alexa\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002Alexa\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306f8\u79d2\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u5bfe\u5fdc\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u306a\u3044\u3088\u3046\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p><code>createChatCompletion<\/code>\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e<code>steram<\/code>\u3092<code>true<\/code>\u306b\u3057\u307e\u3059\u3002\u305d\u3046\u3059\u308b\u3068WEB\u7248ChatGPT\u306e\u3088\u3046\u306b\uff11\u6587\u5b57\u6bce\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u9001\u3089\u308c\u3066\u304d\u307e\u3059\u3002\u6539\u884c\u30b3\u30fc\u30c9\u304c\u9001\u3089\u308c\u3066\u304d\u305f\u3089\u3001\u305d\u306e\u5730\u70b9\u307e\u3067\u306b\u9001\u3089\u308c\u305f\u6587\u5b57\u5217\u3092<code>responseBuilder<\/code>\u306e<code>speak<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873&amp;t=Alexa%E3%81%A7ChatGPT&amp;s=100&amp;p[url]=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873&amp;p[images][0]=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-content%2Fuploads%2F2023%2F03%2Falexa_simulator.png&amp;p[title]=Alexa%E3%81%A7ChatGPT\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873&amp;text=Alexa%E3%81%A7ChatGPT\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873&amp;title=Alexa%E3%81%A7ChatGPT\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&amp;v=3&amp;t=Alexa%E3%81%A7ChatGPT&amp;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Alexa%E3%81%A7ChatGPT&amp;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F6873\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>ChatGPT API\u3092\u4f7f\u3063\u305f\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092Alexa\u30b9\u30ad\u30eb\u3067\u4f5c\u30ea\u307e\u3057\u305f\u3002 Alexa\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u306e\u8868\u793a<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,216],"class_list":["post-6873","post","type-post","status-publish","format-standard","hentry","category-1","tag-alexa","tag-chatgpt"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/6873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=6873"}],"version-history":[{"count":39,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/6873\/revisions"}],"predecessor-version":[{"id":6913,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/6873\/revisions\/6913"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=6873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=6873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=6873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}