Rollback #551
This commit is contained in:
parent
d5a790a21b
commit
59d500de43
3 changed files with 1 additions and 23 deletions
|
|
@ -7,7 +7,6 @@
|
|||
<h2>Version 3.7.6 - ??/??/2025</h2>
|
||||
<ul>
|
||||
<li><i>[Claude API]</i> Added the System Prompt configuration option [<a href="https://github.com/micz/ThunderAI/issues/549">#549</a>].</li>
|
||||
<li><i>[All APIs]</i> Trying to add missing parenthesis in the JSON response [<a href="https://github.com/micz/ThunderAI/issues/551">#551</a>].
|
||||
<li><i>[ChatGPT Web]</i> Fix: correctly showing the input field after an update in the HTML page from OpenAI [<a href="https://github.com/micz/ThunderAI/issues/556">#556</a>].</li></li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -592,11 +592,8 @@ export function hasSpecificIntegration(use, conntype){
|
|||
return use && (conntype != null) && (conntype !== '');
|
||||
}
|
||||
|
||||
export function extractJsonObject(inputString, fixBraces = true) {
|
||||
export function extractJsonObject(inputString) {
|
||||
try {
|
||||
if (fixBraces) {
|
||||
inputString = fixJsonBraces(inputString);
|
||||
}
|
||||
const jsonMatch = inputString.match(/\{[\s\S]*\}/);
|
||||
if (jsonMatch) {
|
||||
const jsonObject = JSON.parse(jsonMatch[0]);
|
||||
|
|
@ -614,23 +611,6 @@ export function extractJsonObject(inputString, fixBraces = true) {
|
|||
}
|
||||
}
|
||||
|
||||
function fixJsonBraces(inputString) {
|
||||
let result = inputString.trim();
|
||||
const hasOpen = result.startsWith("{");
|
||||
const hasClose = result.endsWith("}");
|
||||
|
||||
if (hasClose && !hasOpen) {
|
||||
return "{" + result;
|
||||
}
|
||||
|
||||
if (hasOpen && !hasClose) {
|
||||
return result + "}";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
export function isAPIKeyValue(id){
|
||||
return id=="chatgpt_api_key" || id=="openai_comp_api_key" || id=="google_gemini_api_key" || id=="anthropic_api_key";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<h2>Version 3.7.6 - ??/??/2025</h2>
|
||||
<ul>
|
||||
<li><i>[Claude API]</i> Added the System Prompt configuration option [<a href="https://github.com/micz/ThunderAI/issues/549">#549</a>].</li>
|
||||
<li><i>[All APIs]</i> Trying to add missing parenthesis in the JSON response [<a href="https://github.com/micz/ThunderAI/issues/551">#551</a>].</li>
|
||||
<li><i>[ChatGPT Web]</i> Fix: correctly showing the input field after an update in the HTML page from OpenAI [<a href="https://github.com/micz/ThunderAI/issues/556">#556</a>].</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in a new issue