Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2025, 03:51 AM   #1
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Lightbulb [GUI Plugin] Ask Grok

Ask Grok - A calibre Plugin to Ask Questions About Books

A versatile plugin that lets you ask questions about books directly in calibre using various AI models, including Grok, Google Gemini, Ollama (Local AI), and DeepSeek.

Why Use This Plugin?
With a multitude of AI tools available, you might want to leverage AI to ask questions about a book directly within calibre. However, doing this manually means you’d need to copy-paste the book’s information—like its title, author, or publisher—into an AI tool. This plugin eliminates that hassle by letting you call the capabilities of **Grok, Google Gemini, Ollama Local AI, or DeepSeek** directly in calibre, with no copy-pasting required! Just select a book, choose your preferred AI, ask your question, and get answers seamlessly.

----

Features
  • Ask questions about books with AI directly in calibre
  • Configurable API key for various AI models: Grok, Google Gemini, and DeepSeek
  • Support for Ollama (Local AI) for private and local AI interactions
  • Automatically includes the current book's metadata (title, author, publisher) - no copy-paste needed
  • Simple single input-output dialog interface
  • Customizable prompt template
  • Preview-able interface shortcuts
  • Check plugin version info in the interface
  • New! Edit Random Question Prompts: Customize the AI-generated question ideas.
  • New! Enable Streaming Config for every AI: Choose whether to receive AI responses as they are generated for a more interactive experience.
  • Enhanced Internationalization: Extensive interface text has been added for a more globally friendly experience.

---

Installation

Method 1: Install via GitHub Zip File
  1. Download the plugin zip file (attached below as Ask_Grok.zip)
  2. In calibre, go to Preferences -> Plugins -> Load plugin from file
  3. Select the downloaded Ask_Grok.zip file to install
  4. Restart calibre after installation

Method 2: Install via calibre Official Plugin Market
  1. Open calibre’s Preferences
  2. Go to Plugins
  3. Click Get new plugins
  4. Search for Ask Grok in the Filter by name field
  5. Select the plugin and install
  6. Restart calibre

---

How to Get Your API Key(s)
  1. For Grok: Go to https://console.x.ai/, create a team if needed, navigate to API Keys, click Create API Keys, name it (e.g., calibre_Ask_Grok), save, and copy the generated Key value (e.g., Bearer x-ai ***** or x-ai *****).
  2. For Google Gemini: Visit the Google AI Studio or Google Cloud Console to generate your API key.
  3. For DeepSeek: Obtain your API key from the DeepSeek official website.
  4. For Ollama (Local AI): No API key is strictly needed, as it runs locally. Ensure Ollama is installed and a model is running on your system.

---

Configure API Keys and AI Models in calibre
  1. In calibre, click the Ask Grok dropdown menu in the toolbar, then select Configure.
  2. Select your desired AI Model (e.g., Grok, Gemini, DeepSeek, Ollama).
  3. Paste your API Key (if applicable) into the relevant input box (e.g., X.AI Authorization Token for Grok).
  4. For Ollama, you might configure the local server endpoint.
  5. Click Save.
  6. You’ll see a Save successful message.

---

How to Use the Plugin
  1. Select a book in your calibre library.
  2. Click the Ask Grok button in the toolbar.
  3. Select your preferred AI model from the dropdown.
  4. Enter your question in the popup dialog.
  5. Click Send to get the AI’s answer.
  6. Click Suggestion? to see AI-generated question ideas.
  7. Utilize the Edit Random Question Prompts option in configurations to customize these suggestions.

---

Shortcuts
  • Send: Command + Enter

---

Supported Languages[*]Danish (da), German (de), English (en), Spanish (es), Finnish (fi), French (fr), Japanese (ja), Dutch (nl), Norwegian (no), Portuguese (pt), Russian (ru), Swedish (sv), Simplified Chinese (zh), Traditional Chinese (zht), Cantonese (yue)[/list]
---

Requirements
  • calibre 7.25 or higher
  • External Python modules: requests, bleach, markdown2

Note: The plugin uses built-in calibre modules like PyQt5 for the GUI and standard Python libraries (os, sys, json, etc.).

---

AI Model API Key Notes
  • API call limits and pricing depend on your selected AI model provider (Grok, Google Gemini, DeepSeek) and your account permissions.
  • For Ollama, performance depends on your local hardware and the downloaded model.

----

