chatgpt Python 库 chatgpt api中文文档,chatgpt怎么下载,chatgpt官网,chatgpt国内能用吗
PHP
0
图书馆
蟒蛇库
$ pip install openai
1
2
3
4
5
6
7
import os import openai # Load your API key from an environment variable or secret management service openai.api_key = os.getenv("OPENAI_API_KEY") response = openai.Completion.create(model="text-davinci-003", prompt="Say this is a test", temperature=0, max_tokens=7)
$ openai api completions.create -m text-davinci-003 -p "Say this is a test" -t 0 -M 7 --stream
节点.js库
$ npm install openai
1
2
3
4
5
6
7
8
9
10
11
const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); const openai = new OpenAIApi(configuration); const response = await openai.createCompletion({ model: "text-davinci-003", prompt: "Say this is a test", temperature: 0, max_tokens: 7, });
社区图书馆
C# / .NET
晶体
去
爪哇岛
科特林
节点.js
- openai-api by Njerschow
- OpenAI-API-Node by Erlapso
- GPT-X 来自 CEIFA
- GPT3 来自 Poteat
- GPTS by thencc
- @dalenguyen/OpenAI by Dalenguyen
- Tectalic/OpenAI by tectalic
.PHP
蟒
R
红宝石
斯卡拉
迅速
统一
虚幻引擎
版权声明:除非特别标注原创,其它均来自互联网,转载时请以链接形式注明文章出处。