zakerytclarke commited on
Commit
de46855
·
verified ·
1 Parent(s): 1d6f60d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -62,7 +62,7 @@ async def debug_teapot_inference(server_name, user_input):
62
  search_result = brave_search_context(user_input)
63
  rag_results = teapot_instance.rag(query=user_input)
64
 
65
- return "\n\n".join(rag_results)+"\n\n"+search_result
66
 
67
  @client.event
68
  async def on_ready():
@@ -110,9 +110,9 @@ async def on_reaction_add(reaction, user):
110
  if thread is None:
111
  thread = await message.create_thread(name=f"Debug Thread: '{cleaned_message[0:30]}...'", auto_archive_duration=60)
112
 
113
- response = await debug_teapot_inference(server_name, user_input)
114
- debug_response = "Context:\n"+discord.utils.escape_markdown(response)
115
- await thread.send(debug_response[-2000:])
116
 
117
 
118
 
 
62
  search_result = brave_search_context(user_input)
63
  rag_results = teapot_instance.rag(query=user_input)
64
 
65
+ return "\n\n".join(rag_results), search_result
66
 
67
  @client.event
68
  async def on_ready():
 
110
  if thread is None:
111
  thread = await message.create_thread(name=f"Debug Thread: '{cleaned_message[0:30]}...'", auto_archive_duration=60)
112
 
113
+ rag_result, search_result = await debug_teapot_inference(server_name, user_input)
114
+ debug_response = "## RAG:\n"+discord.utils.escape_markdown(rag_result)[-1000:]+"## Search:\n"+discord.utils.escape_markdown(search_result)
115
+ await thread.send(debug_response)
116
 
117
 
118