A plugin for GPT-3 AI assisted note taking in Logseq

Overview

Project logo Project logo

logseq-plugin-gpt3-openai

Status GitHub Issues GitHub Pull Requests License


A plugin for GPT-3 AI assisted note taking in Logseq

Usage

Just type /gpt3 in a block or select gpt3 from the block menu.

See here for example usages.

Demo

logseq gpt3 openai demo

đź“ť Table of Contents

About

logseq-plugin-gpt3-openai allows users to generate human-like text using GPT-3 within the LogSeq editor.

Write a GPT-3 command in a block, then run the open gpt3 command via the slash or block menu. The plugin will generate a GPT-3 response using the OpenAI API and insert it beneath the block.

Getting Started

Example Use Cases

Summarizing or explaining a block of text

logseq gpt3 openai tldr

Creating bullet point outlines for a given topic

logseq gpt3 openai outline

Creating study plan for a given topic

logseq gpt3 openai study

Write a travel itinerary

Explain how to do something

logseq gpt3 openai workout

Parse tabular data from plain english

logseq gpt3 openai table

  • Generate code to do a given task

  • Correct grammar

  • Translate into other languages

  • Classification and keyword tagging of text

  • Generate lists of given topics

    • List 10 top selling science fiction books
  • Write about a given topic

    • Write a tagline for an ice cream shop.
  • Answer Questions

    • Q: How does a telescope work?

Just for fun

Crazy recipes

]

FAQ

What is GPT-3 and OpenAI, and how does it work?

See this article for a good overview.

I see an "OpenAI Plugin Error"

openai]

  • Open the developer tools (Menu -> View -> Toggle Developer tools)

  • See if you can figure out the error on your own. Maybe you had a network issue if it says something like "timed out." Sometimes the OpenAI API has issues. You also have a limited number of tokens, so you may run out and need to refill. You may be hitting a rate limit.

  • If you can't figure it out based on the error message and it doesn't go away. Make an issue on GitHub.

Prerequisites

An API key from OpenAI Click here to get one

Installing

npm i

Running the tests

  • Add Tests

Build

npm run build

đź’» Local Development

This enables the local dev server with hot reloading, via the logseq vite plugin.

npm i
npm run dev

Prod build

First run npm i and npm run build

Open LogSeq

Go to Settings > Turn on Developer Mode

This will bring up the "Plugins" entry in three dots more menu list on the top right of the head bar. Go to Plugins page, and you will get a button with the Load unpacked plugin label. Select the root folder of this plugin repo.

Make sure you add your OpenAI Key

🚀 Deployment

Creates a build using semantic release when a commit is pushed with a smart commit message.

Built Using

  • LogSeq - Privacy-first, open-source knowledge base that works on top of local plain-text Markdown and Org-mode files.
  • Vite - Next Generation Frontend Tooling

Contributing

Do you have a bug or idea? I would love to hear from you! Open a Github issue here.

PRs welcome. Open an issue to discuss first if possible.

Authors

Acknowledgements

