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 {
195
195
static Anthropic = this ;
196
196
static HUMAN_PROMPT = '\n\nHuman:' ;
197
197
static AI_PROMPT = '\n\nAssistant:' ;
198
+ static DEFAULT_TIMEOUT = 600000 ; // 10 minutes
198
199
199
200
static AnthropicError = Errors . AnthropicError ;
200
201
static APIError = Errors . APIError ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class Completions extends APIResource {
33
33
) : APIPromise < Completion > | APIPromise < Stream < Completion > > {
34
34
return this . _client . post ( '/v1/complete' , {
35
35
body,
36
- timeout : 600000 ,
36
+ timeout : ( this . _client as any ) . _options . timeout ?? 600000 ,
37
37
...options ,
38
38
stream : body . stream ?? false ,
39
39
} ) 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 {
34
34
) : APIPromise < Message > | APIPromise < Stream < RawMessageStreamEvent > > {
35
35
return this . _client . post ( '/v1/messages' , {
36
36
body,
37
- timeout : 600000 ,
37
+ timeout : ( this . _client as any ) . _options . timeout ?? 600000 ,
38
38
...options ,
39
39
stream : body . stream ?? false ,
40
40
} ) as APIPromise < Message > | APIPromise < Stream < RawMessageStreamEvent > > ;
You can’t perform that action at this time.
0 commit comments