TsgcHTTP_API_Anthropic › 메서드 › CancelBatch
Anthropic API에서 진행 중인 Message Batch를 취소합니다
function CancelBatch(const aBatchId: string) : TsgcAnthropicClass_Response_Batch;
| Name | Type | 설명 |
|---|---|---|
aBatchId | const string | 취소할 배치의 식별자이며, 일반적으로 msgbatch_로 시작합니다. |
새 ProcessingStatus가 canceling 또는 ended로 설정된 업데이트된 배치 설명자입니다 (TsgcAnthropicClass_Response_Batch)
Anthropic API에 POST /v1/messages/batches/{id}/cancel 요청을 보냅니다. 배치 내에서 이미 처리가 시작된 요청은 여전히 청구됩니다. 처리되지 않은 요청은 중단됩니다. AnthropicOptions의 anthropic-version 헤더가 자동으로 포함됩니다. 반환된 객체는 호출자가 해제해야 합니다.
oResponse := oAPI.CancelBatch('msgbatch_01AbCdEf');
try
ShowMessage('new status: ' + oResponse.ProcessingStatus);
finally
oResponse.Free;
end;