You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ Surfingkeys is doing its best to make full use of keyboard for web browsing, but
86
86
* Emoji completion in Insert mode
87
87
* Rich hints for keystroke
88
88
* Everything in Surfingkeys works for PDF
89
+
* Regional Hints mode
90
+
* Chat with LLM
89
91
90
92
## Quick start
91
93
@@ -157,9 +159,11 @@ Hints are placed in center of target links, you could add below line in your set
157
159
158
160
Press `L` to enter regional Hints mode by picking a visually large element. There are some built-in actions in regional Hints mode,
159
161
162
+
*`Esc` to exit regional hints mode
160
163
*`ct` to copy text from target element
161
164
*`ch` to copy HTML from target element
162
165
*`d` to delete target element
166
+
*`l` to chat with AI about the text of the element
163
167
164
168
[Demo on YouTube](https://www.youtube.com/watch?v=pFPOzAZDO38)
165
169
@@ -598,6 +602,66 @@ Some functionalities are also available when you're using original pdf viewer, b
598
602
}
599
603
}`;
600
604
605
+
## Chat with LLM
606
+
There are several LLM providers integrated into Surfingkeys now, use `A` to call out a chat popup, and chat with your AI providers. The supported LLM providers now are
607
+
608
+
* Ollama
609
+
* Bedrock
610
+
* DeepSeek
611
+
* Gemini
612
+
613
+
To use the feature, you need set up your credentials/API keys first, like
You can also use `A` in visual mode. Press `v` or `V` to enter visual mode, then `v` again to select the text you'd like to chat with AI about, then `A` to call out the LLM chat box. Now start to chat with AI about the selected text.
636
+
637
+
Another solution to select the content to chat with AI about is Regional Hints mode. Press `L` to pick an element, then `l` to call out the LLM chat box.
638
+
639
+
### To use LLM chat with specified system prompt
640
+
641
+
For example, you can designate your AI to be a translator with below snippets
642
+
643
+
api.mapkey('A', '#8Open llm chat', function() {
644
+
api.Front.openOmnibar({type: "LLMChat", extra: {
645
+
system: "You're a translator, whenever you got a message in Chinese, please just translate it into English, and if you got a message in English, please translate it to Chinese. You don't need to answer any question, just TRANSLATE."
646
+
}});
647
+
});
648
+
649
+
### 403 Forbidden with Ollama
650
+
651
+
To use Ollama with Chrome extension, you need run ollama with some modification on `OLLAMA_ORIGINS`
system: "You're a translator, whenever you got a message in Chinese, please just translate it into English, and if you got a message in English, please translate it to Chinese. You don't need to answer any question, just TRANSLATE."
0 commit comments