Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-07-2023, 08:33 AM   #1
cdhigh
Enthusiast
cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.
 
Posts: 27
Karma: 98490
Join Date: Oct 2011
Device: KINDLE 3
Is it possible to develop a ChatGPT client for Kindle?


Is it possible to develop a ChatGPT client for Kindle?
While there are numerous ChatGPT apps available for mobile and desktop devices, I have yet to find one that is compatible with the Kindle. Although the Kindle does have an experimental web browser mode, it is unable to properly render the ChatGPT webpage, resulting in a blank page when attempting to access "chat.openai.com."

It would be greatly appreciated if someone could create a ChatGPT client that is compatible with the Kindle, whether it be in the form of a KUAL extension or any other suitable method.

Last edited by cdhigh; 05-07-2023 at 08:41 AM.
cdhigh is offline   Reply With Quote
Old 05-07-2023, 02:27 PM   #2
luketheduke
Connoisseur
luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.
 
luketheduke's Avatar
 
Posts: 86
Karma: 25554
Join Date: Sep 2022
Device: PW3, PW2, KT2, 2xKT, 2xK3G
Quote:
Originally Posted by cdhigh View Post

Is it possible to develop a ChatGPT client for Kindle?
While there are numerous ChatGPT apps available for mobile and desktop devices, I have yet to find one that is compatible with the Kindle. Although the Kindle does have an experimental web browser mode, it is unable to properly render the ChatGPT webpage, resulting in a blank page when attempting to access "chat.openai.com."

It would be greatly appreciated if someone could create a ChatGPT client that is compatible with the Kindle, whether it be in the form of a KUAL extension or any other suitable method.
Definitely possible. Would probably be pretty easy to write a simple python/bash script to run in Kterm. If I get time, I'll see what I can do.

Personally, I've set up a telnet server that I can connect to from any of my devices, including my kindle from Kterm. It works quite well. You can check it out here.
luketheduke is offline   Reply With Quote
Advert
Old 05-07-2023, 04:23 PM   #3
luketheduke
Connoisseur
luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.
 
luketheduke's Avatar
 
Posts: 86
Karma: 25554
Join Date: Sep 2022
Device: PW3, PW2, KT2, 2xKT, 2xK3G
Bash-gpt looks like an ideal solution. Needs `jq` to parse JSON, though.

You'd either have to:
  1. Cross-compile `jq` for the Kindle.
  2. Modify the script to use regex or something.
luketheduke is offline   Reply With Quote
Old 05-07-2023, 05:43 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,479
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by luketheduke View Post
Cross-compile `jq` for the Kindle.
Ought to be shipped in USBNetwork already .
NiLuJe is offline   Reply With Quote
Old 05-07-2023, 09:54 PM   #5
luketheduke
Connoisseur
luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.luketheduke knows what's going on.
 
luketheduke's Avatar
 
Posts: 86
Karma: 25554
Join Date: Sep 2022
Device: PW3, PW2, KT2, 2xKT, 2xK3G
Quote:
Originally Posted by NiLuJe View Post
Ought to be shipped in USBNetwork already .

This makes me very happy! Thanks!
luketheduke is offline   Reply With Quote
Advert
Old 06-22-2023, 08:26 AM   #6
cdhigh
Enthusiast
cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.
 
Posts: 27
Karma: 98490
Join Date: Oct 2011
Device: KINDLE 3
Quote:
Originally Posted by luketheduke View Post
Bash-gpt looks like an ideal solution. Needs `jq` to parse JSON, though.

You'd either have to:
  1. Cross-compile `jq` for the Kindle.
  2. Modify the script to use regex or something.
Thank you very much.
It took me a long time to response, but I finally replaced my non-jailbroken Kindle8 with a jailbreakable PW2.
When I tried this solution, I encountered some issues.
Here's steps:
1. Jailbreak
2. Installing KUAL, Usbnetwork, kterm
3. Download bash-gpt, execute and encountered an error in kterm:
line 137: syntax error: bad substitution
4. Then, I did some more searching and found another script called ai-bash-gpt, but it still has same error:
line 103: syntax error: unexpected redirection

I have no knowledge of Linux and Bash, so I have no idea how to fix it.

edited:
some code lines around line137 in bash-gpt:
Code:
133 bash_gpt_save_message() {
134     role="$1"
135     shift
136     content=$(echo "$@" | tr -d '\n')
137     content="${content@Q}"
138     content=$(echo "${content:1:-1}" | jq -R -s '.') # | sed 's/[$`]/\\&/g')
139     filepath=$(bash_gpt_subject_file $BASH_GPT_SUBJECT)
140     echo "{\"role\": \"$role\", \"content\": ${content}}" >> "$filepath"
141 }
some code line around line103 in ai-bash-gpt:
Code:
103  input=$(jq ".[-$CONVERSATION_BUFFER_LEN:]" <<<"$@")
104  while true; do
105    msg_buf_size=$(wc -c <<<"$input" | numfmt --to=iec)

Last edited by cdhigh; 06-22-2023 at 08:34 AM.
cdhigh is offline   Reply With Quote
Old 06-23-2023, 04:09 PM   #7
cdhigh
Enthusiast
cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.cdhigh makes omelettes without breaking eggs.
 
Posts: 27
Karma: 98490
Join Date: Oct 2011
Device: KINDLE 3
After a period of struggle, I finally managed to run ChatGPT successfully on Kindle. Here are the steps I followed:
1. Download the Bash file and copy it to the root directory of kindle (/mnt/us).
2. Modify the header of the AI bash script file to #!/mnt/us/bash.

here's the modified file, there might be some issues as I'm not familiar with Bash, so...
ai.zip

Click image for larger version

Name:	ai.jpg
Views:	134
Size:	111.0 KB
ID:	202225

also, you can edit menu.json of kterm extension to add a menu item in KUAL, it will like a real app.
kterm_menu_ai.zip

Click image for larger version

Name:	menu.jpg
Views:	116
Size:	104.6 KB
ID:	202227

Last edited by cdhigh; 06-24-2023 at 03:38 PM.
cdhigh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
E-Mail client (read/send messages) app for PocketBook. or webmail? pb611 PocketBook Developer's Corner 9 04-06-2013 01:12 PM
Kobo to develop app independent of Apple? OneandonlyDoc Kobo Reader 5 07-27-2011 12:37 PM
Android Juniper Networks releases Android client app for its SSL VPN hardware brauckmiller enTourage Archive 2 11-03-2010 04:23 PM
Android Remote Desktop Connection app (RDP client) borisb enTourage Archive 0 05-13-2010 06:48 PM


All times are GMT -4. The time now is 05:59 AM.


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