题意:“在 Windows 上使用 OpenAI API 密钥时遇到的问题”
问题背景:
I have to fine-tune the OpenAI model on my custom dataset. I have created the dataset in jsonl format. I use the following commands on windows command line:
“我需要在我的自定义数据集上微调 OpenAI 模型。我已经以 jsonl 格式创建了数据集。我在 Windows 命令行中使用以下命令:”
set OPENAI_API_KEY=<API key>
openai tools fine_tunes.prepare_data -f "train_data.jsonl"
The above commands run successfully and give me some suggestions for updating jsonl file. After this, I run the following command to fine-tune the 'curie' model.
“上述命令成功运行,并给出了更新 jsonl 文件的一些建议。在此之后,我运行以下命令以微调 'curie' 模型。”
openai api fine_tunes.create 'openai.api_key = <API key>' -t "train_data.jsonl" -m "curie"
But I am getting following issue:
“但我遇到了以下问题:”
←[91mError:←[0m Incorrect API key provided: "sk-iQJX*****************************************mux". You can find your API key at https://beta.openai.com. (HTTP status code: 401)
Can anybody help me out with this issue.
“有人能帮我解决这个问题吗?”
问题解决:
Use the following in the windows command prompt
“在 Windows 命令提示符中使用以下内容”
openai --api-key <OPENAI_API_KEY> api fine_tunes.create -t "[yourfilelocationhere]" -m [modelhere] --suffix "[optional]"