LogoRodel Reader
E-books

AI Integration

Enhance your reading experience with AI assistant

Rodel Reader's book reader integrates AI conversation features to help you understand book content, translate text, and answer questions.

Supported AI Services

Service TypeDescription
OpenAIOpenAI official and all compatible API services
ClaudeAnthropic Claude API and compatible services
GeminiGoogle AI Studio or Vertex AI
Azure OpenAIMicrosoft Azure OpenAI enterprise service

Compatibility Note

OpenAI and Claude types support third-party services with compatible APIs (like DashScope, OpenRouter, etc.), just configure the corresponding Base URL.


Configuring AI Services

AI Configuration Interface

Adding a Provider

  1. Open app Settings
  2. Go to AI Configuration page
  3. Click Add Provider
  4. Select service type and fill in configuration

Configuration Fields

FieldDescription
NameCustom name for easy identification
Service TypeOpenAI / Claude / Gemini / Azure OpenAI
Base URLAPI endpoint address
API KeyKey provided by service provider

Base URL Examples

ServiceBase URL
OpenAI Officialhttps://api.openai.com/v1
Claude Officialhttps://api.anthropic.com/v1
Gemini Officialhttps://generativelanguage.googleapis.com/v1beta
Azure OpenAIhttps://{resource-name}.openai.azure.com
DashScopehttps://dashscope.aliyuncs.com/compatible-mode/v1
OpenRouterhttps://openrouter.ai/api/v1

Security Note

API keys are encrypted using Windows Credential Manager, but avoid saving sensitive keys on public devices.

Managing Models

Each provider can have multiple models configured:

  • Preset Models: Common models are pre-configured
  • Custom Models: Manually add model IDs supported by the provider

AI Chat Panel

AI Chat Panel

In the book reader, click the AI tab in the sidebar to open the chat panel.

Interface Components

AreaFunction
Model SelectorSwitch current AI model
Mode SelectorSelect conversation mode (system prompt)
Message ListDisplay conversation history
Input BoxEnter questions or instructions
Session ManagementCreate, switch, delete sessions

Conversation Modes

Conversation modes define AI behavior through system prompts:

ModeDescription
DefaultGeneral assistant mode
Reading AssistantFocused on helping understand book content
TranslationTranslate selected text
CustomUser-defined modes

You can create custom modes with your own system prompts.


AI Tool Calling

The AI assistant can execute specific operations to assist reading, called "tools".

Available Tools

ToolFunctionDescription
Get TOCRead book table of contentsAI understands book structure
Get Current ChapterRead current chapter contentAI knows what you're reading
Get Specific ChapterRead specific chapterGet content by chapter ID
Get Selected TextRead highlighted contentAI knows your selected text
Jump to ChapterNavigate to specified chapterAI helps you navigate
Jump to PositionNavigate to specified positionPrecise positioning
Search BookFull-text searchSupports regular expressions

Tool Execution Flow

Tool Call Confirmation Dialog
  1. User asks a question
  2. AI determines if tool calling is needed
  3. AI requests tool execution (confirmation dialog appears)
  4. User approves or denies
  5. Tool executes and returns results
  6. AI generates answer based on results

User Control

All tool calls require your approval before execution. You can choose to allow or deny in the confirmation dialog.

Tool Usage Examples

Example 1: Asking about book content

User: What is this book about?
AI: [Calls Get TOC]
AI: Based on the table of contents, this book mainly covers the following chapters...

Example 2: Finding content

User: Help me find chapters about "artificial intelligence"
AI: [Calls Search Book, keyword: artificial intelligence]
AI: I found relevant content in the following locations...

Example 3: Explaining selected content

User: [Selects a passage] Explain this paragraph
AI: [Calls Get Selected Text]
AI: This paragraph means...

AI Commands

AI Commands are a feature for quickly executing predefined prompts, ideal for frequently used scenarios like explaining vocabulary or summarizing paragraphs.

What are AI Commands?

Unlike AI chat, AI Commands are designed for quick one-time responses without maintaining conversation context. You can predefine prompt templates and execute them with one click after selecting text to get instant results.

How to Use

  1. Select text in the book
  2. Click the ⚡ button in the selection menu
  3. Choose a command from the popup list
  4. Wait for AI response

The response displays in a floating panel with Markdown support. You can copy the response or regenerate it.

Managing Commands

Click the AI tab in the sidebar, then switch to the Commands panel:

OperationMethod
Add CommandClick + button at top
Edit CommandClick edit button on command card
Delete CommandClick delete button on command card
ReorderDrag command cards

Template Variables

Command prompts support the following variables, which are automatically replaced with actual content during execution:

VariableDescriptionExample
{SELTEXT}Currently selected textUser's highlighted content
{SELPARA}Paragraph containing the selectionComplete paragraph with selected content
{CHAPTER}Full text of current chapterContent of the chapter being read

Command Examples

Explain Vocabulary

Please explain the meaning of the following word and provide example sentences:

{SELTEXT}

Translate Paragraph

Please translate the following paragraph to English:

{SELPARA}

Summarize Chapter

Please summarize the key points of the following content in 3-5 sentences:

{CHAPTER}

Model Selection

At the top of the Commands panel, there's a model selector for choosing a dedicated model for AI Commands. This is independent of the model used for AI chat.

If no model is manually selected, the first available model will be used automatically.


Session Management

AI chat supports multiple sessions, with multiple independent conversations per book.

Session Features

FeatureDescription
Book-boundEach session is tied to a specific book
History SavedConversation records are persistently stored
Independent ContextDifferent sessions don't affect each other
ResumableContinue conversation next time you open the book

Session Operations

Session History
OperationMethod
New SessionClick + button in session list
Switch SessionClick item in session list
Delete SessionClick delete button at end of history entry

FAQ

AI features not working?

  1. Check if AI provider is configured
  2. Confirm API Key is correct
  3. Check network connection
  4. Try using a different model

Response is slow?

AI response speed depends on:

  • Network latency
  • Model type (larger models are slower)
  • API service load

Suggestions:

  • Use a smaller model
  • Choose a faster provider
  • Check network connection quality

Tool call failed?

  1. Make sure you clicked Allow in the confirmation dialog
  2. Some tools may fail due to unsupported book formats
  3. Check error message for specific reason

How to use Chinese AI services?

Configuration steps:

  1. Select OpenAI type (compatible API)
  2. Enter provider's Base URL
  3. Enter corresponding API Key
  4. Add model IDs supported by the provider

Supported Chinese services include: Alibaba Cloud DashScope, Zhipu AI, and other services supporting OpenAI-compatible format.

Where is session data saved?

Session data is saved in the database file in the library directory. When migrating the library, all AI session records are migrated together.

On this page