TsgcHTTP_API_OpenAI › Methods › DeleteAssistant
Permanently deletes an Assistant by its identifier
function DeleteAssistant(const aAssistantId: string) : TsgcOpenAIClass_Response_Delete_Status;
| Name | Type | Description |
|---|---|---|
aAssistantId | const string | The identifier of the Assistant to delete. |
Deletion confirmation exposing the object id and a boolean Deleted flag (TsgcOpenAIClass_Response_Delete_Status)
Calls DELETE /v1/assistants/{assistant_id} to permanently remove the Assistant. Existing Threads and Runs that referenced the Assistant are not deleted, but you can no longer create new Runs against the deleted id. The response confirms whether the deletion succeeded.
var oStatus: TsgcOpenAIClass_Response_Delete_Status;
begin
oStatus := oAPI.DeleteAssistant('asst_abc123');
if oStatus.Deleted then
ShowMessage('Assistant removed');
end;