TsgcHTTP_API_OpenAIMethods › DeleteAssistant

DeleteAssistant Method

Permanently deletes an Assistant by its identifier

Syntax

function DeleteAssistant(const aAssistantId: string) : TsgcOpenAIClass_Response_Delete_Status;

Parameters

NameTypeDescription
aAssistantIdconst stringThe identifier of the Assistant to delete.

Return Value

Deletion confirmation exposing the object id and a boolean Deleted flag (TsgcOpenAIClass_Response_Delete_Status)

Remarks

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.

Example

var oStatus: TsgcOpenAIClass_Response_Delete_Status;
begin
  oStatus := oAPI.DeleteAssistant('asst_abc123');
  if oStatus.Deleted then
    ShowMessage('Assistant removed');
end;

Back to Methods