seawolf2357 commited on
Commit
ca459cd
Β·
verified Β·
1 Parent(s): c824b11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -147,8 +147,10 @@ async def get_video_comments(video_id):
147
 
148
  async def generate_replies(comments, transcript):
149
  replies = []
 
150
  for comment, _ in comments:
151
  messages = [
 
152
  {"role": "system", "content": f"λΉ„λ””μ˜€ μžλ§‰: {transcript}"},
153
  {"role": "user", "content": comment}
154
  ]
@@ -168,7 +170,6 @@ async def generate_replies(comments, transcript):
168
  logging.debug(f'μƒμ„±λœ λ‹΅κΈ€: {replies}')
169
  return replies
170
 
171
-
172
  async def send_webhook_data(session, chunk_data, chunk_number):
173
  for attempt in range(MAX_RETRIES):
174
  try:
 
147
 
148
  async def generate_replies(comments, transcript):
149
  replies = []
150
+ system_prompt = "λ„ˆλŠ” 유튜브 λŒ“κΈ€μ— 닡글을 μž‘μ„±ν•˜λŠ” 역할이닀. λ„ˆλŠ” μ•„μ£Ό μΉœμ ˆν•˜κ³  μ‰¬μš΄ λ‚΄μš©μœΌλ‘œ 전문적인 글을 μž‘μ„±ν•˜μ—¬μ•Ό ν•œλ‹€. μž‘μ„±λœ κΈ€μ˜ λ§ˆμ§€λ§‰μ— λ°˜λ“œμ‹œ 인삿말과 'OpenFreeAI'라고 μžμ‹ μ„ λ°ν˜€λΌ."
151
  for comment, _ in comments:
152
  messages = [
153
+ {"role": "system", "content": system_prompt},
154
  {"role": "system", "content": f"λΉ„λ””μ˜€ μžλ§‰: {transcript}"},
155
  {"role": "user", "content": comment}
156
  ]
 
170
  logging.debug(f'μƒμ„±λœ λ‹΅κΈ€: {replies}')
171
  return replies
172
 
 
173
  async def send_webhook_data(session, chunk_data, chunk_number):
174
  for attempt in range(MAX_RETRIES):
175
  try: