Anki Quick AI
GitHub repository link: https://github.com/chuanqixu/anki-quick-ai/tree/main
This add-on is actively developing. Configuration parameters may be changed when the add-on was updated, but Anki does not automatically change the old configuration. After updating the add-on, please go to the add-on configuration page and click “Restore Defaults”. Sorry for the inconvenience!
The Anki Quick AI Addon is a powerful tool that lets you interact with OpenAI in Anki. It allows you to quickly collect field values from notes, interact with OpenAI using customized prompts in multiple languages, and show and play audio responses.
Features:
Find & collect field values from Anki’s notes. Interact with OpenAI using custom prompts. Multiple interactions are supported. Show & play audio of responses from OpenAI.
Example Usage
Words story: Retrieve words studied today in Anki, and send them to OpenAI to ask it to make a story using these words. Print the story and generate the audio files. Example video link
Install
It has been submitted to Anki add-ons Anki Quick AI. The code is 547821970. To install it, click “Tools->Add-ons->Get Add-ons”. In the Code section, input 547821970, and then click OK.
Usage
Please configure the add-on before the first time you use it.
There are several ways to run the add-on:
Click the Tools button on the menu bar in the main Anki window, and then click Anki Quick AI. Wait for seconds for AI generation and transmission between OpenAI and your local machine. If you also generate the sound, then it may take other seconds for sound generation. In the Browse window, click the Anki Quick AI button on the menu bar. If shortcut is set, you can use it to run the add-on. The default shortcut is Alt+A. If automatic_display is set to be true, then the add-on will automatically run if you change to the main deck window. For example, when you finish one deck, or when you change to the deck window from the study window.
Settings
Double click “Tools->Add-ons->Anki Quick AI”, and a config page will show. Some of the parameters may be effective after restarting Anki. You should add “api_key” and “model” in the “AI” tag of the config page. Hover your mouse for tooltips of parameters in the configuration window. For usage, you should create your default prompt settings in the “prompt” tag of the config page. The settings are the following:
Prompt Name: A name for this prompt configuration. Default Browse Query: Query used to search for notes. The query grammar is the same as Anki browse, which can be found in the official manual. Note Field Configuration: Only note values with the specified fields will be selected. “Other Note Type” will be used for unspecified note types. Prompt: A list of prompts that will be sent to OpenAI. In the prompt, you can use custom placeholders, which are sandwiched with #, e.x., #language#. Placeholders will be replaced before sending to OpenAI. It is designed for you to quickly change the prompt. #field_value#: This is a keyword. This will be replaced with a list of strings, which are values of the note_field in notes searched by query. #response#: This is a keyword. This will be replaced with the previous response from OpenAI. #language#: This is a keyword. This will be replaced with language_list in the settings. See below. #custom#: You can specify your custom placeholder. This will be replaced with the value you set in placeholder, see below. Do not specify “field_value”, “response”, or “language” as the name, since they have their special usage. placeholder: A dict contains customized placeholders. The key is the name of the placeholder. The value is another dict, whose key is the index of the prompt that will be replaced, and the value is the string to replace the placeholder. You cannot and do not need to specify “field_value”, “response”, or “language”. 6.language: Languages for the generated audio.
Change Log
See Change Log
License
This repository is under AGPL 3.0 required by AnkiWeb for Anki Add-on.
Feedback
You can create issues at my GitHub repo: link: https://github.com/chuanqixu/anki-quick-ai/tree/main.
Acknowledgement
Thanks for the inspiration and code in yihong0618/duolingo_remember and yihong0618/shanbay_remember.
Thanks for BlueGreenMagick/ankiaddonconfig for configuration window.
Thanks for Marquis Wong. It is now ported to Anki 23.10.
Thanks to Juliano Ouvrard for developing Groq and Agentic behaviors.
Liên kết hỗ trợ
- Contact Author
- https://github.com/chuanqixu/anki-quick-ai/tree/ma
- Example video link
- Change Log
- https://github.com/chuanqixu/anki-quick-ai/tree/ma
Reviews (5)
👍 2024-03-24
This addon is a great idea. Unfortunately, I am not able to operate it. I keep getting the following error message.
Anki encountered a problem. Please follow the troubleshooting steps. Add-ons possibly involved: Anki Quick Al Comment from author Thank you very much for your feedback!
I could not debug without further detailed information. You could click “Copy Debug Info” when the error window shows up. If you have a GitHub account, it would be convenient to post the issue here: https://github
👍 2023-12-11
Great add-on so far. but for some reason it keeps crashing my Anki when I try to close its window. Comment from author Thank you very much!
Unfortunately, I admit that there are some issues with multithreading here. I am not an expert in this, especially in multithreading for Qt GUI which is very annoying when some background processings are needed (in this case, they are the interaction with OpenAI and text-to-speech translation).
I am truly sorry for the current bad experience and thank you
👍 2023-06-11
It may be a bit challenging to use, but it is a very interesting add-on! To use this, OpenAI’s API-key is required. With the reference query set to “rated:7:1”, I was able to compile a story with all the cards I’ve had trouble with over the past week that failed. I think the default is that the field name must match the name “Front” or else an error will occur. If the field names are different, you will need to set them up. (It might be easier to rename all the fields to Front) Comment from auth
👍 2023-05-28
This is awesome
Depending on how you use it, you will really save a lot of time studying.
The only downside is that chatgpt is slow.
It will be more wonderful if the result value received from chatgpt is stored in anki.
It is not conducive to remembering that chatgpt keeps inventing different stories.
And if it is saved in anki, it would be better to use other tts engine plugins.
Thanks again for the great plug-in. Comment from author Thanks for the feedback!
The speed of ChatGPT
👍 2023-05-24
Great idea.
It’s very useful.
It seems like it will be a big help to me.
But when studying, it’s a bit inconvenient to go to Tools->AI Quick AI on the card.
This is because it breaks concentration when OpenAI is slow.
It would be more convenient if you could perform it all at once for the selected cards through the card browser. Comment from author Hi, thank you very much for being the first to reply to my add-on!
Your feedback is very valuable!
My idea for this add-on is to quic