Models.svelte:25 Uncaught (in promise) TypeError: I.at is not a function
at Models.svelte:25
at Array.filter (<anonymous>)
at Object.Bo.s.$$.update (Models.svelte:24)
at Ot (Component.js:144)
at new Lo (Models.svelte:30)
at Si (MessageInput.svelte:339)
at Ot (Component.js:148)
at new Ti (MessageInput.svelte:90)
at bn (Chat.svelte:1614)
at Ua (Chat.svelte:1510)
Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]
Models.svelte:25 Uncaught (in promise) TypeError: I.at is not a function
at Models.svelte:25
at Array.filter (<anonymous>)
at Object.Bo.s.$$.update (Models.svelte:24)
at Ot (Component.js:144)
at new Lo (Models.svelte:30)
at Si (MessageInput.svelte:339)
at Ot (Component.js:148)
at new Ti (MessageInput.svelte:90)
at bn (Chat.svelte:1614)
at Ua (Chat.svelte:1510)
Expected Behavior:
[Describe what you expected to happen.]
前端页面可以正常访问。
Originally created by @shouzheng on GitHub (Jul 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4106
# Bug Report
## Description
**Bug Summary:**
在本地服务器部署了OpenAI API兼容的大模型服务(使用vllm),然后使用下面的命令启动open-webui,在注册、登录之后,前端无法正常工作,页面空白。
启动命令:
```sh
docker run -d -p 3030:8080 \
-e OPENAI_API_KEY=NULL \
-e OPENAI_API_BASE_URL=http://10.3.219.78:49423/v1 \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always ghcr.io/open-webui/open-webui:main
```
报错内容:
```
Models.svelte:25 Uncaught (in promise) TypeError: I.at is not a function
at Models.svelte:25
at Array.filter (<anonymous>)
at Object.Bo.s.$$.update (Models.svelte:24)
at Ot (Component.js:144)
at new Lo (Models.svelte:30)
at Si (MessageInput.svelte:339)
at Ot (Component.js:148)
at new Ti (MessageInput.svelte:90)
at bn (Chat.svelte:1614)
at Ua (Chat.svelte:1510)
```
**Steps to Reproduce:**
[Outline the steps to reproduce the bug. Be as detailed as possible.]
1. 在服务器使用vllm启动大模型服务,使用命令如:
```sh
nohup python -m vllm.entrypoints.openai.api_server --served-model-name Qwen2-7B-Instruct --port 7777 --model ~/Qwen2-7B-Instruct > ~/logs/Qwen2-7B-Instruct.log 2>&1 &
```
2. 使用下面的命令启动open-webui:
```sh
docker run -d -p 3030:8080 \
-e OPENAI_API_KEY=NULL \
-e OPENAI_API_BASE_URL=http://10.3.219.78:49423/v1 \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always ghcr.io/open-webui/open-webui:main
```
该命令参考了[Installation for OpenAI API Usage Only](https://docs.openwebui.com/getting-started/#installation-for-openai-api-usage-only)。
3. 访问:localhost:3030页面,进行注册、登录
4. 登录之后发现页面空白,打开浏览器的Console,发现有报错,报错内容:
```
Models.svelte:25 Uncaught (in promise) TypeError: I.at is not a function
at Models.svelte:25
at Array.filter (<anonymous>)
at Object.Bo.s.$$.update (Models.svelte:24)
at Ot (Component.js:144)
at new Lo (Models.svelte:30)
at Si (MessageInput.svelte:339)
at Ot (Component.js:148)
at new Ti (MessageInput.svelte:90)
at bn (Chat.svelte:1614)
at Ua (Chat.svelte:1510)
```
根据调试,关键代码在这里:
```
export let prompt = '';
# ......
$: filteredModels = $models
.filter((p) =>
p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '')
)
.sort((a, b) => a.name.localeCompare(b.name));
```
在异常时,p.name='Qwen2-7B-Instruct', prompt=''。
**Expected Behavior:**
[Describe what you expected to happen.]
前端页面可以正常访问。
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @shouzheng on GitHub (Jul 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4106
Bug Report
Description
Bug Summary:
在本地服务器部署了OpenAI API兼容的大模型服务(使用vllm),然后使用下面的命令启动open-webui,在注册、登录之后,前端无法正常工作,页面空白。
启动命令:
报错内容:
Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]
该命令参考了Installation for OpenAI API Usage Only。
访问:localhost:3030页面,进行注册、登录
登录之后发现页面空白,打开浏览器的Console,发现有报错,报错内容:
根据调试,关键代码在这里:
在异常时,p.name='Qwen2-7B-Instruct', prompt=''。
Expected Behavior:
[Describe what you expected to happen.]
前端页面可以正常访问。