https://github.com/ahonn/logseq-plugin-ai-assistant
A powerful tool that enhances your Logseq experience by allowing you to interact with AI models like OpenAI's gpt-3.5-turbo.
https://github.com/ahonn/logseq-plugin-ai-assistant
chatgpt langchain-js logseq-plugin notion-ai openai
Last synced: 4 months ago
JSON representation
A powerful tool that enhances your Logseq experience by allowing you to interact with AI models like OpenAI's gpt-3.5-turbo.
- Host: GitHub
- URL: https://github.com/ahonn/logseq-plugin-ai-assistant
- Owner: ahonn
- License: mit
- Created: 2023-03-17T03:37:48.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-27T01:11:23.000Z (11 months ago)
- Last Synced: 2025-07-11T23:37:15.444Z (7 months ago)
- Topics: chatgpt, langchain-js, logseq-plugin, notion-ai, openai
- Language: TypeScript
- Homepage:
- Size: 264 KB
- Stars: 52
- Watchers: 3
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Logseq AI Assistant
A powerful tool that enhances your Logseq experience by allowing you to interact with AI models like OpenAI's `gpt-3.5-turbo`.
With this plugin, you can effortlessly generate or transform text using custom prompts,
enabling you to achieve more efficient and creative workflows within Logseq.

> Inspired by [Notion AI](https://www.notion.so/product/ai) and [Raycast AI](https://www.raycast.com/ai)
## Features
- Seamless integration with Logseq
- Customizable prompt support
- Easy-to-use built-in prompts
- Using a custom Open AI basePath
## Install
### Option 1: directly install via Marketplace
### Option 2: manually load
- turn on Logseq developer mode
- [download the prebuilt package here](https://github.com/ahonn/logseq-plugin-ai-assistant/releases)
- unzip the zip file and load from Logseq plugins page
## Configuration
Before using the plugin, you need to configure it according to your preferences.
- **API Key**: Enter your OpenAI API key in this field. If you don't have an API key yet, visit the [OpenAI](https://platform.openai.com/account/api-keys) to obtain one.
- **Model**: Choose the OpenAI model you want to use, such as "gpt-3.5-turbo". Different models may offer varying levels of performance and text generation capabilities.
- **Custom Prompts**: Enable this option if you want to use custom prompts for generating or transforming text. You can add, edit, or remove prompts in the prompts array.
## Built-in Prompts
The plugin comes with several built-in prompts to enhance your text editing experience
- **Ask AI**: Ask a question, and the AI will provide a helpful answer.
- **Summarize**: Provide a concise summary of the text.
- **Make Shorter**: Shorten the text while maintaining its key points.
- **Make Longer**: Expand the text, providing more details and depth.
- **Change Tone to Friendly**: Rewrite the text with a friendly tone.
- **Change Tone to Confident**: Rewrite the text with a confident tone.
- **Change Tone to Casual**: Rewrite the text with a casual tone.
- **Change Tone to Professional**: Rewrite the text with a more professional tone.
- **Explain This**: Provide a clear explanation for the text or code snippet.
- **Generate Ideas**: Generate creative ideas related to the selected topic.
See all built-in prompts [here](https://github.com/ahonn/logseq-plugin-ai-assistant/tree/master/src/prompts)
## How to Use a Custom Prompt
- Open the plugin settings and locate "customPrompts" field.
- Add the following JSON object to the "prompts" array:
```json
{
"apiKey": "",
"model": "gpt-3.5-turbo",
"customPrompts": {
"enable": true, // <- Make sure to enable this.
"prompts": [
{
"name": "Markdown Table",
"prompt": "Please generate a {{text}} Markdown table",
"output": "replace" // "property", "replace" or "insert"
}
]
},
"disabled": false
}
```
- In the Logseq editor, focus the cursor on the place where you want to generate the table and do the following.

## Contribution
Issues and PRs are welcome!
## Licence
MIT
## How to Specify a Model for Individual Custom Prompts
- Open the plugin settings and locate the "customPrompts" field.
- Add the following JSON object to the "prompts" array, specifying a model for an individual prompt:
```json
{
"apiKey": "",
"model": "gpt-3.5-turbo",
"customPrompts": {
"enable": true, // <- Make sure to enable this.
"prompts": [
{
"name": "Markdown Table",
"prompt": "Please generate a {{text}} Markdown table",
"output": "replace", // "property", "replace" or "insert"
"model": "gpt-4" // Specify the model for this prompt
}
]
},
"disabled": false
}
```