mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
refac
This commit is contained in:
parent
28ca6fb678
commit
a93645aee8
@ -881,7 +881,6 @@ async def generate_openai_chat_completion(
|
|||||||
model_info = Models.get_model_by_id(model_id)
|
model_info = Models.get_model_by_id(model_id)
|
||||||
|
|
||||||
if model_info:
|
if model_info:
|
||||||
print(model_info)
|
|
||||||
if model_info.base_model_id:
|
if model_info.base_model_id:
|
||||||
payload["model"] = model_info.base_model_id
|
payload["model"] = model_info.base_model_id
|
||||||
|
|
||||||
|
@ -506,20 +506,18 @@
|
|||||||
messages = messages;
|
messages = messages;
|
||||||
|
|
||||||
const prompt = history.messages[parentId].content;
|
const prompt = history.messages[parentId].content;
|
||||||
let searchQuery = prompt;
|
let searchQuery = await generateSearchQuery(localStorage.token, model, messages, prompt);
|
||||||
if (prompt.length > 100) {
|
if (!searchQuery) {
|
||||||
searchQuery = await generateSearchQuery(localStorage.token, model, messages, prompt);
|
toast.warning($i18n.t('No search query generated'));
|
||||||
if (!searchQuery) {
|
responseMessage.status = {
|
||||||
toast.warning($i18n.t('No search query generated'));
|
...responseMessage.status,
|
||||||
responseMessage.status = {
|
done: true,
|
||||||
...responseMessage.status,
|
error: true,
|
||||||
done: true,
|
description: 'No search query generated'
|
||||||
error: true,
|
};
|
||||||
description: 'No search query generated'
|
messages = messages;
|
||||||
};
|
|
||||||
messages = messages;
|
searchQuery = prompt;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
responseMessage.status = {
|
responseMessage.status = {
|
||||||
|
Loading…
Reference in New Issue
Block a user