INNER CODE UNIT · Python

show

IlyaGusev/rulm · self_instruct/src/bot/run.py:73

    def show(self, update: Update, context: CallbackContext):
        chat_id = update.effective_chat.id
        if update.message:
            username = update.message.chat.username
            self.chat2username[chat_id] = username
        else:
            username = self.chat2username[chat_id]

        record = self.sample_record(username)
        self.last_records[chat_id] = record
        text = f"Задание: {record['instruction']}\n\n"
        if record["input"].strip() and record["input"].strip() != "<noinput>":
            text += f"Вход: {record['input']}\n\n"
        text += f"Ответ: {record['output']}"

        keyboard = [
            [
                InlineKeyboardButton("Плохой ответ", callback_data="ok"),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…