Fix RAG inference
This commit is contained in:
+2
-5
@@ -4,9 +4,7 @@ from telegram.ext import ContextTypes
|
||||
|
||||
browse_command_bot = None
|
||||
|
||||
async def browse_command(update: Update, context: ContextTypes.DEFAULT_TYPE, bot) -> None:
|
||||
global browse_command_bot
|
||||
browse_command_bot = bot
|
||||
async def browse_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
||||
prompts_dir = "prompts"
|
||||
|
||||
await navigate_to(prompts_dir, update.message.reply_text)
|
||||
@@ -48,8 +46,7 @@ async def get_files_and_directories(directory: str) -> list:
|
||||
return subdirs, files
|
||||
|
||||
# This function will need to be called when a button is pressed
|
||||
async def button_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
||||
global browse_command_bot
|
||||
async def button_callback(update: Update, context: ContextTypes.DEFAULT_TYPE, browse_command_bot) -> None:
|
||||
query = update.callback_query
|
||||
await query.answer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user