åŒèš#
OpenAI ã€ã³ã¿ãŒãã§ãŒã¹è»¢éã¹ããŒã·ã§ã³ã¯ãæ£èŠã®ãã£ãã«ãæäŸããOpenAI ã®ããŸããŸãªã¢ãã«ãå®å®ããŠäœ¿çšããããšãã§ããŸããåé¡ãçºçããå Žåã¯ãGitHubã§åé¡ãå ±åããããšãã§ããŸãã
䜿çšã¬ã€ã#
ãŠã§ããµã€ãã«ã¢ã¯ã»ã¹#
OpenAI ã€ã³ã¿ãŒãã§ãŒã¹è»¢éã¹ããŒã·ã§ã³ã®å
¬åŒãŠã§ããµã€ãã«ã¢ã¯ã»ã¹ãã以äžã®ãªã³ã¯ããçŽæ¥ç»é²ããŠãµãŒãã¹ãå©çšã§ããŸãïŒ
ãããã¯ãªãã¯ããŠç»é²
GitHub ãã°ã€ã³ãšããŒã¯ã³ã®äœæ#
ãŸããã¢ã¯ã»ã¹ããŒã¯ã³ãäœæããããã«ãGitHub ã¢ã«ãŠã³ããå¿ èŠã§ãïŒ
- GitHub ãã°ã€ã³ïŒ GitHub ã¢ã«ãŠã³ãã«ãã°ã€ã³ããŠãã ãããã¢ã«ãŠã³ãããæã¡ã§ãªãå Žåã¯ãGitHub å ¬åŒãŠã§ããµã€ãã§ç¡æã§ç»é²ã§ããŸãã
- ããŒã¯ã³ã®äœæïŒ GitHub ã®èšå®ã§ããAPI Tokensããšããã»ã¯ã·ã§ã³ãèŠã€ããŠããæ°ããããŒã¯ã³ãçæããã¯ãªãã¯ããŸãã
- ããŒã¯ã³ã®ã³ããŒïŒ ããŒã¯ã³ãçæãããããã³ããŒããŠä¿åããAPI åŒã³åºãã®èªèšŒã«äœ¿çšããŸãã
API åŒã³åºãã®äŸ#
API ãåŒã³åºãåã«ãæ£ãããªã¯ãšã¹ãããããŒãšããã£ãèšå®ããŠãã ããïŒ
- ãªã¯ãšã¹ãããããŒïŒ
Authorization: Bearer <ããŒã¯ã³>
ãå«ãããªã¯ãšã¹ããæ£ããèªèšŒãããããã«ããŠãã ããã - ãªã¯ãšã¹ãããã£ã®äŸïŒ 以äžã®åœ¢åŒã§ãªã¯ãšã¹ããéä¿¡ããŠãã ããïŒ
{
"model": "gpt-3.5-turbo",
"messages": [
{"role": "user", "content": "éå€æ诎çè¯ïŒææ¯æïŒäœ æ¯äœ ã"}
],
"temperature": 0.7
}
Claude ã¢ãã«ã®ãµããŒã#
ãã®ãµãŒãã¹ã§ã¯ãClaude ã¢ãã«ã®äœ¿çšããµããŒããããŠããŸãã以äžã¯äŸã§ãïŒ
{
"model": "claude-3-opus-20240229",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, world"}
]
}
ãã°ã€ã³ãšãã£ãŒãž#
ãŠãŒã¶ãŒã¯ãã°ã€ã³ãšãã£ãŒãžãéããŠãããªããµãŒãã¹ãå©çšã§ããŸãïŒ
- ãã°ã€ã³ïŒ æ¯æ¥ãã°ã€ã³ãããšå ±é ¬ãåãåãããšãã§ããŸãã
- ãã£ãŒãžïŒ ãã£ãŒãžããŒãžã§è³Œå ¥ã³ãŒããè³Œå ¥ããã¢ã¯ãã£ããŒãããããšãã§ããŸãã
åèãªã³ã¯#
OpenAI ã€ã³ã¿ãŒãã§ãŒã¹è»¢éã¹ããŒã·ã§ã³ã
ãã®èšäºã¯ Mix Space ããã®åææŽæ°ã§ãxLog ã«ãæ²èŒãããŠããŸãã
å
ã®ãªã³ã¯ã¯ https://www.laogou666.com/posts/AGI/Freegpt4 ã§ãã