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 06-03-2023, 08:08 PM   #1
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
[GUI Plugin] * PROPOSED * AI Book Summary

So as not to further clutter the "Plugin Ideas" thread, I've created this thread to discuss the proposed AI Book Summary plugin.

To summarise:
  • In this post I asked if a plugin to generate some content about a book using a large language model AI would be of interest.
  • The plugin has already been partially developed.
  • The plugin does not use the text of the book. It simply uses the title and author and asks the AI to generate content.
  • Using the entire text of the book would be technically infeasable and expensive.
  • The plugin generates content in languages other than English. I can't vouch for the quality.
  • The plugin also generates book covers - really badly.
  • The plugin can save content in the "extra data files" directory for calibre versions that support it.

Answers to some previous questions:
  • @JSWolf: if you give a URL to a text version of the book, would that work? No. Bing Chat (which uses GPT-4) currently does, but the OpenAI API I use doesn't.
  • @colinsky: Exactly.
  • @mikhail_fil: I think a "free text Q&A" facility is outside the scope of what I'm trying to achieve. Actually using ChatGPT or Bing Chat would be better suited for this. I've tried asking for metadata and AI says no.

For discussion:
  • I am willing to wear a cost of about US$10/month, which would account for about 10,000 summaries. This means cover generation would not be allowed. (Cover generation costs about 2c/image.)
  • Would people be willing to set up their own OpenAI account, for which they would need to provide payment details to OpenAI and enter the API key in the plugin config? Then the user base could generate all the content they desired.
  • Would people be comfortable knowing that my backend infrastructure could log their API key, as well as the content of the prompt and response. I wouldn't of course, but there's no way to prove this.

Last edited by Bradles; 06-03-2023 at 08:25 PM.
Bradles is offline   Reply With Quote
Old 06-03-2023, 09:02 PM   #2
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Sample Content

Tagline: One Ring to rule them all.

Summary: The Fellowship of the Ring is the first book in J. R. R. Tolkien's epic fantasy series, The Lord of the Rings. It tells the story of Frodo Baggins, a hobbit who inherits a powerful and dangerous ring from his uncle, Bilbo. The ring, created by the dark lord Sauron, has the power to control all other rings and enslave the world. Frodo sets out on a perilous journey with a small group of companions, known as the Fellowship, to destroy the ring in the fires of Mount Doom, where it was forged. Along the way, they encounter treacherous enemies, unexpected allies, and face immense challenges that test their courage and loyalty. The fate of Middle-earth rests on their success or failure.



I use the ai-generated "Tagline" and any calibre tags to generate the cover, as the cover generation API is limited to 400 characters. Did I mention that cover generation is underwhelming?
Attached Thumbnails
Click image for larger version

Name:	Sample Cover.jpg
Views:	1233
Size:	7.1 KB
ID:	201852  
Bradles is offline   Reply With Quote
Old 06-03-2023, 09:10 PM   #3
colinsky
Addict
colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.
 
colinsky's Avatar
 
Posts: 238
Karma: 3500000
Join Date: Sep 2009
Device: Sony PRS-300, PRS-T1, PRS-T3
Quote:
Originally Posted by Bradles View Post
  • I am willing to wear a cost of about US$10/month, which would account for about 10,000 summaries. This means cover generation would not be allowed. (Cover generation costs about 2c/image.)
  • Would people be willing to set up their own OpenAI account, for which they would need to provide payment details to OpenAI and enter the API key in the plugin config? Then the user base could generate all the content they desired.
I'm skeptical how sustainable self-funding would be beyond a small group of users. The Ebook Translator plugin does what you are asking about (basically, bring your own credentials) and I have not seen any complaint or concern; that being said, it does also offer a credential-free Google Translate option too for those who don't want to go through that.

Quote:
Originally Posted by Bradles View Post
  • The plugin also generates book covers - really badly.
I've had...I guess I could say, useful results generating cover images from official publisher blurbs (though usually wordsmithed a bit to keep within word count limitations) combined with a contextual request ("image suitable for a book cover for a mass-market airport-style paperback edition", etc.) Any generated text is of course, slightly less than meaningful.

