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 11-04-2025, 08:13 AM   #1
sheldonrrr
A self-taught developer
sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.
 
Posts: 25
Karma: 46102
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Lightbulb [GUI Plugin] Ask AI Plugin

Ask AI Plugin - A calibre Plugin to Ask Questions About Books

A versatile plugin that lets you ask questions about books directly in calibre using a wide range of AI models, including OpenAI, Anthropic, Nvidia AI, OpenRouter, Grok, Google Gemini, Ollama (Local AI), and DeepSeek.

Why Use This Plugin?
  • This plugin supports extracting book metadata (such as title, author, or publisher) from your calibre library page and submitting it to mainstream AI services for querying, eliminating the need for manual copy-pasting.
  • While calibre officially supports AI features, especially within the Viewer for text selection, querying from the main book list page remains a high-frequency scenario with great potential for product innovation, which this plugin addresses.
  • Beyond current user needs,I am preparing more advanced exploratory features. Stay tuned for updates.
Just select one or more books, choose your preferred AI model, ask your question, and get answers seamlessly.

----

Bug Fixes & Improvements (New in v1.3.1)
  • Fixed Plugin Enable/Disable Error: Resolved AttributeError when clicking Enable/disable plugin button in calibre's plugin manager (Windows users reported this issue).
  • Dependency Isolation: Implemented namespace isolation for all third-party libraries to prevent conflicts with other calibre plugins. All dependencies now live in ask_ai_plugin_vendor namespace.
  • Removed Duplicate Dependencies: Removed webencodings (already included in calibre).
  • Enhanced Stability: Zero conflict with other plugins - each plugin now uses its own isolated library versions.
  • Updated Dependencies: Synchronized all vendor library versions in requirements.txt for better maintainability.
  • Improved Documentation: Added comprehensive version update guide and dependency conflict analysis documentation.

---

✨ Features (New in v1.3.0)
  • Ask questions about books with AI directly in calibre
  • Configurable API key for various AI models: OpenAI, Anthropic, Nvidia AI, OpenRouter, Grok, Google Gemini, and DeepSeek
  • Enhanced Ollama Support: Dedicated settings for Ollama (Local AI) for private and local AI interactions.
  • New! Load Models: Add AI services by selecting from a list, replacing manual input for greater convenience.
  • New! Multi-Book Query: Select multiple books and include all of their metadata in your question.
  • New! Parallel Requests: Send your question to up to 2 AI services simultaneously to compare answers.
  • New! Max Request Time: Configure a maximum time limit for AI requests.
  • New! Reset All Data: Quickly delete all plugin configuration and history data.
  • Enhanced Compatibility: Custom AI service configuration is now compatible with OpenAI's request format, supporting most mainstream AI services (not just Ollama’s).
  • 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
  • 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: Further improved multi-language support.

---

Installation

Method 1: Install via GitHub Zip File
  1. Download the plugin zip file (attached below as Ask_AI_Plugin.zip)
  2. In calibre, go to Preferences -> Plugins -> Load plugin from file
  3. Select the downloaded Ask_AI_Plugin.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 AI Plugin in the Filter by name field
  5. Select the plugin and install
  6. Restart calibre

---

How to Get Your API Key(s)
  1. OpenAI, Anthropic, Nvidia AI, OpenRouter, Grok, Google Gemini, DeepSeek: Obtain your API key from the respective official provider's website or console.
  2. 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 AI Services in calibre
  1. In calibre, click the Ask AI Plugin dropdown menu in the toolbar, then select Configure.
  2. Select your desired AI Model (e.g., OpenAI, Gemini ) or use the new Load Models feature.
  3. Paste your API Key (if applicable) into the relevant input box.
  4. For Ollama, configure the local server endpoint in its dedicated section.
  5. Click Save.
  6. You’ll see a Save successful message.

---

How to Use the Plugin
  1. Select one or more books in your calibre library.
  2. Click the Ask AI Plugin button in the toolbar.
  3. Select your preferred AI model(s) from the dropdown and configure any parallel requests.
  4. Enter your question in the popup dialog.
  5. Click Send to get the AI’s answer(s).
  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)

---

