Originally created by @jamesljlster on GitHub (Aug 7, 2024).
Bug Report
Description
Bug Summary:
I was running Open WebUI with LLMs connected via OpenAI compatible API on a local server. After setting custom stop sequence, it stopped working with a TypeError exception raised. The error message was:
TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function
The used LLMs were hosted by vLLM and llama.cpp, and both met the same problem.
Steps to Reproduce:
Added a OpenAI compatible API connection.
Start chatting with the added LLM connection.
Open Controls and set Stop Sequence to any text, for example <|im_stop|>.
Chat again, the reported exception should be raised.
Expected Behavior:
The Stop Sequence parameter should be set successfully and working without errors.
Actual Behavior:
TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function raised.
Environment
Open WebUI Version: v0.3.11
Ollama (if applicable): No
Operating System: Windows 10 22H2
Browser (if applicable): Microsoft Edge 127.0.2651.86
Reproduction Details
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
Logs and Screenshots
Browser Console Logs:
... (Truncated due to company message transfering limitation)
Chat.svelte:491 submitPrompt 7db36181-3eb3-438d-b225-09278523176b
Chat.svelte:501 wait
index.ts:60 {id: 'chat-63d624bd1463435ca03af8da8a3b1d71', object: 'chat.completion.chunk', created: 1722999304, model: 'meta-llama/Meta-Llama-3.1-8B', choices: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(0)}
Chat.svelte:491 submitPrompt 7db36181-3eb3-438d-b225-09278523176b
Chat.svelte:642 modelId meta-llama/Meta-Llama-3.1-8B
Chat.svelte:1279 TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function
at ut (Chat.svelte:1106:50)
at async Chat.svelte:693:7
at async Promise.all (:3000/index 0)
at async ft (Chat.svelte:638:52)
at async _t (Chat.svelte:564:23)
Et @ Chat.svelte:1279
ut @ Chat.svelte:1231
await in ut
(匿名) @ Chat.svelte:693
await in (匿名)
ft @ Chat.svelte:641
await in ft
_t @ Chat.svelte:564
await in _t
bt @ MessageInput.svelte:635
Docker Container Logs:
... (Truncated due to company message transfering limitation)
INFO [apps.ollama.main] get_all_models()
ERROR [apps.ollama.main] Connection error: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('http://host.docker.internal:11434/api/tags')
ERROR [apps.ollama.main] Connection error: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('http://host.docker.internal:11434/api/version')
[32mINFO[0m: 10.240.60.234:51928 - "[1mGET /ollama/api/version HTTP/1.1[0m" [91m500 Internal Server Error[0m
[32mINFO[0m: 10.240.60.234:51928 - "[1mGET /api/v1/users/user/settings HTTP/1.1[0m" [32m200 OK[0m
[32mINFO[0m: 10.240.60.234:51932 - "[1mGET /static/favicon.png HTTP/1.1[0m" [33m304 Not Modified[0m
[32mINFO[0m: 10.240.60.234:51941 - "[1mGET /static/favicon.png HTTP/1.1[0m" [33m304 Not Modified[0m
[32mINFO[0m: 10.240.60.234:51942 - "[1mPOST /api/v1/chats/new HTTP/1.1[0m" [32m200 OK[0m
[32mINFO[0m: 10.240.60.234:51942 - "[1mGET /api/v1/chats/ HTTP/1.1[0m" [32m200 OK[0m
generate_title
meta-llama/Meta-Llama-3.1-8B
Originally created by @jamesljlster on GitHub (Aug 7, 2024).
# Bug Report
## Description
**Bug Summary:**
I was running Open WebUI with LLMs connected via OpenAI compatible API on a local server. After setting custom stop sequence, it stopped working with a TypeError exception raised. The error message was:
```
TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function
```
The used LLMs were hosted by vLLM and llama.cpp, and both met the same problem.
**Steps to Reproduce:**
1. Added a OpenAI compatible API connection.
2. Start chatting with the added LLM connection.
3. Open `Controls` and set `Stop Sequence` to any text, for example `<|im_stop|>`.
4. Chat again, the reported exception should be raised.
**Expected Behavior:**
The `Stop Sequence` parameter should be set successfully and working without errors.
**Actual Behavior:**
`TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function` raised.
## Environment
- **Open WebUI Version:** v0.3.11
- **Ollama (if applicable):** No
- **Operating System:** Windows 10 22H2
- **Browser (if applicable):** Microsoft Edge 127.0.2651.86
## Reproduction Details
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on the latest version of both Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
## Logs and Screenshots
**Browser Console Logs:**
```
... (Truncated due to company message transfering limitation)
Chat.svelte:491 submitPrompt 7db36181-3eb3-438d-b225-09278523176b
Chat.svelte:501 wait
index.ts:60 {id: 'chat-63d624bd1463435ca03af8da8a3b1d71', object: 'chat.completion.chunk', created: 1722999304, model: 'meta-llama/Meta-Llama-3.1-8B', choices: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(1)}
+layout.svelte:130 usage {models: Array(0)}
Chat.svelte:491 submitPrompt 7db36181-3eb3-438d-b225-09278523176b
Chat.svelte:642 modelId meta-llama/Meta-Llama-3.1-8B
Chat.svelte:1279 TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a function
at ut (Chat.svelte:1106:50)
at async Chat.svelte:693:7
at async Promise.all (:3000/index 0)
at async ft (Chat.svelte:638:52)
at async _t (Chat.svelte:564:23)
Et @ Chat.svelte:1279
ut @ Chat.svelte:1231
await in ut
(匿名) @ Chat.svelte:693
await in (匿名)
ft @ Chat.svelte:641
await in ft
_t @ Chat.svelte:564
await in _t
bt @ MessageInput.svelte:635
```
**Docker Container Logs:**
```
... (Truncated due to company message transfering limitation)
INFO [apps.ollama.main] get_all_models()
ERROR [apps.ollama.main] Connection error: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('http://host.docker.internal:11434/api/tags')
ERROR [apps.ollama.main] Connection error: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('http://host.docker.internal:11434/api/version')
[32mINFO[0m: 10.240.60.234:51928 - "[1mGET /ollama/api/version HTTP/1.1[0m" [91m500 Internal Server Error[0m
[32mINFO[0m: 10.240.60.234:51928 - "[1mGET /api/v1/users/user/settings HTTP/1.1[0m" [32m200 OK[0m
[32mINFO[0m: 10.240.60.234:51932 - "[1mGET /static/favicon.png HTTP/1.1[0m" [33m304 Not Modified[0m
[32mINFO[0m: 10.240.60.234:51941 - "[1mGET /static/favicon.png HTTP/1.1[0m" [33m304 Not Modified[0m
[32mINFO[0m: 10.240.60.234:51942 - "[1mPOST /api/v1/chats/new HTTP/1.1[0m" [32m200 OK[0m
[32mINFO[0m: 10.240.60.234:51942 - "[1mGET /api/v1/chats/ HTTP/1.1[0m" [32m200 OK[0m
generate_title
meta-llama/Meta-Llama-3.1-8B
```
**Screenshots (if applicable):**

## Installation Method
I installed Open WebUI with docker followed the instruction described in official documentation:
https://docs.openwebui.com/#installation-for-openai-api-usage-only
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 @jamesljlster on GitHub (Aug 7, 2024).
Bug Report
Description
Bug Summary:
I was running Open WebUI with LLMs connected via OpenAI compatible API on a local server. After setting custom stop sequence, it stopped working with a TypeError exception raised. The error message was:
The used LLMs were hosted by vLLM and llama.cpp, and both met the same problem.
Steps to Reproduce:
Controlsand setStop Sequenceto any text, for example<|im_stop|>.Expected Behavior:
The
Stop Sequenceparameter should be set successfully and working without errors.Actual Behavior:
TypeError: ((intermediate value)(intermediate value)(intermediate value) ?? o.params.stop).map is not a functionraised.Environment
Open WebUI Version: v0.3.11
Ollama (if applicable): No
Operating System: Windows 10 22H2
Browser (if applicable): Microsoft Edge 127.0.2651.86
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
Screenshots (if applicable):
Installation Method
I installed Open WebUI with docker followed the instruction described in official documentation:
https://docs.openwebui.com/#installation-for-openai-api-usage-only