edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

The named tuple returned by `ext::ai::search` cannot have `order by` (and probably other) methods chained on it.

Open scotttrinh opened this issue 6 months ago • 0 comments

Attempting to use the AI search function like:

search_results = ai.search(default.Chunk, std.str("tigers")).order_by(distance="asc").limit(3)
result = await client.query(
    search_results.select(
        object=lambda s: s.object.select(content=True)
    )
)

Fails with this error:

AttributeError: type object 'ObjectDistance_Tuple_4ZKj8w' has no attribute 'order_by'

scotttrinh avatar Jun 23 '25 16:06 scotttrinh