I'm also excited by the approached prototyped in the Kindlefusion project to generate textual illustrations from a selected snippet of text. I've done the same kind of cut-and-paste manually in order to visualize scenes from what I was reading. This could be automated, but you'd need some mechanism to evaluate which textual passages might be meaningful ones to illustrate. (Mobileread discussion of the same)

@mikhail_fil: You might also want to take a look at Google's Talk To Books to see if that provides anything relevant to your use case. It's basically a more conversational-style shell over the text search function from Google Books.
colinsky is offline   Reply With Quote
Old 06-03-2023, 09:33 PM   #4
colinsky
Addict
colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.colinsky ought to be getting tired of karma fortunes by now.
 
colinsky's Avatar
 
Posts: 238
Karma: 3500000
Join Date: Sep 2009
Device: Sony PRS-300, PRS-T1, PRS-T3
Bing Create (DALL-E) based upon the following:
Quote:
"Shane Collins, a world-weary CIA spy, is ready to come in from the cold. Stationed in Bahrain off the coast of Saudi Arabia for his final tour, he has little use for his mission—uncovering Iranian support for the insurgency against the monarchy. He certainly has no use for his naïve and ambitious twenty-eight-year-old station chief. Then Collins meets Almaisa, a beautiful and enigmatic artist, and his eyes are opened to a side of Bahrain most expats never experience, to questions he never thought to ask."
Details are often wrong, but generally the result, for me, fits in well with the appropriate genre of the text.
Attached Thumbnails
Click image for larger version

Name:	_2feeb113-65f6-41dd-8105-6e2736857938.jpg
Views:	517
Size:	127.9 KB
ID:	201854   Click image for larger version

Name:	_f65394f4-ae90-44a7-9f46-6f8d8c68e7e5.jpg
Views:	507
Size:	170.1 KB
ID:	201855  
colinsky is offline   Reply With Quote
Old 11-17-2023, 08:00 PM   #5
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
New gpt-4-turbo and DALL-E 3 Results

I've had some good results after updating the plug-in to the latest versions of OpenAI's tools. Here's a summary and cover for Weyward by Emilia Hart.

Quote:
Tagline: "Three women, three centuries, one haunting connection."

Summary:
"Weyward" by Emilia Hart is a captivating novel that weaves together the lives of three women across three different centuries, all bound by the enigmatic legacy of Weyward cottage. The story unfolds through the perspectives of Altha, Kate, and Violet, each woman grappling with her own struggles and the weight of societal expectations.

In the 17th century, Altha is accused of witchcraft amidst the paranoia and superstition of the time. Her connection to the natural world and her defiance against the rigid norms of womanhood make her a target for the witch trials that sweep through her village.

Fast forward to the 19th century, where we meet Kate, a woman who finds herself trapped in an oppressive marriage. When she inherits Weyward cottage, she sees a chance for a new beginning. However, the cottage and its history hold secrets that Kate must confront if she is to find her own path to freedom.

In the present day, Violet is dealing with the aftermath of a personal tragedy. When she learns that she is the last remaining descendant of the Weyward bloodline, she is drawn to the cottage that has been a silent witness to her family's history. As she delves into her ancestors' past, Violet uncovers the strength and resilience that run through the women of her lineage.

"Weyward" is a tale of female empowerment, resilience, and the unbreakable bonds that connect women through time. Emilia Hart masterfully intertwines the supernatural with the historical, exploring themes of identity, legacy, and the enduring power of nature.
The use of Weyward is significant, as it was released in February 2023 and the previous version of the AI couldn't find any information or just made something up. The latest version of the AI has knowledge up to April 2023.

(Image cropped and resized for web. Original size is 1024 x 1792.)

Attached Thumbnails
Click image for larger version

Name:	AI Book Cover 1.jpg
Views:	963
Size:	66.2 KB
ID:	204778  

Last edited by Bradles; 11-17-2023 at 08:09 PM. Reason: Violated guidelines
Bradles is offline   Reply With Quote
Old 11-17-2023, 08:03 PM   #6
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
The plugin isn't shared by-the-way, just thought you might be interested.

Also, the image cost 12c (US) to generate

Last edited by Bradles; 11-17-2023 at 08:05 PM. Reason: $
Bradles is offline   Reply With Quote
Old 11-17-2023, 08:06 PM   #7
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: 20,994
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Bradles - see Guideline 9

