aboutsummaryrefslogtreecommitdiff
path: root/src/ollama.tsx
diff options
context:
space:
mode:
authorgixita <kris.laermans@gmail.com>2024-02-10 15:03:39 +0100
committergixita <kris.laermans@gmail.com>2024-02-10 15:03:39 +0100
commitfe8403156aa664c8fb203bddc243eb6fc4448b1a (patch)
tree0b85aea29fe83abe0cb2aa3eae42c7710f97b57a /src/ollama.tsx
parentfc1d6985c9eb0c31b8ea05244e4a270d9ec8ffaa (diff)
downloadollama-logseq-fe8403156aa664c8fb203bddc243eb6fc4448b1a.tar.xz
ollama-logseq-fe8403156aa664c8fb203bddc243eb6fc4448b1a.zip
Move the custom prompt trigger on the block command
Diffstat (limited to 'src/ollama.tsx')
-rw-r--r--src/ollama.tsx17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/ollama.tsx b/src/ollama.tsx
index 4fe697f..e59c633 100644
--- a/src/ollama.tsx
+++ b/src/ollama.tsx
@@ -186,23 +186,6 @@ export async function summarizeBlock() {
}
}
-export async function customPromptBlock() {
- try {
- if (!logseq.settings) {
- throw new Error("Couldn't find ollama-logseq settings")
- }
-
- // TODO: Get contnet of current block and subblocks
- const currentBlock = await logseq.Editor.getCurrentBlock()
- let customPromptBlock = await logseq.Editor.insertBlock(currentBlock!.uuid, `⌛Apply custom prompt...`, { before: false })
- const customPrompt = await promptLLM(`${logseq.settings.custom_prompt_block} ${currentBlock!.content}`);
-
- await logseq.Editor.updateBlock(customPromptBlock!.uuid, `${customPrompt}`)
- } catch (e: any) {
- logseq.App.showMsg(e.toString(), 'warning')
- console.error(e)
- }
-}
async function getOllamaParametersFromBlockProperties(b: BlockEntity) {