mbosse99 commited on
Commit
494a5d6
·
verified ·
1 Parent(s): 4960b4c

Updated OpenAI params

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,9 +12,9 @@ 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
 
19
  os_connection_string = os.getenv("CONNECTION")
20
  os_mail_password = os.getenv("MAIL_PASSWORD")
@@ -232,7 +232,7 @@ def bot(history, job, resume, job_params):
232
  messages.append({"role": "assistant", "content": assistant})
233
 
234
  response = openai.ChatCompletion.create(
235
- engine="gpt-4",
236
  messages=messages,
237
  temperature=0.0,
238
  stream=True,
@@ -269,7 +269,7 @@ def send_evaluation(history, job, resume, job_params):
269
  prompt = "You are a professional recruiter who has been given a CV and a job description and has created 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."
270
 
271
  res = openai.ChatCompletion.create(
272
- engine="gpt-4",
273
  temperature=0.2,
274
  messages=[
275
  {
 
12
  from azure.cosmos import CosmosClient, exceptions
13
 
14
  openai.api_key = os.getenv("OPENAI_API_KEY")
15
+ openai.api_base = "https://tensora-oai-france.openai.azure.com/"
16
  openai.api_type = "azure"
17
+ openai.api_version = "2023-12-01-preview"
18
 
19
  os_connection_string = os.getenv("CONNECTION")
20
  os_mail_password = os.getenv("MAIL_PASSWORD")
 
232
  messages.append({"role": "assistant", "content": assistant})
233
 
234
  response = openai.ChatCompletion.create(
235
+ engine="gpt-4-1106",
236
  messages=messages,
237
  temperature=0.0,
238
  stream=True,
 
269
  prompt = "You are a professional recruiter who has been given a CV and a job description and has created 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."
270
 
271
  res = openai.ChatCompletion.create(
272
+ engine="gpt-4-1106",
273
  temperature=0.2,
274
  messages=[
275
  {