Add semantic_search() method - #20
Open
tomchop wants to merge 2 commits into
Open
Conversation
Yeti's /api/v2/search/semantic endpoint returns results bucketed per
object type; mirror that shape as a list of {type, results, total}
sections rather than flattening it, so callers can tell which type
each match came from.
sudo pip3 install poetry now fails on ubuntu-latest runners because pip refuses to uninstall the Debian-managed urllib3 it conflicts with. pipx is preinstalled on GitHub-hosted runners and avoids touching the system Python environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
YetiApi.semantic_search(query, count=10, root_type=None), callingPOST /api/v2/search/semantic.sections: [{type, results, total}]) rather than flattening it, so callers can tell which object type each match came from. Each result includes asemantic_scorefield (higher = more similar).sudo pip3 install poetrywas failing onubuntu-latestrunners (pip refusing to uninstall the Debian-managedurllib3it conflicts with) — last green run on this repo was 2025-09-01. Switched both workflows topipx install poetry(preinstalled on GitHub-hosted runners, doesn't touch the system Python env). Unrelated to the feature but was blocking this PR from ever going green.Context
This is the first consolidation step of moving ad-hoc Yeti API client logic (currently duplicated in
yeti-agents) into this shared client.Test plan
python -m unittest tests/api.py— 31 tests pass (30 existing + 1 new)ruff checkshows no new issues from this change (pre-existing unrelated import-sorting debt in the file, untouched)