Comments
  • Plugin Error

    Plugin Error

    Thanks for the GPT3 plugin! Unfortunately, i'm consistently getting OpenAi Plugin Error with each /gpt3 request.

    Screenshot 2022-06-06 at 10 17 52

    I created a new api key specifically for this plugin and OpenAI shows it has been used, so looks like an authenticated request was sent by the plugin and received by openai.

    The console doesn't show much else apart from a 400 error. Screenshot 2022-06-06 at 10 17 33

    Could you please help me find a solution?

    opened by ajk68 4
  • Plugin Settings do not open to insert API Key

    Plugin Settings do not open to insert API Key

    I'm trying to install the GPT3-OpenAI plugin in my LogSeq graph and I can't seem to open the plugin settings, nothing happens when I click the gear button.

    Can this be an issue with the plugin or can it be from LogSeq?

    Thanks.

    opened by CSilvaGit 3
  • OpenAI plugin Error  on logseq

    OpenAI plugin Error on logseq

    image

    i just installed the plugin . placed the api key correctly .

    my observation .

    after i type my query . firstly one request to the openai api is sent and got 404 error , later openai plugin error occured . later another request was made automatically . but playload seems weird

    image

    opened by baramsivaramireddy 2
  • Does the plugin take into account previous text blocks?

    Does the plugin take into account previous text blocks?

    I love how the GPT-3 plugin works as it is, and I would gladly use it even further. For instance, for Q&A style investigations into a certain topic. Those require that I send the entire conversion to the API, as it builds up. From my understanding, currently only the immediate text block is being processed. Is this the case, and do you have plans to extend it to take into account parent and sibling nodes as well?

    P.S. I have not checked the code, so please, forgive me if it is already working. I could not find a suitable example in your list, which is why I am raising the issue.

    opened by preslavrachev 2
  • Insert page reference at the beginning of each GPT-3 output

    Insert page reference at the beginning of each GPT-3 output

    Hi there,

    Thank you so much for your work! Would it be possible to have the plugin assign a customizable page reference to each output that the plugin copies into the journal?

    I'd really like to be able to see which parts of information on a page is from me and which are from GPT-3. I'd also like to be able to quickly find all AI-generated outputs in my journal. If the plugin could insert a default page reference (say, [[GPT-3]]) it would allow the user to do both very easily.

    Thank you!

    opened by pgrosskurth 1
  • Unable to Install Plugin on Logseq marketplace

    Unable to Install Plugin on Logseq marketplace

    Error message displayed: "[Error] :release-channel-issue "request to https://api.github.com/repos/briansunter/logseq-plugin-gpt3-openai/releases/latest failed, reason: getaddrinfo ENOTFOUND api.github.com"]"

    Screenshot 2022-12-08 at 3 22 58 PM
    opened by brodycandela 1
  • feat(error-handling): Improve error handling and messaging

    feat(error-handling): Improve error handling and messaging

    OpenAI will return a 429 error when your free trial is over or you run out of credits. It will also return a 429 error if you call the API too fast. This PR will show a better error message when you run out of credits, and retry behind the scenes for normal rate limiting errors.

    released 
    opened by briansunter 1
  • Retry on 429 errors and improve error logging

    Retry on 429 errors and improve error logging

    OpenAI will rate limit you if you call them too often. https://help.openai.com/en/articles/5955598-is-api-usage-subject-to-any-rate-limits

    This PR adds exponential backoff so it waits and retries a few times when it sees this error, which is usually enough to resolve the issue.

    It also adds improved error logging, and shows the error messages that the OpenAI server is sending.

    I need to prevent retrying if it’s a quota error to

    released 
    opened by briansunter 1
  • Send Context, Children, and multiple blocks

    Send Context, Children, and multiple blocks

    Add option to include children or ancestors

    https://discord.com/channels/725182569297215569/983209587379417108/983549144952082442

    Have one feature request :). It seems to me the plugin does not remember the previous input (see the image attached). It would be great if the previous input can be stored and used in the conversation. Thanks again for the plugin!

    Seems to work and remember context if i just combine the children and send them all together

    What is your name? My name is Sarah. What was it like growing up? I had a great childhood. I was very active and loved spending time outside. What do you mean by that? I was always outside playing with my friends or exploring. I loved being active and didn't like sitting still for too long.

    enhancement 
    opened by briansunter 1
  • [fix] Updating temperature and tokens causes error

    [fix] Updating temperature and tokens causes error

    Unfortunately it saves these values as a string. I need to parse them to an int before sending them. It works if you don't adjust these though. The fix is to manually edit settings.json and reload.

    released 
    opened by briansunter 1
  • Text input and output transformations

    Text input and output transformations

    Allow users to process text input before sending it to gpt3 and process the output, using regex and javascript

    For example, extracting all highlights on the page or blocks with a certain tag.

    Or processing the output, such as splitting up a list into multiple blocks.

    enhancement 
    opened by briansunter 0
  • FR: Mem-style note aware prompts

    FR: Mem-style note aware prompts

    Would it be possible to do a mem-style feature by utilizing search first within the graph then sending the relevant results as part of the prompt to gpt3?

    This might even be more useful or effective than fine tuning since fine tuning doesn't teach facts well.

    enhancement 
    opened by arminta7 3
  • Progress indicator

    Progress indicator

    Would be great to have any kind of feedback, that the command is accepted and being processed. Even a temporary text placeholder with ⏳ would be better than nothing.

    P.S. thanks for the plugin! 🙏

    enhancement 
    opened by oluckyman 1
  • "Unkown OpenAI error" when chosing gpt-block oder gpt-page

    I installed the plugin and also inserted an API Key, but when i try to use gpt3 i get "Unknown OpenAI Error". Im running version 08.11 windows of logseq. Interestingly the dalle command works fine

    opened by fhold 1
