在 Windows 中使用 OpenAI API 密钥时出现问题

Rup*_*ude 6 windows command-line openai-api

我必须在自定义数据集上微调 OpenAI 模型。我已经创建了 jsonl 格式的数据集。我在 Windows 命令行上使用以下命令:

\n

set OPENAI_API_KEY=<API key>

\n

openai tools fine_tunes.prepare_data -f "train_data.jsonl"

\n

上面的命令成功运行并给了我一些更新 jsonl 文件的建议。之后,我运行以下命令来微调“curie”模型。

\n

openai api fine_tunes.create 'openai.api_key = <API key>' -t "train_data.jsonl" -m "curie"

\n

但我遇到以下问题:

\n

\xe2\x86\x90[91mError:\xe2\x86\x90[0m Incorrect API key provided: "sk-iQJX*****************************************mux". You can find your API key at https://beta.openai.com. (HTTP status code: 401)

\n

谁能帮我解决这个问题。

\n

小智 3

在 Windows 命令提示符下使用以下命令

openai --api-key <OPENAI_API_KEY> api fine_tunes.create -t "[yourfilelocationhere]" -m [modelhere] --suffix "[optional]"
Run Code Online (Sandbox Code Playgroud)