Recent Updates (v1.2.0 & v1.2.1)
  • v1.2.0 New Features:
    • AI: Google Gemini Supported
    • AI: Ollama Local AI Supported
    • AI: DeepSeek Supported
  • v1.2.0 Enhancements:
    • Edit Random Question Prompts: Customize suggestions for AI-generated questions.
    • Enable Streaming Config in every AI: Get real-time AI responses.
    • i18n Enhancement: Further improved internationalization.
  • v1.2.1 Fixes:
    • The Random Question button is now correctly triggered when the Grok model is selected.
    • Results returned by Gemini and Grok models are no longer truncated.
    • Extensive internationalization interface text has been added for better user experience.
  • v1.2.2 Fixes:
    • Fixed the Random Question button in DeepSeek's max tokens.

---

Privacy Handling
  • The plugin sends book metadata (title, author, publisher, publish time, language) to the selected AI model but excludes user-defined data like Tags or Comments.
  • Your AI API Key (Grok, Gemini, DeepSeek) is stored locally in a JSON file and isn’t sent to any third-party server.
  • Uses Python’s requests module for external API calls; no third-party servers are involved in data processing by the plugin itself beyond direct API calls to your chosen AI provider.
  • The privacy policy of each AI model (Grok, Gemini, DeepSeek) regarding data usage for model training may vary. Please consult their respective official statements.
  • You can set the Grok API Key via environment variable: XAI_AUTH_TOKEN.
  • For other models, environment variable support may be added in future updates or is handled by their specific API client libraries.

Grok Official Statement: Private Chat is private and won’t be used for training, but may be retained for up to 30 days for safety purposes.

---

Feedback Welcome!
Let me know if you have any questions or suggestions for the plugin. I’ll update this thread with any new features or changes.

GitHub Repository
You can find the source code and contribute to the project on GitHub: https://github.com/sheldonrrr/ask_grok
Attached Thumbnails
Click image for larger version

Name:	ask_grok_gif_preview.jpg
Views:	17
Size:	59.6 KB
ID:	217554  
Attached Files
File Type: zip Ask_Grok_v1.2.2.zip (2.56 MB, 84 views)

Last edited by sheldonrrr; 08-19-2025 at 11:21 PM. Reason: Attach updated plugin
sheldonrrr is offline   Reply With Quote
Old 04-05-2025, 06:44 PM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,616
Karma: 7891011
Join Date: Sep 2020
Device: none
Looks cool, I'll be definitely trying this when I get the API key. Congratulations!

Notes:

- Files should be placed in the root of zip structure. They're currently inside a 'ask_grok-main' folder.

- Upon toolbar button click, I should get a menu in English, as that is my UI language. Not a big deal, I figured how to change it

Last edited by Comfy.n; 04-05-2025 at 06:48 PM.
Comfy.n is offline   Reply With Quote
Old 04-05-2025, 11:44 PM   #3
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Quote:
Originally Posted by Comfy.n View Post
Looks cool, I'll be definitely trying this when I get the API key. Congratulations!

Notes:

- Files should be placed in the root of zip structure. They're currently inside a 'ask_grok-main' folder.

- Upon toolbar button click, I should get a menu in English, as that is my UI language. Not a big deal, I figured how to change it
---

Hi Comfy.n, thanks for your feedback! Both issues have been addressed:

1. I've added a Release page on GitHub (https://github.com/sheldonrrr/ask_grok/releases) with an installation ZIP where the zip file are placed directly in the root directory. The first issue was caused by GitHub's automated ZIP generation when downloading from the repo.
2. The default language has now been set to English.

Feel free to grab the updated version from the Release page. Let me know if there's anything else!
sheldonrrr is offline   Reply With Quote
Old 06-09-2025, 02:49 AM   #4
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Ask Grok -v1.1.15 Update

Changelog for v1.1.15
  • Fix: Resolved [400 error] request bugs on Windows and Linux.
  • API Update: Now using x.ai API version: grok-3-latest.
  • New Feature: Added window size memory support.

New release available here: v1.1.15 on GitHub

Thanks to our real user Ken for the feedback! Fixing compatibility issues across different systems with this release has been quite interesting.
Attached Files
File Type: zip Ask_Grok_v1.1.15.zip (2.55 MB, 26 views)
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 09:28 AM   #5
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Changelog for v1.1.19

