Skip to content

Commit

Permalink
feat: initial commit # => v1.0.0 on @latest
Browse files Browse the repository at this point in the history
  • Loading branch information
briansunter committed Jun 5, 2022
1 parent 73a3601 commit 0d4ebd2
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 2 deletions.
Binary file added logseq-plugin-plugin-gpt3-openai.zip
Binary file not shown.
21 changes: 21 additions & 0 deletions logseq-plugin-plugin-gpt3-openai/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions logseq-plugin-plugin-gpt3-openai/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "logseq-plugin-gpt3-openai",
"private": true,
"version": "0.0.1",
"main": "dist/index.html",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "^8.0.4",
"@semantic-release/npm": "9.0.1",
"conventional-changelog-conventionalcommits": "^5.0.0",
"semantic-release": "^19.0.2",
"typescript": "^4.5.4",
"vite": "^2.9.9",
"vite-plugin-logseq": "^1.1.2"
},
"dependencies": {
"@logseq/libs": "^0.0.6",
"openai": "^2.0.5"
},
"logseq": {
"name": "logseq-plugin-gpt3-openai",
"id": "_79n711y6e"
},
"peerDependencies": {
"semantic-release": "^19.0.2"
}
}
153 changes: 153 additions & 0 deletions logseq-plugin-plugin-gpt3-openai/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<p align="center">
<a href="" rel="noopener">
<img width=400px height=200px src="./docs/open-ai.webp" alt="Project logo"></a>
<img width=200px height=200px src="./docs/logseq.png" alt="Project logo"></a>
</p>

<h3 align="center">logseq-plugin-gpt3-openai</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/briansunter/logseq-plugin-gpt3-openai.svg)](https://github.com/briansunter/logseq-plugin-gpt3-openai)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/briansunter/logseq-plugin-gpt3-openai.svg)](https://github.com/briansunter/logseq-plugin-gpt3-openai)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

</div>

---

<p align="center"> A plugin for GPT-3 AI assisted note taking in Logseq
<br>
</p>

## Usage

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

[See here for example usages](https://beta.openai.com/examples).

## Demo

https://user-images.githubusercontent.com/2816289/171101687-0e4ebca3-5a05-4d40-b53f-9c67336cef44.mp4

## 📝 Table of Contents

- [About](#about)
- [Getting Started](#getting_started)
- [Deployment](#deployment)
- [Usage](#usage)
- [Built Using](#built_using)
- [TODO](../TODO.md)
- [Contributing](../CONTRIBUTING.md)
- [Authors](#authors)
- [Acknowledgments](#acknowledgement)

## About <a name = "about"></a>
`logseq-plugin-gpt3-openai` allows users to generate human-like text using GPT-3 within the LogSeq editor.

Just write a GPT-3 command in a block, then run the open `openai` command via the slash menu or the block menu. The plugin will generate a GPT-3 reponse using the OpenAI API and insert it beneath the block.

## 📖 Example Use Cases
- Summarizing or explaining a block of text


https://user-images.githubusercontent.com/2816289/171097277-bbf0ccc1-2730-4814-b2a6-079112024a75.mov


- Creating bullet point outlines for a given topic


https://user-images.githubusercontent.com/2816289/171097641-797e7693-2f98-47a7-aa2c-c8ae37aea888.mov

- Creating study plan for a given topic


https://user-images.githubusercontent.com/2816289/171098679-ce14a44d-b727-486b-8db5-80f0f5e1a34f.mov

- Explain how to do something


https://user-images.githubusercontent.com/2816289/171099995-8a6d8ec3-df61-4220-8a98-5c077cd78ca6.mp4


- Explaining code in human-understandable english


https://user-images.githubusercontent.com/2816289/171100160-cfadc07f-e522-4d64-9261-57191c8bf83c.mp4



- Generate code to do a given task
- Correct grammar
- Translate into other languages
- Parse tabular data from plain english

https://user-images.githubusercontent.com/2816289/171100243-7f155861-2e4d-4757-b7d4-8acd677f79b5.mp4

- 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?`

## Getting Started <a name = "getting_started"></a>
How to build and develop the project locally.

### Prerequisites

[An API key from OpenAI Click here to get one](https://beta.openai.com/account/api-keys)

### Installing

```
npm i
```

## Running the tests <a name = "tests"></a>
- [ ] Add Tests


## Build <a name="usage"></a>
```
npm run build
```

## 💻 Local Development

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

```
npm run dev
```

## Local Installation

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 top right of 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](https://beta.openai.com/account/api-keys)

## 🚀 Deployment <a name = "deployment"></a>

- [ ] Add to Logseq marketplace

## Built Using <a name = "built_using"></a>

- [LogSeq](https://logseq.com/) - Privacy-first, open-source knowledge base that works on top of local plain-text Markdown and Org-mode files.
- [Vite](https://vitejs.dev/) - Next Generation Frontend Tooling

## Authors <a name = "authors"></a>

- [@briansunter](https://github.com/birnaunster) - Author

## Acknowledgements <a name = "acknowledgement"></a>

- [OpenAI Examples](https://beta.openai.com/examples)
4 changes: 2 additions & 2 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ module.exports = {
"@semantic-release/exec",
{
prepareCmd:
"zip -qq -r logseq-plugin-plugin-gpt3-openai.zip dist readme.md logo.png LICENSE package.json",
"mkdir build && zip -qq -r build/logseq-plugin-plugin-gpt3-openai.zip dist readme.md logo.png LICENSE package.json",
},
],
[
"@semantic-release/github",
{
assets: "logseq-plugin-gpt3-openai.zip",
assets: "build/*.zip",
},
],
],
Expand Down

0 comments on commit 0d4ebd2

Please sign in to comment.