INNER CODE UNIT · Python

search

browser-use/bux · agent/agency_db.py:266

def search(
    db: sqlite3.Connection, query: str, limit: int = 10
) -> list[dict[str, Any]]:
    """Fuzzy LIKE-search across title + description. Lower-cases both."""
    q = f"%{query.lower()}%"
    cur = db.execute(
        """
        SELECT * FROM suggestions
         WHERE LOWER(title) LIKE ? OR LOWER(description) LIKE ?
         ORDER BY created_at DESC
         LIMIT ?
        """,
        (q, q, limit),
    )
    return [dict(r) for r in cur.fetchall()]


def list_recent(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…