forked from open-webui/open-webui
chore: 🚨 lint and format
This commit is contained in:
parent
037793161e
commit
07cc7f15d5
25 changed files with 190 additions and 180 deletions
|
@ -25,7 +25,7 @@ export const getOpenAIModels = async (
|
|||
throw error;
|
||||
}
|
||||
|
||||
let models = Array.isArray(res) ? res : res?.data ?? null;
|
||||
const models = Array.isArray(res) ? res : res?.data ?? null;
|
||||
|
||||
return models
|
||||
.map((model) => ({ name: model.id, external: true }))
|
||||
|
|
|
@ -21,7 +21,7 @@ export const splitStream = (splitOn) => {
|
|||
};
|
||||
|
||||
export const convertMessagesToHistory = (messages) => {
|
||||
let history = {
|
||||
const history = {
|
||||
messages: {},
|
||||
currentId: null
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ export const checkVersion = (required, current) => {
|
|||
|
||||
export const findWordIndices = (text) => {
|
||||
const regex = /\[([^\]]+)\]/g;
|
||||
let matches = [];
|
||||
const matches = [];
|
||||
let match;
|
||||
|
||||
while ((match = regex.exec(text)) !== null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue