作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
根据提示从 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 API至list 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/
我是一名优秀的程序员,十分优秀!