{"id":13271,"date":"2023-07-27T10:00:00","date_gmt":"2023-07-27T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=13271"},"modified":"2023-07-26T22:30:39","modified_gmt":"2023-07-26T13:30:39","slug":"openai-gpt-api10-webapp%e3%81%a7%e3%81%ae%e6%b4%bb%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/13271","title":{"rendered":"OpenAI GPT API(10) WebApp\u3067\u306e\u6d3b\u7528"},"content":{"rendered":"\n<p>\u4eca\u56de\u306fOpenAI API\u3092Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7d44\u307f\u8fbc\u3093\u3067\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<br>Python\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3044\u3048\u3070Django\u304c\u6709\u540d\u3067\u3059\u304c\u3001<br>\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u7528\u9014\u306a\u306e\u3067\u3001\u8efd\u91cf\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b<br>Flask\u3092\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h4>Flask\u306e\u958b\u767a\u74b0\u5883\u69cb\u7bc9\u65b9\u6cd5<\/h4>\n\n\n\n<p>Flask\u306egithub\u30ea\u30dd\u30b8\u30c8\u30ea<br><a href=\"https:\/\/github.com\/pallets\/flask\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/pallets\/flask<\/a><\/p>\n\n\n\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30c6\u30b9\u30c8\u7528\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u4eca\u56de\u306f\u4eee\u60f3\u74b0\u5883\u306e\u540d\u79f0\u3092\u300cenv\u300d\u3068\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>python -m venv env<\/p>\n\n\n\n<p>\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u305d\u306e\u74b0\u5883\u5185\u306e\u307f\u6709\u52b9\u306a<br>pip install\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001<br>\u3044\u308d\u3044\u308d\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u306a\u3069\u306e<br>\u4e0d\u5177\u5408\u304c\u8d77\u3053\u308b\u53ef\u80fd\u6027\u3092\u56de\u907f\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>source env\/Scripts\/activate<\/p>\n\n\n\n<p>\u4eee\u60f3\u74b0\u5883\u306b\u306f\u3044\u308b\u306b\u306f\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067<br>\u4eee\u60f3\u74b0\u5883\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u4f5c\u6210\u3055\u308c\u305fenv\/Scripts\/activate\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eee\u60f3\u74b0\u5883\u306b\u306f\u3044\u308b\u3053\u3068\u306b\u6210\u529f\u3059\u308b\u3068\u3001<br>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u306e()\u5185\u306b\u4eee\u60f3\u74b0\u5883\u540d(\u4eca\u56de\u306fenv)\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"357\" height=\"86\" src=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2023\/07\/1-2.png\" alt=\"\" class=\"wp-image-13276\" \/><\/figure>\n\n\n\n<p><br>\u3053\u308c\u3067\u4eee\u60f3\u74b0\u5883\u306b\u306f\u3044\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u306e\u3067\u3001<br>pip\u3067\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Flask\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>pip install Flask<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308cFlask\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6b63\u5e38\u306b\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"750\" height=\"418\" src=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2023\/07\/2-2.png\" alt=\"\" class=\"wp-image-13277\" \/><\/figure>\n\n\n\n<p><br>\u6b21\u56de\u306fFlask\u306e\u7c21\u5358\u306a\u4f7f\u7528\u65b9\u6cd5\u3001OpenAI API\u306e\u5c0e\u5165\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068OpenAI API\u3092\u9023\u643a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6728\u66dc\u65e5\u62c5\u5f53\uff1anishida<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/13271\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/13271\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"OpenAI GPT API(10) WebApp\u3067\u306e\u6d3b\u7528\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/13271\" data-text=\"OpenAI GPT API(10) WebApp\u3067\u306e\u6d3b\u7528\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/13271\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/13271\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fOpenAI API\u3092Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7d44\u307f\u8fbc\u3093\u3067\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002Python\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3044\u3048\u3070Django\u304c\u6709\u540d\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u7528\u9014\u306a\u306e\u3067\u3001\u8efd\u91cf\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u30d5\u30ec\u30fc\u30e0 [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[96],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/13271"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=13271"}],"version-history":[{"count":7,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/13271\/revisions"}],"predecessor-version":[{"id":13282,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/13271\/revisions\/13282"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=13271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=13271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=13271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}