chore: format

This commit is contained in:
Timothy Jaeryang Baek 2024-11-26 20:03:06 -08:00
parent 22b5feb747
commit cbc7801b0e
5 changed files with 1019 additions and 1026 deletions

View File

@ -25,7 +25,7 @@ def prompt_template(
# Format the date to YYYY-MM-DD
formatted_date = current_date.strftime("%Y-%m-%d")
formatted_time = current_date.strftime("%I:%M:%S %p")
formatted_weekday = current_date.strftime("%A") # EXMonday
formatted_weekday = current_date.strftime("%A")
template = template.replace("{{CURRENT_DATE}}", formatted_date)
template = template.replace("{{CURRENT_TIME}}", formatted_time)

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "open-webui",
"version": "0.4.5",
"version": "0.4.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-webui",
"version": "0.4.5",
"version": "0.4.6",
"dependencies": {
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-python": "^6.1.6",

View File

@ -1,6 +1,6 @@
{
"name": "open-webui",
"version": "0.4.5",
"version": "0.4.6",
"private": true,
"scripts": {
"dev": "npm run pyodide:fetch && vite dev --host",

View File

@ -367,11 +367,9 @@ export const generateQueries = async (
throw error;
}
// Step 1: Safely extract the response string
const response = res?.choices[0]?.message?.content ?? '';
try {
const jsonStartIndex = response.indexOf('{');
const jsonEndIndex = response.lastIndexOf('}');
@ -390,7 +388,7 @@ export const generateQueries = async (
}
}
// If no valid JSON block found, return an empty array
// If no valid JSON block found, return response as is
return [response];
} catch (e) {
// Catch and safely return empty array on any parsing errors

View File

@ -1014,8 +1014,3 @@
"Youtube": "Youtube",
"Youtube Loader Settings": "Youtube kargatzailearen ezarpenak"
}