aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Li <taweili@gmail.com>2023-12-12 18:28:03 +0800
committerDavid Li <taweili@gmail.com>2023-12-12 18:28:03 +0800
commite27523367460b4c602f9887119db65338609de68 (patch)
tree763ac2a7814bd9c4e4f176070467e1ab8482bc32
parentd215eea3cde99707380d1e8ee3e2daddb3b26ebf (diff)
downloadollama-logseq-e27523367460b4c602f9887119db65338609de68.tar.xz
ollama-logseq-e27523367460b4c602f9887119db65338609de68.zip
Add documentation for block ollama properties and
configuration page.
-rw-r--r--README.md27
-rw-r--r--docs/block-contxt-menu.gifbin0 -> 3633938 bytes
-rw-r--r--docs/block-properties.pngbin0 -> 80560 bytes
-rw-r--r--docs/config-page.pngbin0 -> 75094 bytes
4 files changed, 26 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0e4cf0f..11a382c 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,6 @@ A plugin to integrate [ollama](https://github.com/jmorganca/ollama) with [logseq
- Summarize Block
- Create a flash card
- Divide a todo task into subtasks
-- Get model from block properties
- Respects theming
- Context menu commands
- Summarize Block
@@ -27,8 +26,34 @@ A plugin to integrate [ollama](https://github.com/jmorganca/ollama) with [logseq
- A slash command via /ollama
- Button in tool bar
- Settings for changing the host of the model, the model itself and a shortcut to open the plugin command palette
+- Block properties to select model
+- Use configuration page `ollama-logseq-config` to add more context manual commands
+## Block Properties
+Ollama offers many different models to choose from for various of tasks. This feature configures model on the per block base and the attribute is also used by its immediate children while using context menu commands for blocks. The properties are named after the [Ollama's generate API](https://github.com/jmorganca/ollama/blob/main/docs/api.md#generate-a-completion) and currently, only the `model` is used. Add the `ollama-generate-model:: model_name` at the end of the block to specify the model to use for the block and its immediate children.
+```
+Write a SciFi story of Shanghai 2050.
+ollama-generate-model:: deepseek-llm:7b-chat
+```
+Currently, three context menu commands would be affected by this properties.
+- Ollama: Prompt from Block
+- Ollama: Summarize Block
+- Ollama: Expand Block
+![block-properties](./docs/block-properties.png)
+
+## Configuration Page `ollama-logseq-config`
+The plugin also reads the page `ollama-logseq-config` to add more context commands. The page should be a markdown page with the following format.
+
+```
+ollama-context-menu-title:: Ollama: Extract Keywords
+ollama-prompt-prefix:: Extract 10 keywords from the following:
+```
+
+![config-page](./docs/config-page.png)
+
+Each one of the block with these two properties will create a new context menu command after restarting logseq. The prefix is added in front of the text of the block when the command is invokved on the block.
+![contxt-menu](./docs/block-contxt-menu.gif)
# Demo
![demo](./docs/demo.gif)
![summary](./docs/summary.gif)
diff --git a/docs/block-contxt-menu.gif b/docs/block-contxt-menu.gif
new file mode 100644
index 0000000..6963508
--- /dev/null
+++ b/docs/block-contxt-menu.gif
Binary files differ
diff --git a/docs/block-properties.png b/docs/block-properties.png
new file mode 100644
index 0000000..14adb57
--- /dev/null
+++ b/docs/block-properties.png
Binary files differ
diff --git a/docs/config-page.png b/docs/config-page.png
new file mode 100644
index 0000000..c81eb15
--- /dev/null
+++ b/docs/config-page.png
Binary files differ