Selcan Yukcu commited on
Commit
9f06dc4
·
1 Parent(s): 51d0f96

fix: json format bug

Browse files
Files changed (1) hide show
  1. main.py +7 -5
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/x-www-form-urlencoded"
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
- data={
72
- "issue_key": request.issue_key,
73
- "summary": request.summary,
74
- "description": request.description,
 
 
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
  )