题意:检查微调后的OpenAI模型是否已成功删除
问题背景:
I am doing some work with the OpenAI API with Python. I'm working with fine-tuning and I am working on deleting an existing model and starting over again. I want to be able to check if the deletion actually succeeded or failed.
我正在使用Python与OpenAI API进行一些工作。我涉及到了微调操作,并且我正在尝试删除一个已存在的模型并重新开始。我希望能够检查删除操作是否确实成功或失败了。
The OpenAI.models.delete()
function returns a ModelDeleted
object. What should I do with it?
OpenAI.models.delete()
函数返回一个 ModelDeleted
对象,我应该怎样处理它?
问题解决:
A ModelDeleted
object has a boolean deleted
attribute which tells you whether the model was deleted.
ModelDeleted
对象具有一个布尔类型的 deleted
属性,它告诉你模型是否已被删除。
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.from .._models import BaseModel__all__ = ["ModelDeleted"]class ModelDeleted(BaseModel):id: strdeleted: boolobject: str