Web answers without OpenAI: 7-day weather, Naver answer boxes for English questions, distances, money in won, shorter lookup prompt, answer made while 'Let me check' plays

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 05:02:42 +09:00
co-authored by Claude Opus 5.5
parent 8451fd5837
commit b4a1833a14
5 changed files with 62 additions and 42 deletions
+3 -2
View File
@@ -13,10 +13,10 @@ for q, words in {"How tall is Son Heung-min?": "height Son Heung-min", "How long
"오늘 달러 환율 얼마야?": "오늘 달러 환율 얼마야?"}.items():
assert web.keywords(q) == words, (q, web.keywords(q))
# English questions about a person, a share, an index, a team, a place also ask Naver with the Korean word of its box
# English questions about a person, a share, an index or a team also ask Naver with the Korean word of its box
for q, box in {"How old is Taylor Swift?": "Taylor Swift 나이", "What is Nvidia's stock price today?": "Nvidia 주가",
"What's the Nasdaq doing today?": "Nasdaq 지수", "How did LAFC do in their last match?": "LAFC 경기 결과",
"What time does Lotte World open?": "Lotte World 영업시간", "Who is the pope?": None,
"What time does the Louvre open?": None, "Who is the pope?": None,
"손흥민 나이": None}.items():
assert web.ko_box_query(q) == box, (q, web.ko_box_query(q))
@@ -94,6 +94,7 @@ web._get = lambda url, timeout=6, headers=web.UA: '{"results": [{"name": "Moon-s
assert web._distance("How far away is the moon?") == "" and web._distance("How tall is the Eiffel Tower?") == ""
assert "Busan to Seoul" in web._distance("Busan distance from Seoul")
assert "Incheon Airport to Seoul" in web._distance("Incheon Airport distance from Seoul") # not "Incheon" "Airport"
# respond_from: an action line the model writes instead of the answer is never said; all of it: asked once more
outs = iter([["search New York", " weather"], ["It is 15 degrees", " in New York."]])