TsgcHTTP_API_Anthropic메서드 › CancelBatch

CancelBatch Method

Anthropic API에서 진행 중인 Message Batch를 취소합니다

구문

function CancelBatch(const aBatchId: string) : TsgcAnthropicClass_Response_Batch;

Parameters

NameType설명
aBatchIdconst string취소할 배치의 식별자이며, 일반적으로 msgbatch_로 시작합니다.

반환 값

ProcessingStatus가 canceling 또는 ended로 설정된 업데이트된 배치 설명자입니다 (TsgcAnthropicClass_Response_Batch)

설명

Anthropic API에 POST /v1/messages/batches/{id}/cancel 요청을 보냅니다. 배치 내에서 이미 처리가 시작된 요청은 여전히 청구됩니다. 처리되지 않은 요청은 중단됩니다. AnthropicOptionsanthropic-version 헤더가 자동으로 포함됩니다. 반환된 객체는 호출자가 해제해야 합니다.

예제

oResponse := oAPI.CancelBatch('msgbatch_01AbCdEf');
try
  ShowMessage('new status: ' + oResponse.ProcessingStatus);
finally
  oResponse.Free;
end;

메서드로 돌아가기