mbosse99 commited on
Commit
6306fe3
·
1 Parent(s): 58ab65d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -11,10 +11,10 @@ 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 +231,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 +268,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
+ #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
  messages.append({"role": "assistant", "content": assistant})
232
 
233
  response = openai.ChatCompletion.create(
234
+ model="gpt-4",
235
  messages=messages,
236
  temperature=0.0,
237
  stream=True,
 
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
+ model="gpt-4",
272
  temperature=0.2,
273
  messages=[
274
  {