Open mariobehling opened 7 years ago
A skill format could look like:
#Intent-1
User query1|query2|quer3....
!name: <Skill_name>
!author: <author_name>
!author_url: <author_url>
!description: <description>
!dynamic_content: <Yes/No>
!developer_privacy_policy: <link>
!image: <image_url>
!term_of_use: <link>
!example:<The question that should be shown in public skill displays>
!expect:<The answer expected for the above example>
Answer for the user query
#Intent-2
User query1| query2| query3
!author: <author_name>
!author_url: <author_url>
!example:
!expect:
Answer for the user query
#Intent-3
User query1| query2| query3
!author: <author_name>
!author_url: <author_url>
!example:
!expect:
Answer for the user query
For example, the sample skill atomic.txt
defined in knowledge category would look like:
Tell the atomic mass of * | atomic mass of * | * atomic mass| to find atomic mass of *| do you know the atomic mass of * | do you know atomic mass of * | find the atomic mass of * | search atomic mass of * | tell me the atomic mass of *
!name: Atomic
!author: dynamitechetan
!author_url: https://github.com/dynamitechetan
!description: The mass of an atom of a chemical element expressed in atomic mass units. It is approximately equivalent to the number of protons and neutrons in the atom (the mass number) or to the average number allowing for the relative abundances of different isotopes.
!dynamic_content: Yes
!developer_privacy_policy: <Link to privacy policy>
!image: <Image for skill stored in data repository>
!term_of_use: <Link to Terms of Use>
!example: atomic mass of iron
!expect: The atomic mass of iron is 55.845 u (unified atomic mass units)
!console:The atomic mass of $1$ is $plaintext$
{
"url":"https://api.wolframalpha.com/v2/query?input=atomic+mass+of+$1$&format=plaintext&output=JSON&appid=9WA6XR-26EWTGEVTE",
"path":"$.queryresult.pods[1].subpods"
}
eol
* element of periodic table | tell me * element of periodic table | * element by atomic number
!example:5th element for atomic number
!expect:boron (5)
!author: dynamitechetan
!author_url: https://github.com/dynamitechetan
!console: $plaintext$
{
"url": "https://api.wolframalpha.com/v2/query?input=$1$+element+of+periodic+table&format=plaintext&output=JSON&appid=9WA6XR-26EWTGEVTE&includepodid=Result",
"path" : "$.queryresult.pods[0].subpods[0]"
}
eol
!example, !expect, !image,!description are already implemented, rest needs to be implemented for issue https://github.com/fossasia/susi_server/issues/424.
Skill name would be the name of .txt file.
I am not sure how to include Invocation Name
concept for susi, @mariobehling @Orbiter Please guide.
@dynamitechetan @DravitLochan @madhavrathi @uday96 @rishiraj824 @chiragw15. Please provide the suggestion for the above format. Once finalized will implement these on susi_server, to get the skill page ready.
@saurabhjn76 We can also add a name for the skill in the skill like this -> !name As we are handling everything else like this it will be consistent with it and it will be better than parsing the names from the repository. Rest of the format you specified looks good to me. 👍
@saurabhjn76 I think this looks good to me. Let's start with this approach and later we can add on to this.
@saurabhjn76 wouldn't this be more intuitive? Is it possible to do like this?
# Information about skill
!author: <author_name>
!author_url: <author_url>
!description: <description>
!dynamic_content: <Yes/No>
!developer_privacy_policy: <link>
!image: <image_url>
!term_of_use: <link>
#Intent-1
User query1|query2|quer3....
!example:<The question that should be shown in public skill displays>
!expect:<The answer expected for the above example>
Answer for the user query
#Intent-2
User query1| query2| query3
!example:
!expect:
Answer for the user query
#Intent-3
User query1| query2| query3
!example:
!expect:
Answer for the user query
@saurabhjn76 I guess Rishi is right, we can proceed with this and will add changes later if needed.
There could be many contributers to a given skill right? Like different intents written by different people? Shouldn't author be specific to intent in that case? Or if we need it specific to skill then shouldn't it be a list of authors?
@AliAyub007 :+1: added !name
, @uday96 all the parameters (!parameters
) are optional for an intent. We can show the list of authors, updated the format. Thanks:+1:
@chiragw15
# Information about skill
!author: <author_name>
!author_url: <author_url>
!description: <description>
!dynamic_content: <Yes/No>
!developer_privacy_policy: <link>
!image: <image_url>
!term_of_use: <link>
#Intent-1
User query1|query2|quer3....
!example:<The question that should be shown in public skill displays>
!expect:<The answer expected for the above example>
Answer for the user query
#Intent-2
User query1| query2| query3
!example:
!expect:
Answer for the user query
#Intent-3
User query1| query2| query3
!example:
!expect:
Answer for the user query
Certainly, It is more intuitive, but since we are using the same bang operator for console and other things, may be we need to use some different operator, I think as @rishiraj824 and @madhavrathi suggested to get the system working quickly, let us start with the above approach and later we can add on to this.
A skill is one .txt File. The metadata should refer to the file and not a single intent. For such global attributes there is the '::' notion.
A bang is not the appropriate way to do this.
@Orbiter :+1: Got it, thanks will make the necessary changes
like
::name <Skill_name>
::author <author_name>
::author_url <author_url>
::description <description>
::dynamic_content <Yes/No>
::developer_privacy_policy <link>
::image <image_url>
::term_of_use <link>
#Intent
User query1|query2|quer3....
!example:<The question that should be shown in public skill displays>
!expect:<The answer expected for the above example>
Answer for the user query
So the ::
attributes must not be given for each intent. They are valid once they have been declared for all intents but can be changed afterwards within the same skill.
@orbiter is this ::
attribute implemented on server?
@dynamitechetan it's there for reading metadata, @Orbiter thanks, will implement the necessary things on the server.
Okay.
In order to include all relevant data in skills we need to outline how the format should look like. We need to include the following:
Compare to Alexa