名称 占位符 描述
Selected text {selection} 选中的文字
sentence {sentence} 选中文字所在的句子
Native Language {nativeLanguage} 在设置界面下选择的语言,一般设置为母语
Target Language {targetLanguage} 在设置界面下选择的语言,一般设置为想要学习的语言
Anki Cards {ankiCards} Anki 牌组中近期需要复习的卡片,可能有多个。具体请看下方描述

Untitled

动态占位符可以插入到 Prompt 中,在执行 Prompt 时,Scouter 将会将这些字符转为特定的信息。

例如你设置了如下 Prompt:

翻译为中文:{selection}

当你在页面中选择了「Hello」这个单词,那么 Prompt 会被转换提供给 GPT AI:

翻译为中文:Hello

{ankiCards}

当你将 Prompt 设置成:

使用这些单词编写 1 个故事:{ankiCards}

最终的 Prompt 会转换成:

使用这些单词编写 1 个故事:kilograms,grams,soda,punishes…

ankiCards 会被转换成什么字符取决你 Anki 中待复习的单词。

当 Prompt 中包含 {ankiCards} 时,Scouter 会在在你的 Anki 中搜索待复习的卡片,查询语法是 is:due prop:due>-1 prop:due<2 。之后会将目标卡片的第 1 个字段的值拼接在一起(第一个字段通常是卡片的正面),如下图的第 1 个字段是 Front

Untitled

在下图的例子中,{ankiCards} 会被设置为 kilograms,grams,soda,punishes…

Untitled

为了正常使用{ankiCards} 变量,你需要参考🔗此设置。

Name Placeholders Description
Selected text {selection} Selected text
sentence {sentence} The sentence containing the selected text
Native Language {nativeLanguage} The language selected under the settings interface is generally set to one's native language.
Target Language {targetLanguage} The language selected in the settings interface is generally set to the language you want to learn.
Anki Cards {ankiCards} Cards that need to be reviewed recently in an Anki deck, which may be multiple.

Untitled

Dynamic placeholders can be inserted into the Prompt. When executing the Prompt, Scouter will convert these characters into specific information.

For example, if you set the following Prompt:

Translate to Chinese: {selection}

When you select the word "Hello" on the page, the Prompt will be transformed into the input provided to GPT AI:

Translate to Chinese: Hello

{ankiCards}

When you set the Prompt to::

Write a story using these words: {ankiCards}

The final prompt will be converted into:

Write a story using these words:kilograms,grams,soda,punishes…

What characters the ankiCards will be converted into depends on the words you have pending for review in Anki.

When {ankiCards} is included in Prompt, Scouter will search for cards due for review in your Anki using the query syntax is:due prop:due>-1 prop:due<2. It will then concatenate the values of the first field of the target cards (usually the front of the card), as shown in the image below where the first field is Front.

Untitled

In the example shown in the figure below, {ankiCards} will be set to kilograms, grams, soda, punishes...

Untitled

In order to use the ankiCards variable properly, you need to refer to this setting.