Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|
| 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 |
-
|
| 114 |
-
debug_response = "
|
| 115 |
-
await thread.send(debug_response
|
| 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 |
|