Quote:
Images included in posts must be no more than 600x600 pixels.
BR
BetterRed is offline   Reply With Quote
Old 06-19-2024, 08:58 PM   #8
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 238
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by Bradles View Post
  • The plugin does not use the text of the book. It simply uses the title and author and asks the AI to generate content.
  • Using the entire text of the book would be technically infeasable and expensive.
It would? Tabby, for example, can index hundreds of git repos for improving its competition suggestions.

I'm interested in a related, possible "deep search" plugin that utilizes the full-text index/database for AI-informed searching (or summarizing).
Geremia is offline   Reply With Quote
Old 06-19-2024, 11:00 PM   #9
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Quote:
Originally Posted by Geremia View Post
It would?
Well, that was 12 months ago; practically a generation in AI development.

My feeling is that calibre forum users have no interest in AI. Actively despise it you might say. I haven't pursued the idea any further. (Thanks for the referral though, BR .)

Having said that, why use the full-text index? It would more likely confuse the AI. Just send the whole book if the AI can handle it. There are several LLMs that can handle 100,000+ words, even over a million.

The issue will be cost though. OpenAI GPT-4o, for example, has 128k token context (about 100,000 words):

Input: USD 5.00 / 1M tokens (about 750,000 words)
Output: USD 15.00 / 1M tokens

It'll add up quickly!
Bradles is offline   Reply With Quote
Old 06-20-2024, 03:01 PM   #10
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,341
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Did I mention such a plug-in would use an immoral amount of environment resources, be based on plagiarism or be inaccurate?

It's a lie.
Quoth is offline   Reply With Quote
Old 06-20-2024, 08:15 PM   #11
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Quote:
Originally Posted by Quoth View Post
Did I mention such a plug-in would use an immoral amount of environment resources, be based on plagiarism or be inaccurate?

It's a lie.
What's a lie? What you just said?
Bradles is offline   Reply With Quote
Old 06-21-2024, 05:37 AM   #12
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,341
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
The claims about LLM / AI by large corporations are lies, hype and misdirection.
Quoth is offline   Reply With Quote
Old 06-29-2024, 02:42 AM   #13
YGKGamer
Junior Member
YGKGamer began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kindle Paper White
Quote:
Originally Posted by Bradles View Post
[*]Would people be comfortable knowing that my backend infrastructure could log their API key, as well as the content of the prompt and response. I wouldn't of course, but there's no way to prove this.[/LIST]
I am assuming that if you can log the API key then you get access to the person's account. Why not make the login info required each time and it is not saved so that way you do not have access? Or force the user to use an authenticator like duo mobile. If my assumption is incorrect, then sorry, and please disregard this post.
YGKGamer is offline   Reply With Quote
Old 06-30-2024, 11:16 PM   #14
Bradles
Connoisseur
Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.Bradles is not intimidated by interfenestral monkeys.
 
Bradles's Avatar
 
Posts: 80
Karma: 26914
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Quote:
Originally Posted by YGKGamer View Post
I am assuming that if you can log the API key then you get access to the person's account. Why not make the login info required each time and it is not saved so that way you do not have access? Or force the user to use an authenticator like duo mobile. If my assumption is incorrect, then sorry, and please disregard this post.
Your assumption is incorrect, but I won't disregard your post as you've shown genuine interest in AI and not just responded with FUD.

The API key doesn't give access to the account, but it does allow use of the account, i.e. expense would be incurred.

The way I designed my solution, and the way most APIs work, the API key is required for every call to the backend LLM. So the plugin would call my API, and my API would call the backend LLM, passing along the API key.

Anyway, it's a moot point, as I won't release this plugin due to lack of interest.
Bradles is offline   Reply With Quote
Reply

Tags
chatgpt, llm, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Scroll Book Details Bradles Plugins 13 01-08-2024 11:32 PM
[GUI Plugin] Author Book Count Hierarchy DaltonST Plugins 60 04-15-2023 03:38 PM
[GUI Plugin] Author Book Count DaltonST Plugins 55 10-20-2022 12:59 PM
How to get the uuid of the book in the code of the gui plugin? esvorontsov Development 3 09-29-2015 12:15 PM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 08:47 PM


All times are GMT -4. The time now is 10:34 AM.


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