mbosse99 commited on
Commit
e2c034e
·
1 Parent(s): 8b8d1a8

revert changes

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -11,10 +11,6 @@ from sendgrid.helpers.mail import Mail, Attachment, FileContent, FileName, FileT
11
  import base64
12
  from azure.cosmos import CosmosClient, exceptions
13
 
14
- openai.api_key = os.getenv("OPENAI_API_KEY")
15
- openai.api_base = "https://tensora-oai.openai.azure.com/"
16
- openai.api_type = "azure"
17
- openai.api_version = "2023-05-15"
18
  os_connection_string = os.getenv("CONNECTION")
19
  os_mail_password = os.getenv("MAIL_PASSWORD")
20
 
@@ -231,7 +227,7 @@ def bot(history, job, resume, job_params):
231
  messages.append({"role": "assistant", "content": assistant})
232
 
233
  response = openai.ChatCompletion.create(
234
- engine="gpt-4",
235
  messages=messages,
236
  temperature=0.0,
237
  stream=True,
@@ -268,7 +264,7 @@ def send_evaluation(history, job, resume, job_params):
268
  prompt = "You are a professional recruiter who has been given a CV and a job description and has created 10 questions based on that. The eventual applicant has entered his answers to the questions. Now you have to evaluate on the basis of the answers if the applicant fits the job in principle. This is the case when about 70 percent of all questions have been answered satisfactorily and positively. Keep in mind that an answer must always be fact-based, so if, for example, the question asks for examples, the potential applicant must also give such examples. Please also provide details of which questions were answered positively and why."
269
 
270
  res = openai.ChatCompletion.create(
271
- engine="gpt-4",
272
  temperature=0.2,
273
  messages=[
274
  {
 
11
  import base64
12
  from azure.cosmos import CosmosClient, exceptions
13
 
 
 
 
 
14
  os_connection_string = os.getenv("CONNECTION")
15
  os_mail_password = os.getenv("MAIL_PASSWORD")
16
 
 
227
  messages.append({"role": "assistant", "content": assistant})
228
 
229
  response = openai.ChatCompletion.create(
230
+ model="gpt-4",
231
  messages=messages,
232
  temperature=0.0,
233
  stream=True,
 
264
  prompt = "You are a professional recruiter who has been given a CV and a job description and has created 10 questions based on that. The eventual applicant has entered his answers to the questions. Now you have to evaluate on the basis of the answers if the applicant fits the job in principle. This is the case when about 70 percent of all questions have been answered satisfactorily and positively. Keep in mind that an answer must always be fact-based, so if, for example, the question asks for examples, the potential applicant must also give such examples. Please also provide details of which questions were answered positively and why."
265
 
266
  res = openai.ChatCompletion.create(
267
+ model="gpt-4",
268
  temperature=0.2,
269
  messages=[
270
  {