Issue with OpenAI API key while using it in Windows

题意:“在 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]"

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

营赢盈英

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值