File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ export class Anthropic extends Core.APIClient {
195195 static Anthropic = this ;
196196 static HUMAN_PROMPT = '\n\nHuman:' ;
197197 static AI_PROMPT = '\n\nAssistant:' ;
198+ static DEFAULT_TIMEOUT = 600000 ; // 10 minutes
198199
199200 static AnthropicError = Errors . AnthropicError ;
200201 static APIError = Errors . APIError ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class Completions extends APIResource {
3333 ) : APIPromise < Completion > | APIPromise < Stream < Completion > > {
3434 return this . _client . post ( '/v1/complete' , {
3535 body,
36- timeout : 600000 ,
36+ timeout : ( this . _client as any ) . _options . timeout ?? 600000 ,
3737 ...options ,
3838 stream : body . stream ?? false ,
3939 } ) as APIPromise < Completion > | APIPromise < Stream < Completion > > ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class Messages extends APIResource {
3434 ) : APIPromise < Message > | APIPromise < Stream < RawMessageStreamEvent > > {
3535 return this . _client . post ( '/v1/messages' , {
3636 body,
37- timeout : 600000 ,
37+ timeout : ( this . _client as any ) . _options . timeout ?? 600000 ,
3838 ...options ,
3939 stream : body . stream ?? false ,
4040 } ) as APIPromise < Message > | APIPromise < Stream < RawMessageStreamEvent > > ;
You can’t perform that action at this time.
0 commit comments