fix(api): make the conclusions semantic-search validation error actionable (#960)

The error raised when observer/observed are missing from a semantic-search
query states the requirement but not where the values go, so callers can't
tell whether they belong at the top level or inside `filters`. Point at the
`filters` object explicitly, show a minimal well-formed payload, and note
that both the bare and `_id`-suffixed key spellings are accepted (the code
already reads either).

Co-authored-by: hermes <hermes@local>
This commit is contained in:
bbasketballer75 2026-08-11 17:12:00 -04:00 committed by GitHub
parent 0d57df430e
commit 2d174a5fb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,10 @@ async def query_conclusions(
if not observer or not observed:
raise ValidationException(
"observer and observed must be specified for semantic search"
"observer and observed must be specified for semantic search. "
"Pass them inside the 'filters' object, e.g. "
'{"query": "...", "filters": {"observer": "alice", "observed": "bob"}}. '
"Both 'observer'/'observer_id' and 'observed'/'observed_id' are accepted."
)
with embedding_call_purpose(