Skip to content

Commit

Permalink
docs: update readme for new settings parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuszik committed Dec 11, 2024
1 parent 97706f7 commit f6f268d
Showing 1 changed file with 49 additions and 33 deletions.
82 changes: 49 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,97 @@
# Auto Classifier
![GitHub release (latest by date)](https://img.shields.io/github/v/release/HyeonseoNam/auto-classifier?style=for-the-badge) ![GitHub all releases](https://img.shields.io/github/downloads/HyeonseoNam/auto-classifier/total?style=for-the-badge)

`Auto Classifier` is an [Obsidian](https://obsidian.md/) plugin that helps you automatically classify tag from your notes using the ChatGPT API. The plugin can analyze your note (It can be title, frontmatter, content or selected area) and suggest relevant tag based on the input with tags in your valut. This can be used for various and specific purposes, for example, DDC classification for books, keyword recommendation, research paper categorization and so on. Save you time and improving your note organization.
![GitHub release (latest by date)](https://img.shields.io/github/v/release/HyeonseoNam/auto-classifier?style=for-the-badge) ![GitHub all releases](https://img.shields.io/github/downloads/HyeonseoNam/auto-classifier/total?style=for-the-badge)

`Auto Classifier` is an [Obsidian](https://obsidian.md/) plugin that helps you automatically classify tag from your notes using any OpenAI compatible LLM-API. The plugin can analyze your note (It can be title, frontmatter, content or selected area) and suggest relevant tag based on the input with tags in your valut. This can be used for various and specific purposes, for example, DDC classification for books, keyword recommendation, research paper categorization and so on. Save you time and improving your note organization.

## How to use

- Enter your ChatGPT API key in setting tab. You can create it at [OpenAI](https://platform.openai.com/account/api-keys). Check api setting by the `Test API call` button.
- Configure your API settings in the settings tab:

- Enter your API key
- Optionally set a custom base URL (useful for proxies or alternative API
endpoints)
- Choose your preferred model
- Test your configuration using the Test API call button

- This plugin consists of **4 Input Commands** that you can run. By simply running these commands, it will automatically classify your note.

- `Classify tag from Note title`
- `Classify tag from Note FrontMatter`
- `Classify tag from Note Content`
- `Classify tag from Selected Area`

- This plugin consists of **4 Input Commands** that you can run. By simply running these commands, it will automatically classify your note.
- `Classify tag from Note title`
- `Classify tag from Note FrontMatter`
- `Classify tag from Note Content`
- `Classify tag from Selected Area`
- Toggle and Choose from different **Tag Reference** types. The LLM will select the appropriate tag from these references.

- Toggle and Choose from different **Tag Reference** types. ChatGPT will select the appropriate tag from these references.
- `All tags` (default)
- `Filtered Tags` with regular expression
- `Manual Tags` that defined manually
- `All tags` (default)
- `Filtered Tags` with regular expression
- `Manual Tags` that defined manually

- Specify the **Output Type** from the response of ChatGPT.
- `#Tag`: at your `Current Cursor` or `Top of Content`.
- `[[WikiLink]]`: at your `Current Cursor` or `Top of Content`.
- `FrontMatter`: with `key`
- `Title Alternative`: at the end of note's title
- Specify the **Output Type** from the response of the LLM.

- (Optional) Add `Prefix` or `Suffix` for the output format.
- `#Tag`: at your `Current Cursor` or `Top of Content`.
- `[[WikiLink]]`: at your `Current Cursor` or `Top of Content`.
- `FrontMatter`: with `key`
- `Title Alternative`: at the end of note's title

- (Optional) Your can use your custom request for the ChatGPT API.
- `Custom Prompt Template`
- ChatGPT will respond based on this prompt. The input coming from your Command will be replaced by `{{input}}`, and the reference tags you set will be placed in `{{reference}}`.
- `Custom Chat Role`
- You can guide ChatGPT's behabior by setting this system role
- (Optional) Add `Prefix` or `Suffix` for the output format.

- (Optional) Your can use your custom request for your selected API.
- `Custom Prompt Template`
- The LLM will respond based on this prompt. The input coming from your Command will be replaced by `{{input}}`, and the reference tags you set will be placed in `{{reference}}`.
- `Custom Chat Role`
- You can guide the AI's behavior by setting this system role

## Example

### Use Case #1: **Selected area** → **Current cursor**

![](img/selected_to_cursor.gif)

### Use Case #2: **Content** → **FrontMatter**

![](img/content_to_frontmatter.gif)

### Use Case #3: **FrontMatter** → **Title**

![](img/frontmatter_to_totle.gif)

### Use Case #4: **Title** → **FrontMatter**
![](img/title_to_frontmatter.gif)

![](img/title_to_frontmatter.gif)

### DDC number classification

If you want use this plugin as DDC number classification, edit `Custom Prompt Template` like this:

```
Please use Dewey Decimal Classification (DDC) to classify this content:
"""
{{input}}
"""
Answer format is JSON {reliability:0~1, output:"[ddc_number]:category"}.
Even if you are not sure, qualify the reliability and select one.
Answer format is JSON {reliability:0~1, output:"[ddc_number]:category"}.
Even if you are not sure, qualify the reliability and select one.
Convert the blank spaces to "_" in the output.
```

### LCSH classification
LCSH classification can be similar:

LCSH classification can be similar:

```
Please use Library of Congress Subject Headings (LCSH) to classify this content:
"""
{{input}}
"""
Answer format is JSON {reliability:0~1, output:"[First LCSH term]--[Second LCSH term]--[Third LCSH term]"}.
Even if you are not sure, qualify the reliability and select one.
Answer format is JSON {reliability:0~1, output:"[First LCSH term]--[Second LCSH term]--[Third LCSH term]"}.
Even if you are not sure, qualify the reliability and select one.
Convert the blank spaces to "_" in the output.
```

## Installation

- Search `Auto Classifier` in the Community plugin tab of the Obsidian settings.
- Also, you can manually download the latest release from this repository [GitHub releases](https://github.com/hyeonseonam/auto-tagger/releases) and extrat the ZIP file to your Obsidian plugins folder.

- Search `Auto Classifier` in the Community plugin tab of the Obsidian settings.
- Also, you can manually download the latest release from this repository [GitHub releases](https://github.com/hyeonseonam/auto-tagger/releases) and extrat the ZIP file to your Obsidian plugins folder.

## Support

Expand All @@ -85,6 +100,7 @@ If you encounter any issues while using this plugin or have any suggestions for
## Author

Hyeonseo Nam

## License

MIT License
MIT License

0 comments on commit f6f268d

Please sign in to comment.