Open mariobehling opened 4 years ago
There are more problems here: Asking "what is the time" again queries Wolfram due to susi_skill_data/models/general/Utilities/en/time.txt
, but the answer is broken, because the link given there responds with rubbish:
2020-01-12 16:42:39.843 INFO root - JSON data from API cannot be parsed: https://www.wolframcloud.com/objects/9611ca1b-5214-4887-863e-6ef6e4d44941
At least the question about "what is the time in vienna" works, that is the second skill in the above file, and this API seems still to work.
I suggest to remove the first one, as it is completely irrelevant and done by internal os skill
Here is the skill
::name Time
::author Saurabh Jain
::author_url https://github.com/saurabhjn76
::description A skill to tell current time
::dynamic_content Yes
::developer_privacy_policy
::image images/time.png
::terms_of_use
current time | What time is it | What time it is|What is the time|tell me the time |can you tell me the time|tell the time|What's the time|time now|Could you tell me the time| I don't know what time it is| Please tell the time
!example:What time is it
!expect:it is 2 minutes past 17
!console:It is $plaintext$
{
"url":"https://www.wolframcloud.com/objects/9611ca1b-5214-4887-863e-6ef6e4d44941",
"path":"$.queryresult.pods[1].subpods"
}
eol
current time in * | What time is it in * ?| What time it is in * ?|What is the time in * ?|tell me the time in *| can you tell me the time in *| please tell the time in *| What's the time in *| time in *| Could you tell me the time in *| Could you please tell me the time in *
!example:current time in london
!console:In $1$ it is $plaintext$
{
"url":"https://api.wolframalpha.com/v2/query?input=what+time+is+it+in+$1$&format=plaintext&output=JSON&appid=9WA6XR-26EWTGEVTE",
"path":"$.queryresult.pods[1].subpods"
}
eol
@Orbiter any comment concerning this?
Ok, I digged through the Java code, and in the case of "What is the time", two ideas are candidates:
/susi_skill_data/models/general/Utilities/en/time.txt
which has score of 9275070245451 and asks Wolfram. The score computation is based on score = language=100, dialog=0, utterance=1, meatscore=8, wholesize=8, inference=1, subscore=10, pattern={"type":"minor","expression":"current time","line":9}
/susi_server.git/conf/os_skills/system/en/en_0200_facts_knowledge.json
which has a score of 9273206754822 (less than the previous one). The score computation is based on score = language=100, dialog=0, utterance=1, meatscore=4, wholesize=4, inference=4, subscore=10, pattern={"type":"minor","expression":"what is the time"}
So I see there are two problems that need to be tackled
Do we want to query wolfram on any question concerning "what is ..."? First of all, the appId/key needs to be configurable, and then, these queries take time.
I removed the wrong first entry from susi_skill_data/models/general/Utilities/en/time.txt
since the URL gives errors. Now the susi server responds immediately with the time. Problem of timezone ignoring is still present, though.
Currently susi_server tries to contact wolfram first before trying something else. A simple "what is the time" request takes seconds to complete:
Is there a way to disable wolfram or make it be contacted after local skills are nt found?
Related to: https://github.com/fossasia/susi_server/issues/1417