ããã¯è¦å´ãã¾ããã
Gemini
Textwellã«ã¯ChatGPTã¢ã¯ã·ã§ã³ãããã®ã§ããããGeminiã«æ¸ãæãã¦ã¿ã¾ããã ãã¡ããå½¢å¼ãããããã¨ç°ãªãã¾ãã ãã£ã±ã試è¡é¯èª¤ããã
ã¨ããããèµ°ãã¨ããã¾ã§æ¥ãã®ã§ä»äºç´ãã¨ãã¾ãã
使ãæ¹
APIãã¼ãåå¾ãã¦ã½ã¼ã¹ã®åãã«æ¸ãå ãã¦ãã ããã ç¡æã§OKã§ãã
ã«ã¼ã½ã«è¡ã質åã¨åãåãããã®åçãæ¬æã«è¿½è¨ãã¾ãã ã«ã¼ã½ã«è¡ã空è¡ã®ã¨ãã¯å ¨æãããã³ããã¨è¦ãªãã¾ãã ããã§ããã£ãã¼ããã«ã対å¿ã§ããã
ãã¨ãã°ãå¯å£«å±±ã®é«ãã¯ï¼ãã¨æ¸ãã¦Geminiã¢ã¯ã·ã§ã³ãå®è¡ããã¨ï¼
ãããªãµãã«è¿äºãè¿ã£ã¦ãã¾ãã ããããããã
詳ãã説æ
Geminiã«POSTå½¢å¼ã§ãªã¯ã¨ã¹ããéãã¾ãã
https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={API_key}
ãã®ã¨ãã®JSONã¯ä¸è¨ã®ããã«ãªãã¾ãã
headerData: { 'Content-Type': 'application/json' }, data: { 'contents': {'parts': { 'text': 質åã®å 容 } } }
è¿ã£ã¦ããresponseTextãJSONå½¢å¼ã§ãã
{ "candidates": [ { "content": { "parts": [ { "text": åçã®å 容 } ], "role": "model" }, "finishReason": "STOP", "avgLogprobs": -0.100973621010780xx } ], "usageMetadata": { "promptTokenCount": 5, "candidatesTokenCount": 32, "totalTokenCount": 37 }, "modelVersion": "gemini-1.5-flash-002" }
å ·ä½ä¾ãæ¸ãã¦ãããµã¤ãããªãã£ãã®ã§è¦å´ãã¾ããã ã©ããå¿ é ã§ãã©ãããªãã·ã§ã³ãªãã ãã
ããããããåéãã§éè¦ãªæ å ±ãéã£ã¦ãªãå¯è½æ§ãããã ã¡ãã£ã¨ããããã§ãã
ã¾ã¨ã
gemini-2.0-flash-exp
ã¨ããã¢ãã«ãè¦ããããã©ããããæå¹ï¼