JustusI commited on
Commit
ecbf455
·
verified ·
1 Parent(s): af73cff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -87,7 +87,7 @@ def generate_summary(transcript_text: str) -> str:
87
  def get_chat_response(transcript_text: str, conversation_history: list, user_query: str) -> str:
88
  """Generate a chat response using the transcript as context."""
89
  messages = conversation_history + [
90
- {"role": "user", "content": f"Based on the following document:\n\n{transcript_text}\n\nQuestion: {user_query}"}
91
  ]
92
  completion = client.chat.completions.create(model="gpt-4o-mini", messages=messages)
93
  return completion.choices[0].message.content.strip()
 
87
  def get_chat_response(transcript_text: str, conversation_history: list, user_query: str) -> str:
88
  """Generate a chat response using the transcript as context."""
89
  messages = conversation_history + [
90
+ {"role": "user", "content": f"Based on the video transcript:\n\n{transcript_text}\n\nQuestion: {user_query}"}
91
  ]
92
  completion = client.chat.completions.create(model="gpt-4o-mini", messages=messages)
93
  return completion.choices[0].message.content.strip()