⚠️ Requirements
  • calibre 6.0.0 or higher (The current minimum version requirement is more compatible with some older devices.)
  • 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 service provider and your account permissions.
  • For Ollama, performance depends on your local hardware and the downloaded model.

----

Recent Updates (v1.3.0 Highlights)
  • v1.3.0 New Features:
    • AI: OpenAI, Anthropic, Nvidia AI, OpenRouter Supported.
    • AI: Dedicated Ollama Entrance (enhanced from Custom).
    • Config: Load Models for easy AI service addition.
    • Config: Max Request Time setting.
    • Config: Parallel AI Requests (up to 2).
    • Feature: Multi-Book Query support.
    • Tool: Reset All Data option.
  • v1.3.0 Enhancements:
    • Compatibility: Custom AI configuration now compatible with OpenAI's request format.
    • i18n: Further improved Internationalization support.
  • v1.2.x Updates: Included support for Google Gemini, Ollama, DeepSeek, streaming config, and various fixes.

---

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 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 regarding data usage for model training may vary. Please consult their respective official statements.

---

Important Note on Plugin Name Update
As the original plugin name no longer suits the broad range of scenarios the plugin now supports, we are adjusting the name to Ask AI Plugin. I plan to introduce this as a new plugin and update the old plugin (Ask Grok) with a minor version that displays a popup, prompting users to upgrade.

Please Note: This update is a breaking change and no longer supports the plugin's original data format. Therefore, legacy users are strongly advised to back up or transfer their data, such as API Keys.

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
https://github.com/sheldonrrr/ask_grok
Attached Thumbnails
Click image for larger version

Name:	Ask_AI_Plugin_preview_01.png
Views:	13
Size:	576.1 KB
ID:	219066   Click image for larger version

Name:	Ask_AI_Plugin_preview_02.png
Views:	6
Size:	385.9 KB
ID:	219067   Click image for larger version

Name:	Ask_AI_Plugin_preview_03.png
Views:	6
Size:	405.3 KB
ID:	219068   Click image for larger version

Name:	Ask_AI_Plugin_preview_04.png
Views:	5
Size:	432.3 KB
ID:	219069  
Attached Files
File Type: zip Ask_AI_Plugin_v1.3.1.zip (1.56 MB, 8 views)

Last edited by sheldonrrr; Yesterday at 10:53 PM. Reason: Improve version update
sheldonrrr is offline   Reply With Quote
Old 11-04-2025, 03:13 PM   #2
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,703
Karma: 79983758
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I'm not a plugin developer but I will admit to being a tad concerned about
Quote:
External Python modules: requests, bleach, markdown2
I'm certain that recently we saw another plugin that used it's own modules causing issues due to multiple plugins each loading their own private copy of modules, leasing to breakage of other plugins.
PeterT is offline   Reply With Quote
Old 11-04-2025, 09:34 PM   #3
sheldonrrr
A self-taught developer
sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.
 
Posts: 25
Karma: 46102
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Thanks

Quote:
Originally Posted by PeterT View Post
I'm not a plugin developer but I will admit to being a tad concerned about


I'm certain that recently we saw another plugin that used it's own modules causing issues due to multiple plugins each loading their own private copy of modules, leasing to breakage of other plugins.

Thank you for letting me know. I will investigate and fix this issue. Once the problem is fixed, I will continue with the update process.
sheldonrrr is offline   Reply With Quote
Old Yesterday, 01:29 AM   #4
sheldonrrr
A self-taught developer
sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.sheldonrrr has every book they ever wanted in electronic form on their reader.
 
Posts: 25
Karma: 46102
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Fixed.

Quote:
Originally Posted by PeterT View Post
I'm not a plugin developer but I will admit to being a tad concerned about


I'm certain that recently we saw another plugin that used it's own modules causing issues due to multiple plugins each loading their own private copy of modules, leasing to breakage of other plugins.
Now version v1.3.1 fixed this module issue.
sheldonrrr is offline   Reply With Quote
Reply

Tags
anthropic, book ai, gemini, openai, openrouter


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Manga plugin mastertea Plugins 7 10-30-2025 01:13 AM
[GUI Plugin] K2pdfopt Plugin capink Plugins 19 03-01-2025 05:37 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 03:43 AM.


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