Commit
·
7e59619
1
Parent(s):
a0e1665
Update app.py
Browse files
app.py
CHANGED
@@ -164,7 +164,7 @@ def summarize_meeting(filepath):
|
|
164 |
messages.append({"role": "user", "content": prompt_request})
|
165 |
|
166 |
response = openai.ChatCompletion.create(
|
167 |
-
model="gpt-
|
168 |
messages=messages,
|
169 |
temperature=.5,
|
170 |
top_p=1,
|
@@ -178,23 +178,26 @@ def summarize_meeting(filepath):
|
|
178 |
# Consolidate these meeting summaries.
|
179 |
prompt_request = str(prompt_response)
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
194 |
#outfilepath = "Resumen-Minuta-" + datetime.now().strftime("%d-%m-%Y-%H-%M") + ".docx"
|
195 |
# Convert the summary to a .docx file with the name "Resumen-Minuta-<download-date>.docx"
|
196 |
#markdown_to_docx(
|
197 |
# summary_text, outfilepath)
|
|
|
|
|
198 |
|
199 |
|
200 |
return summary_text
|
|
|
164 |
messages.append({"role": "user", "content": prompt_request})
|
165 |
|
166 |
response = openai.ChatCompletion.create(
|
167 |
+
model="gpt-3.5-turbo",
|
168 |
messages=messages,
|
169 |
temperature=.5,
|
170 |
top_p=1,
|
|
|
178 |
# Consolidate these meeting summaries.
|
179 |
prompt_request = str(prompt_response)
|
180 |
|
181 |
+
if count_tokens(prompt_request)>4000:
|
182 |
+
# Summarize the text of the meeting transcripts.
|
183 |
+
messages = [{"role": "system", "content": "Consolidate, and summarize the text of the meeting transcripts. The output format should be markdown in the same language as the user's input. Start with a brief summary of the meeting, continue with bullets outlining the most important points of discussion. Finally, provide a table to show the list of action items with 3 columns: Action, Assigned Person, Due Date."}]
|
184 |
+
messages.append({"role": "user", "content": prompt_request})
|
185 |
+
response = openai.ChatCompletion.create(
|
186 |
+
model="gpt-3.5-turbo",
|
187 |
+
messages=messages,
|
188 |
+
temperature=.3,
|
189 |
+
top_p=1,
|
190 |
+
frequency_penalty=0,
|
191 |
+
presence_penalty=0
|
192 |
+
)
|
193 |
+
|
194 |
+
summary_text = response["choices"][0]["message"]['content'].strip()
|
195 |
#outfilepath = "Resumen-Minuta-" + datetime.now().strftime("%d-%m-%Y-%H-%M") + ".docx"
|
196 |
# Convert the summary to a .docx file with the name "Resumen-Minuta-<download-date>.docx"
|
197 |
#markdown_to_docx(
|
198 |
# summary_text, outfilepath)
|
199 |
+
else:
|
200 |
+
summary_text = "Error: Contacta al administrador de Minuteevo."
|
201 |
|
202 |
|
203 |
return summary_text
|