I am happy to announce the release of Ask Grok version 1.1.19, which includes several bug fixes, improvements, and new features. Here's what's new:
  • Bug Fix: Resolved an issue on Windows in version 1.1.15.
  • Improvement: Added string localization for better language support.
  • UI Update: Renamed the 'Suggest Button' to 'Random Question Button' for clarity.
  • New Feature - History: Automatically saves the most recent query history. When you reopen the same book, the latest history will be displayed in the ask dialogue.
  • New Feature - Copy Button: Easily copy the answer content or both the question and answer content with a single click.

Download: The new release is available at GitHub Releases.

Welcome your feedback! Please share your thoughts and suggestions in this thread.
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 12:09 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,566
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by sheldonrrr View Post

Download: The new release is available at GitHub Releases.

Welcome your feedback! Please share your thoughts and suggestions in this thread.
Rather than pointing people to GitHub (which people would need to read this thread to know an update was available) you might like to update the first post of this thread with the new version.

Additionally could you not include the __MACOSX folder in the zip.

Last edited by PeterT; 06-30-2025 at 12:12 PM.
PeterT is offline   Reply With Quote
Old 06-30-2025, 08:22 PM   #7
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Quote:
Originally Posted by PeterT View Post
Rather than pointing people to GitHub (which people would need to read this thread to know an update was available) you might like to update the first post of this thread with the new version.

Additionally could you not include the __MACOSX folder in the zip.
Hey, Peter. Thanks for your guidance.

Actually, I also want to put the new version information in the first post of this thread, but I can't find the entry. It seems that my account lacks this permission. Currently I can only reply and quote the first post. In fact, I also want to update to the first post. If you can teach me, I will be very grateful.

Thanks for the feedback on the zip file. I will solve the problem of the __MACOSX folder and deal with this problem later. It seems that I still have a lot of details to consider in solving the compatibility problem of different platform systems.
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 09:30 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,566
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
It's quite possible that you don't have enough posts yet to edit the message. When you have a version you want released, I'll handle the updating of the post for youyu.
PeterT is offline   Reply With Quote
Old 06-30-2025, 09:35 PM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,566
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
We will also need to update the Plugin index to include the plugin. If you look at Index of Plugins you will see an attachment which is the standardized template we add to the index. Again, just fill it out and one of the admins can handle getting your plugin added.
PeterT is offline   Reply With Quote
Old 07-01-2025, 01:21 PM   #10
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
This is Ask Grok's PluginIndexSample-Information

Quote:
Originally Posted by PeterT View Post
We will also need to update the Plugin index to include the plugin. If you look at Index of Plugins you will see an attachment which is the standardized template we add to the index. Again, just fill it out and one of the admins can handle getting your plugin added.
Hey, Peter, you made my day.

The attached file (pluginIndexSample-Ask_Grok.txt) is based on the standard information downloaded from the Index rules you provided. I edited and filled it.

The Ask_Grok_v1.1.19.zip is the file without any hidden folder can be used for Index.

If the plugin is added to the index, I will also add a new way to search and install it through the official index! (I wrote it before, and it finally will work till now.)

Is this OK for publish for Index?

Thanks a lot.
Attached Files
File Type: txt pluginIndexSample-Ask_Grok.txt (261 Bytes, 26 views)
File Type: zip Ask_Grok_v1.1.19.zip (2.13 MB, 25 views)
sheldonrrr is offline   Reply With Quote
Old 07-01-2025, 03:06 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,566
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Should be done; takes an hour or so for calibre to detect the change in plugins.
PeterT is offline   Reply With Quote
Old 07-01-2025, 04:16 PM   #12
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,566
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
OK. It's visible.
PeterT is offline   Reply With Quote
Old 07-01-2025, 06:31 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,797
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

Changed thread title to comply with convention


BR
BetterRed is offline   Reply With Quote
Old 07-01-2025, 11:20 PM   #14
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Thanks a lot

Quote:
Originally Posted by PeterT View Post
OK. It's visible.
You made my day. Hope this plugin could help more people.
sheldonrrr is offline   Reply With Quote
Old 08-17-2025, 09:47 PM   #15
sheldonrrr
A self-taught developer
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 11
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Big Update: Multiple AI supported.
sheldonrrr is offline   Reply With Quote
Reply

Tags
ai tool, grok, xai


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] K2pdfopt Plugin capink Plugins 19 03-01-2025 04:37 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 03:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:30 PM.


MobileRead.com is a privately owned, operated and funded community.