[GH-ISSUE #4416] TypeError Raised after Setting Custom Stop Sequence #52267

Closed
opened 2026-05-05 13:25:01 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @jameslai-dev on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4416

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:

  • 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')
INFO:     10.240.60.234:51928 - "GET /ollama/api/version HTTP/1.1" 500 Internal Server Error
INFO:     10.240.60.234:51928 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO:     10.240.60.234:51932 - "GET /static/favicon.png HTTP/1.1" 304 Not Modified
INFO:     10.240.60.234:51941 - "GET /static/favicon.png HTTP/1.1" 304 Not Modified
INFO:     10.240.60.234:51942 - "POST /api/v1/chats/new HTTP/1.1" 200 OK
INFO:     10.240.60.234:51942 - "GET /api/v1/chats/ HTTP/1.1" 200 OK
generate_title
meta-llama/Meta-Llama-3.1-8B

Screenshots (if applicable):

image

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

Originally created by @jameslai-dev on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/4416 # 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') INFO: 10.240.60.234:51928 - "GET /ollama/api/version HTTP/1.1" 500 Internal Server Error INFO: 10.240.60.234:51928 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 10.240.60.234:51932 - "GET /static/favicon.png HTTP/1.1" 304 Not Modified INFO: 10.240.60.234:51941 - "GET /static/favicon.png HTTP/1.1" 304 Not Modified INFO: 10.240.60.234:51942 - "POST /api/v1/chats/new HTTP/1.1" 200 OK INFO: 10.240.60.234:51942 - "GET /api/v1/chats/ HTTP/1.1" 200 OK generate_title meta-llama/Meta-Llama-3.1-8B ``` **Screenshots (if applicable):** ![image](https://github.com/user-attachments/assets/d13ec923-a688-4cdb-92e9-93d9eae2e4f8) ## 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#52267