Dryanvfi commited on
Commit
b7c0cc3
·
1 Parent(s): e268015

November_7_openAI_update.py

Browse files

Updating syntax to reflect the changes in the new OpenAI API format

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,7 +37,7 @@ def prompt_analyze_reporting(prompt, passed_args):
37
  data_structure_overview = passed_args['data_structure_overview']
38
  data_relationships_overview = passed_args['data_relationships_overview']
39
  passed_args['fig'] = ''
40
- output = openai.ChatCompletion.create(model="gpt-3.5-turbo",temperature = 0.0, messages=[{"role": "user", "content":
41
  data_structure_overview},
42
  {"role": "user", "content":
43
  data_relationships_overview},{"role": "user", "content":
@@ -56,7 +56,7 @@ def prompt_analyze_questions(prompt, passed_args):
56
  data_structure_overview = passed_args['data_structure_overview']
57
  data_relationships_overview = passed_args['data_relationships_overview']
58
  passed_args['output_string']=''
59
- output = openai.ChatCompletion.create(model="gpt-3.5-turbo",temperature = 0.0, messages=[{"role": "user", "content":
60
  data_structure_overview},
61
  {"role": "user", "content":
62
  data_relationships_overview},{"role": "user", "content":
 
37
  data_structure_overview = passed_args['data_structure_overview']
38
  data_relationships_overview = passed_args['data_relationships_overview']
39
  passed_args['fig'] = ''
40
+ output = openai.chat.completions.create(model="gpt-3.5-turbo",temperature = 0.0, messages=[{"role": "user", "content":
41
  data_structure_overview},
42
  {"role": "user", "content":
43
  data_relationships_overview},{"role": "user", "content":
 
56
  data_structure_overview = passed_args['data_structure_overview']
57
  data_relationships_overview = passed_args['data_relationships_overview']
58
  passed_args['output_string']=''
59
+ output = openai.chat.completions.create(model="gpt-3.5-turbo",temperature = 0.0, messages=[{"role": "user", "content":
60
  data_structure_overview},
61
  {"role": "user", "content":
62
  data_relationships_overview},{"role": "user", "content":