Skip to content

Instantly share code, notes, and snippets.

View AlgorithmAlchemy's full-sized avatar
💭
Open to job opportunities

AlgorithmAlchemy AlgorithmAlchemy

💭
Open to job opportunities
View GitHub Profile
@Tishka17
Tishka17 / pincode.py
Last active March 11, 2023 18:20
pincode dialog example
import asyncio
import logging
from typing import Any
from aiogram import Bot, Dispatcher
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.dispatcher.filters.state import StatesGroup, State
from aiogram.types import CallbackQuery
from aiogram_dialog import Dialog, DialogManager, Window, DialogRegistry, Data
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach:
0.8+: Continue current approach
0.5-0.7: Consider minor adjustments
Below 0.5: Seriously consider backtracking and trying a different approach