Skip to content

Commit

Permalink
feat(multi-select): add multi select feature (briansunter#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
briansunter authored Mar 14, 2023
1 parent f8f9416 commit 51101dd
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 39 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

![logseq gpt3 openai demo](docs/summarize.gif)

Follow me on Twitter for updates and examples of how I use this plugin: [@bsunter](https://twitter.com/bsunter)
[![](docs/follow.png)](https://twitter.com/bsunter)
# Usage

## `gpt`
Expand All @@ -33,6 +35,8 @@ To bring up the gpt popup, use the keyboard shortcut `cmd+g`, or select `gpt` fr

If you are currently in a block, the plugin will use the text in the block as input to the prompt.

You can click and drag or shift+click to select multiple blocks to use as input to the prompt.

If you are not in a block, the plugin won't add any additional input text to your prompt, and will append the results of the prompt to the bottom of the page.

After selecting the prompt and generating a response, a preview of the response will be shown in the popup. You can click the `Insert` button or press the enter key to insert the response into the page.
Expand Down Expand Up @@ -120,7 +124,10 @@ This will generate an image using the DALL-E model, save the image to the `asset

![logseq dalle](docs/dalle.gif)

#### Select Multiple Blocks
You can click and drag or shift+click to select multiple blocks to use as input to the prompt.

![multi select](docs/multi-select.gif)
### ChatGPT Guidance
You can adjust the `chatPrompt` setting to adjust how ChatGPT should respond to your input. By default, the setting is set to `Do not refer to yourself in your answers. Do not say as an AI language model...` to prevent the model from including unnecessary text in the response.

Expand All @@ -140,22 +147,12 @@ Use the `Inject Prefix` options in the setting to set the prefix. You can add a

![inject tag](docs/inject-quote.gif)



### OpenAI Examples

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

## 📝 Table of Contents

- [About](#about)
- [Examples with GIFs](#examples)
- [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>

Expand Down
Binary file added docs/follow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/multi-select.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 34 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
"clsx": "^1.2.1",
"exponential-backoff": "^3.1.0",
"fuse.js": "^6.6.2",
"immer": "^9.0.19",
"openai": "^3.2.1",
"postcss": "^8.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.2.4",
"toml": "^3.0.0"
"toml": "^3.0.0",
"use-immer": "^0.8.1"
},
"logseq": {
"name": "logseq-plugin-gpt3-openai",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 51101dd

Please sign in to comment.