mirror of
https://github.com/hyeonseonam/auto-classifier.git
synced 2026-07-22 07:40:29 +00:00
fix regex
This commit is contained in:
parent
06c3c051ad
commit
a5478ec4cc
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ export default class AutoClassifierPlugin extends Plugin {
|
|||
// ------- [API Processing] -------
|
||||
// Call API
|
||||
const responseRaw = await ChatGPT.callAPI(system_role, user_prompt, this.settings.apiKey);
|
||||
const jsonRegex = /reliability.*\s*:\s*([\d.]+).*output.*\s*:\s*"?([^"^}]+)/;
|
||||
const jsonRegex = /reliability[\s\S]*?:\s*([\d.]+)[\s\S]*?output[\s\S]*?:\s*"([^"^}]+)/;
|
||||
const match = responseRaw.match(jsonRegex);
|
||||
let resOutput;
|
||||
let resReliabity;
|
||||
|
|
|
|||
Loading…
Reference in a new issue