Skip to content

Add semantic_search() method - #20

Merged
tomchop merged 2 commits into
mainfrom
feat/semantic-search
Aug 19, 2026
Merged

Add semantic_search() method#20
tomchop merged 2 commits into
mainfrom
feat/semantic-search

Conversation

@tomchop

@tomchop tomchop commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds YetiApi.semantic_search(query, count=10, root_type=None), calling POST /api/v2/search/semantic.
  • Mirrors the endpoint's per-type response shape (sections: [{type, results, total}]) rather than flattening it, so callers can tell which object type each match came from. Each result includes a semantic_score field (higher = more similar).
  • Bumps version to 2.2.0.
  • Also fixes CI: sudo pip3 install poetry was failing on ubuntu-latest runners (pip refusing to uninstall the Debian-managed urllib3 it conflicts with) — last green run on this repo was 2025-09-01. Switched both workflows to pipx 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 check shows no new issues from this change (pre-existing unrelated import-sorting debt in the file, untouched)
  • CI green: unit tests + e2e

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.
@tomchop
tomchop merged commit 3dd6236 into main Aug 19, 2026
2 checks passed
@tomchop
tomchop deleted the feat/semantic-search branch August 19, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant