Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ headers = {
|
|
| 9 |
"Content-Type": "application/json",
|
| 10 |
}
|
| 11 |
|
| 12 |
-
|
| 13 |
#"stream": True,
|
| 14 |
"sourceId": "src_REdjHAwIpm8Lhuk2HAtnm", # Replace with your source ID
|
| 15 |
"messages": [
|
|
@@ -20,7 +20,7 @@ headers = {
|
|
| 20 |
],
|
| 21 |
}
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
try:
|
| 26 |
response = requests.post(url, json=data, headers=headers, stream=True)
|
|
|
|
| 9 |
"Content-Type": "application/json",
|
| 10 |
}
|
| 11 |
|
| 12 |
+
data = {
|
| 13 |
#"stream": True,
|
| 14 |
"sourceId": "src_REdjHAwIpm8Lhuk2HAtnm", # Replace with your source ID
|
| 15 |
"messages": [
|
|
|
|
| 20 |
],
|
| 21 |
}
|
| 22 |
|
| 23 |
+
url = "https://api.chatpdf.com/v1/chats/message"
|
| 24 |
|
| 25 |
try:
|
| 26 |
response = requests.post(url, json=data, headers=headers, stream=True)
|