m00913563 commited on
Commit
f8fbe87
·
1 Parent(s): 482e35f
Files changed (1) hide show
  1. evaluator.py +3 -3
evaluator.py CHANGED
@@ -1,6 +1,6 @@
1
  from openai import OpenAI
2
  from models import Evaluation
3
- from typing import List
4
  import json
5
  tags = {'AI': "This one is the competence description"} #list of competence to save, better to hit db.
6
  client = OpenAI()
@@ -105,7 +105,7 @@ def gpt_evaluator(payload, fewshot, response_format):
105
  {"role": "system", "content": fewshot},
106
  {"role": "user", "content": payload},
107
  ],
108
- response_format={"type": "json_object"})
109
  json_str = response.choices[0].message.parsed
110
  return json_str
111
 
@@ -187,7 +187,7 @@ def evaluate_interview(competences: list[str], transcript: list):
187
  RETURN IN FORMAT BELOW:
188
  [{"label": "SUCCESS"},{"label": "FAIL"}]
189
  """,
190
- List[Evaluation]
191
  )
192
  ## output:
193
  final_score = 0
 
1
  from openai import OpenAI
2
  from models import Evaluation
3
+ from typing import List, Dict
4
  import json
5
  tags = {'AI': "This one is the competence description"} #list of competence to save, better to hit db.
6
  client = OpenAI()
 
105
  {"role": "system", "content": fewshot},
106
  {"role": "user", "content": payload},
107
  ],
108
+ response_format=response_format)
109
  json_str = response.choices[0].message.parsed
110
  return json_str
111
 
 
187
  RETURN IN FORMAT BELOW:
188
  [{"label": "SUCCESS"},{"label": "FAIL"}]
189
  """,
190
+ List(Dict[str,str])
191
  )
192
  ## output:
193
  final_score = 0