Coder Social home page Coder Social logo

ollama-logseq's Introduction

๐Ÿฆ™ ollama-logseq plugin

A plugin to integrate ollama with logseq

Get Started

  • First you will need to setup ollama you can check their github repo for instructions on how to setup ollama
  • That's it once you setup ollama you should be able to use the plugin with no problem

Features

  • The plugin currently has 6 commands
    • Ask Ai -> which is a prompt the AI freely without any context
    • Ask Ai with page context -> This is the same as Ask Ai but it gives the model the context of the current page
    • Ask Ai with block context -> This is the same as Ask Ai but it gives the model the context of the current block
    • Summarize Page
    • Summarize Block
    • Create a flash card
    • Divide a todo task into subtasks
  • Respects theming
  • Context menu commands
    • Summarize Block
    • Make a flash card
    • Divide task into subtasks
    • Prompt from block (uses the block as a prompt)
    • Custom prompt on block (uses the custom prompt defined in settings on the block)
    • Expand block
  • 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 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

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

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

Demo

demo summary context

Contribution

If you have any features suggestions feel free to open an issue

If this plugin helps you, I'd really appreciate your support. You can buy me a coffee here.

ollama-logseq's People

Contributors

omagdy7 avatar taweili avatar gixita avatar rominf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.