TsgcHTTP_API_OpenAI › Methods › DeleteThread
Permanently deletes a Thread and all of its messages
function DeleteThread(const aThreadId: string) : TsgcOpenAIClass_Response_Delete_Status;
| Name | Type | Description |
|---|---|---|
aThreadId | const string | The identifier of the Thread to delete. |
Deletion confirmation with the Thread id and a boolean Deleted flag (TsgcOpenAIClass_Response_Delete_Status)
Calls DELETE /v1/threads/{thread_id} to permanently remove the Thread together with every message it contains. Runs previously executed against the Thread remain available but can no longer be listed or resumed. This operation cannot be undone.
begin
if oAPI.DeleteThread('thread_abc123').Deleted then
ShowMessage('Thread removed');
end;