Releases(v1.5.0)
A simple gpt-3 integration with Logseq

Readme Using GPT-3 in [[logseq]] is actually remarkably easy. The folks over at OpenAI have built a really powerful model with pretty good documentati

null 26 Jul 19, 2022
A all around note taking and viewing portal for students as well as teachers.

Notetal Portal to notes for students and teachers. With Notetal you can take notes as well as view notes taken by others. Features Powerful Editor: A

Alson Garbuja 2 Jun 13, 2022
An end-to-end encrypted note taking alternative to Evernote

Notesnook An end-to-end encrypted note taking alternative to Evernote. Website | About us | Roadmap | Downloads | Twitter | Discord To celebrate the o

Streetwriters 4.9k Dec 28, 2022
✏️ A new tab extension for convenient note-taking

MDTab Write quick notes in Markdown on any new tabs! Installation Right now MDTab has only been tested on Chrome (brave browser). You can install it f

Ian Huang (Shaoru) 8 Nov 11, 2022
Logseq-craft-theme - Craft Theme for Logseq

Craft for Logseq Almost all creativity requires purposeful play. A Craft insprir

Alexander Rink 33 Oct 26, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Obsidian text generator Plugin Text generator using GPT-3 (OpenAI)

is a handy plugin for Obsidian that helps you generate text content using the powerful language model GP

null 356 Dec 29, 2022
This is an Obsidian plugin for taking math notes using Excalidraw.

Obsidian Math+ Obsidian Math+ is a plugin for taking math notes quickly and efficiently. Usage Run the Insert math block command, either using the com

Oscar Capraro 29 Dec 30, 2022
Labels issues using OpenAI's Classification API powered by GPT-3 models!

OpenAI Issue Labeler ?? This GitHub action labels issues using OpenAI's Classification API powered by GPT-3 models! We are using curie as our completi

Austen Stone 11 Dec 21, 2022
A simple CLI experiment that writes recommendation of GitHub repository/project in form of tweet. Powered by OpenAI GPT-3.

GitHub Repo Recommendation Writer A simple CLI experiment that writes recommendation of GitHub repository/project in form of tweet. Powered by OpenAI

Viktor Bezdek 5 Jul 18, 2022
App that leverages GPT-3 to facilitate new language listening and speaking practice.

Talk w/GPT-3 app: Getting started The Talk w/GPT-3 application was developed by James L. Weaver (the author of this document) to get more new language

James Weaver 47 Jan 1, 2023
GPT-3 powered cli tool to help with bash commands you can't remember

qwery GPT-3 powered cli tool to help with bash commands you can't remember eg $ qw ffmpeg command to transcode mp4 to mov QWERY RESULT: ffmpeg -i inpu

Aaron Peddle 4 Oct 31, 2022
This repository contains a fullstack chatbot project based on the ChatGPT `gpt-3.5-turbo` model.

This is a fullstack chatbot created with React, Nodejs, OpenAi, and ChatGPT while developing the following tutorial: How To Build A Chat Bot Applicati

NJOKU SAMSON EBERE 6 May 10, 2023
An example implementation of the slack-gpt starter which ingests confluence pages to create a helpful slack bot

Slack-GPT (HR bot example implementation) Table of Contents Introduction Prerequisites Creating and installing the application Configuration Starting

Martin Hunt 17 Jul 31, 2023
Chat with GPT from the terminal, with the ability to execute shell scripts.

ChatSH Chat with GPT from the terminal, and let it execute shell scripts and perform tasks for you. What could go wrong? Example Why? The reason I'm p

Victor Taelin 47 Jun 11, 2023
yet another 2048, but this time it's controlled by GPT

2048 About a few years ago, I built 2048.wasm This is yet another 2048 from me, but this time it's controlled by GPT. Demo 2048-short.mov How GPT crus

Nishchith Shetty 43 Jul 17, 2023
A logseq plugin to extract tweets. Optionally tag the tweet's author as well.

Logseq Twitter Extractor Plugin If this plugin helps you, I'd really appreciate your support. You can buy me a coffee here. A quick utility to parse a

null 17 Nov 17, 2022