IliaLarchenko commited on
Commit
1d5b387
1 Parent(s): b47e010
Files changed (2) hide show
  1. tests/candidate.py +5 -2
  2. tests/test_e2e.py +1 -1
tests/candidate.py CHANGED
@@ -99,8 +99,11 @@ def complete_interview(
99
  response = client.chat.completions.create(
100
  model=model, messages=messages_candidate, temperature=1, response_format={"type": "json_object"}, stream=False
101
  )
102
- response_json = json.loads(response.choices[0].message.content)
103
- response_content = response_json.get("message", "")
 
 
 
104
 
105
  candidate_message = response_content
106
 
 
99
  response = client.chat.completions.create(
100
  model=model, messages=messages_candidate, temperature=1, response_format={"type": "json_object"}, stream=False
101
  )
102
+ try:
103
+ response_json = json.loads(response.choices[0].message.content)
104
+ response_content = response_json.get("message", "")
105
+ except:
106
+ continue
107
 
108
  candidate_message = response_content
109
 
tests/test_e2e.py CHANGED
@@ -26,7 +26,7 @@ def test_complete_interview() -> None:
26
  interview_types = ["ml_design", "math", "ml_theory", "system_design", "sql", "coding"]
27
  scores: List[float] = []
28
 
29
- with ThreadPoolExecutor(max_workers=2) as executor:
30
  # Test normal interviews
31
  futures = [executor.submit(complete_and_grade_interview, it) for it in interview_types]
32
 
 
26
  interview_types = ["ml_design", "math", "ml_theory", "system_design", "sql", "coding"]
27
  scores: List[float] = []
28
 
29
+ with ThreadPoolExecutor(max_workers=5) as executor:
30
  # Test normal interviews
31
  futures = [executor.submit(complete_and_grade_interview, it) for it in interview_types]
32