Merge branch 'wp-e1-places'

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:33:07 +02:00
commit 5f0f4ad5b7
10 files changed
+1437 -98

No files matched your search

+6 -2
View File
@@ -2,7 +2,10 @@
The encoder is `desk.tools.embedding`; the table is roledesk's own `vectors`
(see `Store.put_vectors`). What gets encoded is the title and the opening of
the description, which is what says what a role is.
the description, which is what says what a role is; while a role has no
description, the teaser its host's list carried, and while it has neither,
the title alone. `Store.upsert_role` drops the vector when a better text
arrives, so the role is encoded again.
sentence-transformers is optional, as in newsdesk. Without it this task puts
one notice on screen and does nothing; `score` then leaves `fit` out and ranks
@@ -55,7 +58,8 @@ def wants_e5_prefix(model: str) -> bool:
def document(role: Role) -> str:
return f"{role.title}\n{role.description[:BODY_CHARS]}"
"""The title and the description, else the teaser."""
return f"{role.title}\n{(role.description or role.teaser)[:BODY_CHARS]}"
def role_text(model: str, role: Role) -> str: