Spaces:
Runtime error
Runtime error
changes to openai query
Browse files
app.py
CHANGED
@@ -239,7 +239,7 @@ def process_summary_with_openai(summary):
|
|
239 |
client = OpenAI(api_key=os.getenv('OPENAI_API_KEY'))
|
240 |
|
241 |
# Create the prompt for OpenAI's completion
|
242 |
-
prompt = "You are clinical consultant discussion training cases with students at TonicUniversity. Assess and describe the proper options in minute detail. Propose a course of action based on your assessment. You will recieve a summary assessment in a language, respond ONLY in
|
243 |
|
244 |
# Call the OpenAI API with the prompt and the summary
|
245 |
completion = client.chat.completions.create(
|
@@ -285,18 +285,6 @@ def process_and_query(input_language=None,audio_input=None,image_input=None,text
|
|
285 |
except Exception as e:
|
286 |
return str(e)
|
287 |
|
288 |
-
completion = client.chat.completions.create(
|
289 |
-
model="gpt-3.5-turbo",
|
290 |
-
messages=[
|
291 |
-
{"role": "system", "content": prompt},
|
292 |
-
{"role": "user", "content": markdown_output_final}
|
293 |
-
]
|
294 |
-
)
|
295 |
-
final_response= completion.choices[0].message.content
|
296 |
-
return f"**Summary**: {final_response}\n\n**Full output**:\n{markdown_output}"
|
297 |
-
except Exception as e:
|
298 |
-
return str(e)
|
299 |
-
|
300 |
|
301 |
welcome_message = """
|
302 |
# 👋🏻Welcome to ⚕🗣️😷MultiMed - Access Chat ⚕🗣️😷
|
|
|
239 |
client = OpenAI(api_key=os.getenv('OPENAI_API_KEY'))
|
240 |
|
241 |
# Create the prompt for OpenAI's completion
|
242 |
+
prompt = "You are clinical consultant discussion training cases with students at TonicUniversity. Assess and describe the proper options in minute detail. Propose a course of action based on your assessment. You will recieve a summary assessment in a language, respond ONLY in English. Exclude any other commentary:"
|
243 |
|
244 |
# Call the OpenAI API with the prompt and the summary
|
245 |
completion = client.chat.completions.create(
|
|
|
285 |
except Exception as e:
|
286 |
return str(e)
|
287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
welcome_message = """
|
290 |
# 👋🏻Welcome to ⚕🗣️😷MultiMed - Access Chat ⚕🗣️😷
|