Spaces:
Sleeping
Sleeping
November_7_openAI_update.py
Browse filesUpdating syntax to reflect the changes in the new OpenAI API format
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.
|
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.
|
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":
|