Skip to content

Commit 73fce72

Browse files
Update claude_api.py
1 parent 19cfe5f commit 73fce72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

claude-api/claude_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def list_all_conversations(self):
7474
print(f"Error: {response.status_code} - {response.text}")
7575

7676
# Send Message to Claude
77-
def send_message(self, prompt, conversation_id, attachment=None):
77+
def send_message(self, prompt, conversation_id, attachment=None,timeout=500):
7878
url = "https://claude.ai/api/append_message"
7979

8080
# Upload attachment if provided
@@ -119,7 +119,7 @@ def send_message(self, prompt, conversation_id, attachment=None):
119119
'TE': 'trailers'
120120
}
121121

122-
response = requests.post( url, headers=headers, data=payload,impersonate="chrome110")
122+
response = requests.post( url, headers=headers, data=payload,impersonate="chrome110",timeout=500)
123123
decoded_data = response.content.decode("utf-8")
124124
decoded_data = re.sub('\n+', '\n', decoded_data).strip()
125125
data_strings = decoded_data.split('\n')

0 commit comments

Comments
 (0)