TsgcHTTP_API_Anthropic속성 › ReadTimeout

ReadTimeout Property

요청을 중단하기 전에 Anthropic API로부터의 응답을 기다리는 최대 시간(밀리초)입니다

구문

property ReadTimeout: Integer read FReadTimeout write FReadTimeout;

기본값

설명

ReadTimeout은 https://api.anthropic.com/v1에 대해 이루어지는 모든 HTTP 호출에 적용되며, 단순 요청과 스트리밍 Server-Sent Event 응답을 모두 포함합니다. 긴 완료를 생성하는 모델을 호출하거나 큰 prompt로 CountTokens/CreateMessage를 호출할 때는 더 큰 값을 사용해야 합니다. 값이 0이면 타임아웃이 없음을 의미합니다.

예제

oAPI := TsgcHTTP_API_Anthropic.Create(nil);
oAPI.AnthropicOptions.ApiKey := 'sk-ant-...';
// wait up to 120 seconds for Claude to finish the response
oAPI.ReadTimeout := 120000;

속성으로 돌아가기