gpt4 book ai didi

python - OpenAI API错误: "The model ' curie:ft-personal-2023-09-15-06-05-0 1' does not exist" when trying to delete a fine-tuned model

转载 作者:行者123 更新时间:2023-12-02 05:48:39 27 4
gpt4 key购买 nike

根据提示从 jsonl 文件创建模型。我输入命令:

openai -k sk-blablablablablabla api fine_tunes.list

它显示有关此模型的信息:

{
"object": "list",
"data": [
{
"object": "fine-tune",
"id": "ft-yrlmcjagdwijfrnvkldsn",
"hyperparams": {
"n_epochs": 4,
"batch_size": 1,
"prompt_loss_weight": 0.01,
"learning_rate_multiplier": 0.1
},
"organization_id": "org-kouf8eihlsamclsl",
"model": "curie",
"training_files": [
{
"object": "file",
"id": "file-IyrkYUiefjwkq",
"purpose": "fine-tune",
"filename": "data_prepared.jsonl",
"bytes": 417,
"created_at": 1694757803,
"status": "processed",
"status_details": null
}
],
"validation_files": [],
"result_files": [
{
"object": "file",
"id": "file-jofepw8489hfidkdwfiw",
"purpose": "fine-tune-results",
"filename": "compiled_results.csv",
"bytes": 742,
"created_at": 1694757902,
"status": "processed",
"status_details": null
}
],
"created_at": 1694757804,
"updated_at": 1694757903,
"status": "succeeded",
"fine_tuned_model": "curie:ft-personal-2023-09-15-06-05-01"
}
],
"next_starting_after": null
}

但我无法删除它。我正在尝试不同的事情:

openai -k sk-blablablablablabla api models.delete -i <FINE_TUNED_MODEL>
openai -k sk-blablablablablabla api models.delete -i curie:ft-personal-2023-09-15-06-05-01
openai -k sk-blablablablablabla api models.delete -i ft-wyysqbYRFKo2p0ezNXa6F5sc

也通过Python代码尝试过:

import os
import openai
from dotenv import load_dotenv, find_dotenv

load_dotenv(find_dotenv())

def init_api():
openai.api_key = os.getenv("AI_API_KEY")

init_api()

openai.Model.delete("curie:ft-personal-2023-09-15-06-05-01")

我收到以下错误:

The model 'curie:ft-personal-2023-09-15-06-05-01' does not exist (HTTP status code: 404)

最佳答案

您说您收到以下错误:模型“curie:ft-personal-2023-09-15-06-05-01”不存在

这意味着您可能已经成功删除了微调后的模型。因此,当您第二次、第三次、第四次等尝试删除它时,它就不再存在。

使用Models APIlist all models 。您不应看到 curie:ft-personal-2023-09-15-06-05-01

Python:

import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")

openai.Model.list()

NodeJS:

import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
const list = await openai.models.list();

for await (const model of list) {
console.log(model);
}
}
main();

关于python - OpenAI API错误: "The model ' curie:ft-personal-2023-09-15-06-05-0 1' does not exist" when trying to delete a fine-tuned model,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77111087/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com