mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 18:06:17 -05:00
ai: ground the librarian — collection links, retry hints, no source URLs
Live testing surfaced three ways small models went wrong summarizing a library: they gave up after one empty search (misspelled channel names found nothing), so zero-result searches now carry a retry hint and the Research prompt requires list_collections before channel/site questions and search_videos(channel_id) before claiming a channel is summarized; they presented the familiar YouTube source URL instead of the WROLPi link, so listings omit the source URL (archive detail keeps it); and they invented links for channels, so channel collections now carry their real /videos/channel page link. Search descriptions state that search_str is optional for browsing the newest items. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
08888a3d8f
commit
1ee35c6bda
4 changed files with 40 additions and 17 deletions
|
|
@ -70,7 +70,9 @@ def test_format_file_group_archive():
|
|||
assert result['kind'] == 'archive'
|
||||
assert result['link'] == '/archives/8'
|
||||
assert result['text_link'] == '/api/ai/archives/8/text'
|
||||
assert result['url'] == 'https://example.com/a'
|
||||
# Listings omit the source URL so small models present the WROLPi link instead.
|
||||
assert 'url' not in result
|
||||
assert lib.format_file_group(fg, include_url=True)['url'] == 'https://example.com/a'
|
||||
|
||||
|
||||
def test_format_file_groups_total():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue