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:
@@ -115,6 +115,8 @@ def action_ok(expect, got):
|
||||
return True # the reason the fingers can't take it
|
||||
if alt == "none" and got in ("none", "chat", "status"):
|
||||
return True
|
||||
if alt == "end" and got == "chat":
|
||||
return True # "Thanks." alone: lumi ends after the silence
|
||||
if alt == "mission" and got.startswith("action:fetch"):
|
||||
return True # the plain fetch does it (steps.is_mission is False)
|
||||
if got == "empty_hand" and alt in ("none", "give", "place", "fetch"):
|
||||
|
||||
+3
-2
@@ -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."]])
|
||||
|
||||
Reference in New Issue
Block a user