Spaces:
Paused
Paused
Selcan Yukcu
commited on
Commit
·
9f06dc4
1
Parent(s):
51d0f96
fix: json format bug
Browse files
main.py
CHANGED
|
@@ -61,17 +61,19 @@ async def full_bug_localization(request: BugLocalizationRequest, ctx: Context) -
|
|
| 61 |
|
| 62 |
headers = {
|
| 63 |
"Authorization": f"Bearer {hf_token}",
|
| 64 |
-
"Content-Type": "application/
|
| 65 |
}
|
| 66 |
|
| 67 |
try:
|
| 68 |
logger.info(f"Sending bug localization request to {api_url} with data: {request.model_dump()}")
|
| 69 |
response = await client.post(
|
| 70 |
api_url,
|
| 71 |
-
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
},
|
| 76 |
headers=headers,
|
| 77 |
)
|
|
|
|
| 61 |
|
| 62 |
headers = {
|
| 63 |
"Authorization": f"Bearer {hf_token}",
|
| 64 |
+
"Content-Type": "application/json"
|
| 65 |
}
|
| 66 |
|
| 67 |
try:
|
| 68 |
logger.info(f"Sending bug localization request to {api_url} with data: {request.model_dump()}")
|
| 69 |
response = await client.post(
|
| 70 |
api_url,
|
| 71 |
+
json={
|
| 72 |
+
"key": request.issue_key,
|
| 73 |
+
"fields": {
|
| 74 |
+
"summary": request.summary,
|
| 75 |
+
"description": request.description,
|
| 76 |
+
}
|
| 77 |
},
|
| 78 |
headers=headers,
|
| 79 |
)
|