{"id":19,"date":"2024-01-30T17:59:25","date_gmt":"2024-01-30T08:59:25","guid":{"rendered":"https:\/\/p4p.co.jp\/geminizer\/?p=19"},"modified":"2024-01-30T20:47:40","modified_gmt":"2024-01-30T11:47:40","slug":"how_to_run_gemini_in_your_computer","status":"publish","type":"post","link":"https:\/\/p4p.co.jp\/geminizer\/how_to_run_gemini_in_your_computer\/","title":{"rendered":"Gemini Pro API \u3092 Python \u3067\u30ed\u30fc\u30ab\u30eb\u306b\u4f7f\u3063\u3066\u7206\u901f\u3092\u5b9f\u611f\u3059\u308b"},"content":{"rendered":"\n<p>\u30d1\u30a4\u30bd\u30f3\u521d\u5fc3\u8005\u306e\u79c1\u304cgemini\u3092\u52d5\u304b\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u6d77\u5916\u306eyoutube\u3092\u898b\u306a\u304c\u3089\u5b9f\u88c5\u3057\u305f\u8a71\u3092\u30b7\u30a7\u30a2\u3057\u307e\u3059\u3002\u4ed6\u306e\u30b5\u30a4\u30c8\u3067\u306f\u3001\u305f\u3060\u5b9f\u9a13\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u3082\u306e\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u6e96\u5099\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u3001\u5165\u529b\u30c7\u30fc\u30bf\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u305f\u3089\u67d4\u8edf\u306b\u3069\u3093\u306a\u51e6\u7406\u3082\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u57fa\u672c\u306epython\u30d5\u30a1\u30a4\u30eb\u3092\u63d0\u4f9b\u3057\u3066\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092chatgpt\u3084gemini\u3067\u8aad\u307f\u8fbc\u307e\u305b\u3066\u3001\u4f5c\u308a\u305f\u3044python\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u7531\u306b\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gemini Pro API \u3068\u306f<\/h2>\n\n\n\n<p>Gemini Pro API \u306f\u3001Google AI \u304c\u63d0\u4f9b\u3059\u308b\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb (LLM) \u306e API \u3067\u3059\u3002\u30c6\u30ad\u30b9\u30c8\u306e\u751f\u6210\u3001\u7ffb\u8a33\u3001\u8981\u7d04\u3001\u8cea\u554f\u3078\u306e\u56de\u7b54\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u30bf\u30b9\u30af\u306b\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u30b8\u30a7\u30df\u30cb(\u6b27\u7c73\u4eba\u306f\u30b8\u30a7\u30df\u30ca\u30a4\u3063\u3066\u8a00\u3046\u3051\u3069w)\u306b\u7d5e\u3063\u3066\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GeminiProAPI\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3059\u30e1\u30ea\u30c3\u30c8<\/h2>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3059\u30e1\u30ea\u30c3\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API \u306e\u5fdc\u7b54\u6642\u9593\u304c\u77ed\u3044<\/li>\n\n\n\n<li>\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3068\u304d\u306e\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3084\u3059\u3044<\/li>\n\n\n\n<li>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u5236\u7d04\u3092\u53d7\u3051\u306a\u3044<\/li>\n\n\n\n<li>\u91cd\u3044\u52d5\u753b\u3084\u30d5\u30a1\u30a4\u30eb\u3092\u524d\u51e6\u7406\u3057\u3066\u304b\u3089gemini\u3092\u4f7f\u3046\u3068\u304d\u306b\u308f\u3056\u308f\u3056\u91cd\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u306a\u3044\u3067\u3082\u3044\u3044<\/li>\n\n\n\n<li>\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">GeminiProAPI\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3059\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3059\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">api\u306e\u53d6\u5f97\u3068\u4e8b\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6e96\u5099\u3059\u308b<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30d1\u30a4\u30bd\u30f3\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b<\/strong>\u3000<\/li>\n\n\n\n<li><strong>API \u30ad\u30fc\u3092\u4f5c\u6210\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/strong><\/li>\n\n\n\n<li><strong>Python \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u300cgoogle-generativeai\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Python \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u7ba1\u7406\u30c4\u30fc\u30eb pip \u3092\u4f7f\u7528\u3057\u3066\u3001google-generativeai\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u30d1\u30a4\u30bd\u30f3\u306e\u52d5\u304b\u3057\u65b9\u304c\u6016\u3044\u3001\u3068\u304b\u30d1\u30a4\u30bd\u30f3\u3063\u3066\u30a2\u30ca\u30b3\u30f3\u30c0\u3068\u304b\u306e\u3078\u3073\u3067\u3057\u3087\uff1f\u3068\u8a00\u3046\u4eba\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u898b\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u3058\u7c21\u5358\u3067\u3059\u3002\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u3092mac\u3084windows\u306b\u5165\u3063\u3066\u308b\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u30a2\u30d7\u30ea\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5b9f\u884c\u3059\u308b\u3068gemini\u304c\u4f7f\u3048\u308b\u74b0\u5883\u304c\u6574\u5099\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip install google-generativeai<\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>\u3082\u3057Python\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304c\u3001pip\u304c\u306a\u3044\u5834\u5408(\u30b3\u30de\u30f3\u30c9 \u30ce\u30c3\u30c8\u3000\u30d5\u30a1\u30a6\u30f3\u30c9\u3063\u3066\u51fa\u305f\u3088\u3063\u3066\u4eba\u306f)\u3001\u5148\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u4f7f\u3063\u3066pip\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u9806\u756a\u306b\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ol>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>curl https:\/\/bootstrap.pypa.io\/get-pip.py -o get-pip.py<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code> sudo python3 get-pip.py<\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li><strong>Python \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u524d\u306e\u30c7\u30fc\u30bf\u3092\u6e96\u5099\u3002<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u51e6\u7406.txt\u306e\u4e2d\u8eab\u306e\u6587\u7ae0\u3084\u30c7\u30fc\u30bf\u304b\u3089\u3001\u30d7\u30ed\u30f3\u30d7\u30c8.txt\u306e\u4e2d\u306e\u51e6\u7406\u3092\u3055\u305b\u308b\u3088\u3046\u306a\u4ed5\u7d44\u307f\u306e\u30d1\u30a4\u30bd\u30f3\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002\u5b9f\u884c\u3057\u305f\u3044\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u306e\u5199\u771f\u306e\u3088\u3046\u306b\u7528\u610f\u3057\u3066\u3001\u4e00\u3064\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u5199\u771f\u3068\u540c\u3058\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3057\u306a\u3044\u3068\u52d5\u304d\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306f\u306a\u3093\u3067\u3082\u3044\u3044\u3067\u3059\u3002\u4eca\u56de\u306f\u30d5\u30eb\u30fc\u30c4\u306e\u30ea\u30b9\u30c8\u3092\u6e21\u3057\u3066\u30ec\u30a2\u306a\u30d5\u30eb\u30fc\u30c4\u306f\u4f55\u304b\u3092\u7279\u5b9a\u3055\u305b\u307e\u3059\u3002\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"831\" src=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.33.41-1024x831.jpg\" alt=\"\" class=\"wp-image-21\" srcset=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.33.41-1024x831.jpg 1024w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.33.41-300x243.jpg 300w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.33.41-768x623.jpg 768w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.33.41.jpg 1284w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><br>\u3067\u304d\u305f\u4e8c\u3064\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u3064\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u307e\u3057\u305f\u3002\u305d\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u4e2d\u306b\u5165\u308c\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-18.05.12-1024x547.jpg\" alt=\"\" class=\"wp-image-26\" srcset=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-18.05.12-1024x547.jpg 1024w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-18.05.12-300x160.jpg 300w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-18.05.12-768x410.jpg 768w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-18.05.12.jpg 1480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Python\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b<\/strong><\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001Windows\u306a\u3089\u30e1\u30e2\u5e33\u3084mac\u306a\u3089textedit.app\u3067\u8cbc\u308a\u4ed8\u3051\u3066\u3001geminipro.py\u3068\u3044\u3046\u540d\u524d\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u540d\u524d\u304cpy\u3067\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001.txt\u3067\u4fdd\u5b58\u3057\u3066\u304b\u3089\u3001\u540d\u524d\u3092\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u3092\u5b9f\u969b\u306eAPIkey\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<p>Python<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>import os\nimport google.generativeai as genai  \n\n# Google Generative AI\u306e\u8a2d\u5b9a\ndef configure_genai():\n    try:\n        # \u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3055\u308c\u305fAPI\u30ad\u30fc\n        api_key = &#39;AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#39;\n        genai.configure(api_key=api_key)\n    except Exception as e:\n        print(f&#39;Error in configuring Generative AI: {e}&#39;)\n\n# Prompt\u5185\u5bb9\u306e\u8aad\u307f\u8fbc\u307f\ndef read_prompt():\n    try:\n        with open(&#39;prompt.txt&#39;, &#39;r&#39;) as file:\n            return file.read()\n    except Exception as e:\n        print(f&#39;Error in reading prompt file: {e}&#39;)\n        return None\n\n# Gemini Pro\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u751f\u6210\ndef generate_content(prompt, text_content):\n    try:\n        combined_prompt = f&quot;{prompt}\\n\u51e6\u7406\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\\n{text_content}&quot;\n        model_gemini_pro = genai.GenerativeModel(&#39;gemini-pro&#39;)\n        response = model_gemini_pro.generate_content(\n            combined_prompt,\n            generation_config=genai.types.GenerationConfig()\n        )\n        return response.text\n    except Exception as e:\n        print(f&#39;Error in generating content: {e}&#39;)\n        return None\n\n# \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u51e6\u7406\ndef process_text_file():\n    configure_genai()\n    prompt = read_prompt()\n\n    if prompt:\n        text_file = &#39;\u672a\u51e6\u7406.txt&#39;\n        try:\n            with open(text_file, &#39;r&#39;, encoding=&#39;utf-8&#39;) as file:\n                text_content = file.read()\n        except UnicodeDecodeError:\n            try:\n                with open(text_file, &#39;r&#39;, encoding=&#39;latin1&#39;) as file:\n                    text_content = file.read()\n            except Exception as e:\n                print(f&#39;Error reading file {text_file}: {e}&#39;)\n                return\n        except Exception as e:\n            print(f&#39;Error processing file {text_file}: {e}&#39;)\n            return\n\n        generated_content = generate_content(prompt, text_content)\n        if generated_content:\n            output_file_path = &#39;\u5b8c\u6210.txt&#39;\n            with open(output_file_path, &#39;w&#39;, encoding=&#39;utf-8&#39;) as output_file:\n                output_file.write(generated_content)\n            print(f&#39;Generated content written to {output_file_path}&#39;)\n\nif __name__ == &#39;__main__&#39;:\n    process_text_file()\n<\/code><\/pre><\/div>\n\n\n\n\n\n\n\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>google-generativeai\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>API \u30ad\u30fc\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>client \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30c6\u30ad\u30b9\u30c8\u306e\u751f\u6210\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u751f\u6210\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u884c\u7d50\u679c<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306bPython \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u304d\u306b\u3001\u4f5c\u3063\u305fgeminipro.py\u304c\u5b58\u5728\u3059\u308b\u30ea\u30f3\u30af\u5148\u3092\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u30d5\u30a1\u30a4\u30eb\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u9078\u629e\u3057\u3066\u304b\u3089\u3001Windows\u306a\u3089\uff3bAlt\uff3d\uff0b\uff3bD\uff3d\u30ad\u30fcmac\u306a\u3089\u3001\u2325option+\u2318command+C\u3000\u3067\u53d6\u5f97\u3057\u305f\u30ea\u30f3\u30af\u3092\u4ee5\u4e0b\u306e\u3001\/Users\/\u30e6\u30fc\u30b6\u30fc\u540d\/Desktop\/gemini\/geminipro.py \u3067\u7f6e\u304d\u63db\u3048\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python3 \/Users\/\u30e6\u30fc\u30b6\u30fc\u540d\/Desktop\/gemini\/geminipro.py <\/code><\/pre><\/div>\n\n\n\n<p>\u305d\u3046\u3059\u308b\u3068\u5b8c\u6210.txt\u3068\u3044\u3046\u540d\u524d\u3067\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"851\" height=\"1024\" src=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08-851x1024.jpg\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08-851x1024.jpg 851w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08-249x300.jpg 249w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08-768x924.jpg 768w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08-1277x1536.jpg 1277w, https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-01-30-17.41.08.jpg 1310w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>Gemini Pro API \u3092 Python \u3067\u30ed\u30fc\u30ab\u30eb\u306b\u52d5\u304b\u3059\u3053\u3068\u3067\u3001API \u306e\u5fdc\u7b54\u6642\u9593\u304c\u77ed\u304f\u306a\u308a\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u5236\u7d04\u3092\u53d7\u3051\u306a\u304f\u306a\u308a\u3001\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Python \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3001\u3059\u3050\u306b Gemini Pro API \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305c\u3072\u3001\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d1\u30a4\u30bd\u30f3\u521d\u5fc3\u8005\u306e\u79c1\u304cgemini\u3092\u52d5\u304b\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u6d77\u5916\u306eyoutube\u3092\u898b\u306a\u304c\u3089\u5b9f\u88c5\u3057\u305f\u8a71\u3092\u30b7\u30a7\u30a2\u3057\u307e\u3059\u3002\u4ed6\u306e\u30b5\u30a4\u30c8\u3067\u306f\u3001\u305f\u3060\u5b9f\u9a13\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u3082\u306e\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u6e96\u5099\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[4],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/p4p.co.jp\/geminizer\/wp-content\/uploads\/2024\/01\/Geminizer.png","_links":{"self":[{"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":18,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/posts\/19\/revisions\/55"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/media\/14"}],"wp:attachment":[{"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p4p.co.jp\/geminizer\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}