Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve prompt adherence for JSON #33

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "auto-classifier",
"name": "Auto Classifier",
"version": "1.2.0",
"version": "1.2.1",
"minAppVersion": "1.1.1",
"description": "This plugin automatically classify tag from your notes using ChatGPT API. It analyze your note (It can be title, frontmatter, content or selected area) and automatically insert tag where you set.",
"author": "Hyeonseo Nam",
Expand Down
5 changes: 3 additions & 2 deletions src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export const DEFAULT_PROMPT_TEMPLATE = `Classify this content:
{{input}}
"""
Answer format is JSON {reliability:0~1, outputs:[tag1,tag2,...]}.
Even if you are not sure, qualify the reliability and select the best matches.
Even if you are unsure, qualify the reliability and select the best matches.
Respond only with valid JSON. Do not write an introduction or summary.
Output tags must be from these options:

{{reference}}
Expand All @@ -16,5 +17,5 @@ export const DEFAULT_PROMPT_TEMPLATE_WO_REF = `Classify this content:
"""
Answer format is JSON {reliability:0~1, output:selected_category}.
Even if you are not sure, qualify the reliability and recommend a proper category.

Respond only with valid JSON. Do not write an introduction or summary.
`;