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

JSON parsing error #34

Open
jpmoo opened this issue Dec 31, 2024 · 3 comments
Open

JSON parsing error #34

jpmoo opened this issue Dec 31, 2024 · 3 comments

Comments

@jpmoo
Copy link

jpmoo commented Dec 31, 2024

Plugin was working well on first few tries but is now returning this error after processing, with "chatgpt-4o" set as model. No tags are generated. I'm not using any custom prompt or other settings.

image

(It works OK with "chatgpt-3.5-turbo" set as model.)

@luca-git
Copy link

luca-git commented Jan 1, 2025

same issue gpt-4o-mini

@fabioscarsi
Copy link

Plugin was working well on first few tries but is now returning this error after processing, with "chatgpt-4o" set as model. No tags are generated. I'm not using any custom prompt or other settings.

image

(It works OK with "chatgpt-3.5-turbo" set as model.)

Same problem. Can't find a solution .... Any idea?

@SophomoreSo
Copy link
Contributor

SophomoreSo commented Feb 18, 2025

  1. Goto .obsidian -> plugins -> auto-classifier
  2. Open main.js
  3. Goto line 5778 and modify the line.

Before:

const response = JSON.parse(responseRaw);

After:

const response = JSON.parse(responseRaw.replace(/^```json\n/, "").replace(/\n```$/, ""));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants