Chandima Prabhath commited on
Commit
7bf1582
·
1 Parent(s): 3250556

Update weather report prompt and refine voice reply processing for a more playful tone

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -131,7 +131,7 @@ def _fn_joke(mid, cid):
131
 
132
  def _fn_weather(mid,cid,loc):
133
  raw = requests.get(f"http://sl.wttr.in/{loc}?format=4",timeout=5).text
134
- r = generate_llm(f"Convert to °C & creative:\n\n{raw}")
135
  client.send_message(mid,cid,r)
136
  task_queue.put({"type":"audio","message_id":mid,"chat_id":cid,"prompt":r})
137
 
@@ -194,7 +194,7 @@ def _fn_send_text(mid,cid,message):
194
  client.send_message(mid,cid,message)
195
 
196
  def _fn_voice_reply(mid,cid,prompt):
197
- proccessed_prompt = f"Just say this dialog eaxcatly as it is in a frinedly, playful and helpful manner as a cute secretary: {prompt}"
198
  res = generate_voice_reply(proccessed_prompt,model="openai-audio",voice="coral",audio_dir=BotConfig.AUDIO_DIR)
199
  if res and res[0]:
200
  path,_ = res
 
131
 
132
  def _fn_weather(mid,cid,loc):
133
  raw = requests.get(f"http://sl.wttr.in/{loc}?format=4",timeout=5).text
134
+ r = generate_llm(f"Give a weather report in °C:\n\n{raw}")
135
  client.send_message(mid,cid,r)
136
  task_queue.put({"type":"audio","message_id":mid,"chat_id":cid,"prompt":r})
137
 
 
194
  client.send_message(mid,cid,message)
195
 
196
  def _fn_voice_reply(mid,cid,prompt):
197
+ proccessed_prompt = f"Just say this dialog eaxcatly as it is in a frinedly, playful, happy and helpful but clumsy manner as a cute secretary: {prompt}"
198
  res = generate_voice_reply(proccessed_prompt,model="openai-audio",voice="coral",audio_dir=BotConfig.AUDIO_DIR)
199
  if res and res[0]:
200
  path,_ = res