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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -148,11 +148,12 @@ async def get_video_comments(video_id):
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
  ]
157
  try:
158
  loop = asyncio.get_event_loop()
@@ -209,3 +210,4 @@ async def create_thread_and_send_replies(message, video_id, comments, replies, s
209
  if __name__ == "__main__":
210
  discord_client = MyClient(intents=intents)
211
  discord_client.run(os.getenv('DISCORD_TOKEN'))
 
 
148
  async def generate_replies(comments, transcript):
149
  replies = []
150
  system_prompt = "λ„ˆλŠ” 유튜브 λŒ“κΈ€μ— 닡글을 μž‘μ„±ν•˜λŠ” 역할이닀. λ„ˆλŠ” μ•„μ£Ό μΉœμ ˆν•˜κ³  μ‰¬μš΄ λ‚΄μš©μœΌλ‘œ 전문적인 글을 μž‘μ„±ν•˜μ—¬μ•Ό ν•œλ‹€. μž‘μ„±λœ κΈ€μ˜ λ§ˆμ§€λ§‰μ— λ°˜λ“œμ‹œ 인삿말과 'OpenFreeAI'라고 μžμ‹ μ„ λ°ν˜€λΌ."
151
+
152
  for comment, _ in comments:
153
  messages = [
154
  {"role": "system", "content": system_prompt},
155
+ {"role": "user", "content": comment},
156
+ {"role": "system", "content": f"λΉ„λ””μ˜€ μžλ§‰: {transcript}"}
157
  ]
158
  try:
159
  loop = asyncio.get_event_loop()
 
210
  if __name__ == "__main__":
211
  discord_client = MyClient(intents=intents)
212
  discord_client.run(os.getenv('DISCORD_TOKEN'))
213
+