Bug Summary:
Hi, thanks for this awesome project!
I ran into this issue when trying to set my stop sequence to \n\n (so my output would be limited to a single paragraph).
After saving this stop sequence, Ollama API rejects calls with the error: option "stop" must be of type array.
Steps to Reproduce:
Start from a fresh UI install
Edit advanced options: set "stop sequence" to \n\n (though any string will work)
Attempt to submit a chat message
Expected Behavior:
The Ollama API responds to the prompt
Actual Behavior:
API rejects the request with a 400 BAD REQUEST error and the following message: option "stop" must be of type array
Environment
Model: dolphin-mixtral
Ollama Web UI Version v1.0.0-alpha.33
Ollama Version 0.1.17
Reproduction Details
After inspecting my network logs, it seems the UI had stringified the stop sequence option into
"stop":"\\n\\n",
But, the API is expecting an array, so the correct value would have been
"stop":["\n\n"],
Confirmation:
I have read and followed all the instructions provided in the README.md.
I have reviewed the troubleshooting.md document.
I have included the browser console logs.
I have included the Docker container logs.
Logs
Browser Console Logs:
XHR POST http://hello-ollama/ollama/api/chat
[HTTP/1.1 400 Bad Request 853ms]
VersionHTTP/1.1
Transferred 403 B (163 B size)
Docker Container Logs:
N/A
Installation Method
Docker with external Ollama instance running on same server, but outside docker
Originally created by @nielsmaerten on GitHub (Dec 26, 2023).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/279
Originally assigned to: @tjbck on GitHub.
# Bug Report
## Description
**Bug Summary:**
Hi, thanks for this awesome project!
I ran into this issue when trying to set my stop sequence to `\n\n` (so my output would be limited to a single paragraph).
After saving this stop sequence, Ollama API rejects calls with the error: `option "stop" must be of type array`.
**Steps to Reproduce:**
- Start from a fresh UI install
- Edit advanced options: set "stop sequence" to `\n\n` (though any string will work)
- Attempt to submit a chat message
**Expected Behavior:**
- The Ollama API responds to the prompt
**Actual Behavior:**
- API rejects the request with a 400 BAD REQUEST error and the following message: `option "stop" must be of type array`
## Environment
Model: dolphin-mixtral
Ollama Web UI Version v1.0.0-alpha.33
Ollama Version 0.1.17
## Reproduction Details
- After inspecting my network logs, it seems the UI had stringified the stop sequence option into
```json
"stop": "\\n\\n",
```
But, the API is expecting an array, so the correct value would have been
```json
"stop": ["\n\n"],
```
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I have reviewed the troubleshooting.md document.
- [x] I have included the browser console logs.
- [ ] I have included the Docker container logs.
## Logs
**Browser Console Logs:**
XHR POST http://hello-ollama/ollama/api/chat
[HTTP/1.1 400 Bad Request 853ms]
VersionHTTP/1.1
Transferred 403 B (163 B size)
**Docker Container Logs:**
N/A
## Installation Method
Docker with external Ollama instance running on same server, but outside docker
## Additional Information
I've attempted a fix in https://github.com/nielsmaerten/ollama-webui/tree/bugfix/options-stop-array
While this works for me, it may need to be cleaned up a bit.
## Screenshots



Hi, Thanks for creating this issue! I'll actively work on this issue soon as I merge #216 to main. Stay tuned!
<!-- gh-comment-id:1869861351 -->
@tjbck commented on GitHub (Dec 27, 2023):
Hi, Thanks for creating this issue! I'll actively work on this issue soon as I merge #216 to main. Stay tuned!
Hi, Just merged the branch with the fix#301 to main! Let me know if the issue still persists, Thanks!
<!-- gh-comment-id:1870821368 -->
@tjbck commented on GitHub (Dec 28, 2023):
Hi, Just merged the branch with the fix #301 to main! Let me know if the issue still persists, Thanks!
Just updated my docker container, and it's working without a hitch now :) Many thanks!
<!-- gh-comment-id:1871462031 -->
@nielsmaerten commented on GitHub (Dec 28, 2023):
Just updated my docker container, and it's working without a hitch now :) Many thanks!
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 @nielsmaerten on GitHub (Dec 26, 2023).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/279
Originally assigned to: @tjbck on GitHub.
Bug Report
Description
Bug Summary:
Hi, thanks for this awesome project!
I ran into this issue when trying to set my stop sequence to
\n\n(so my output would be limited to a single paragraph).After saving this stop sequence, Ollama API rejects calls with the error:
option "stop" must be of type array.Steps to Reproduce:
\n\n(though any string will work)Expected Behavior:
Actual Behavior:
option "stop" must be of type arrayEnvironment
Model: dolphin-mixtral
Ollama Web UI Version v1.0.0-alpha.33
Ollama Version 0.1.17
Reproduction Details
But, the API is expecting an array, so the correct value would have been
Confirmation:
Logs
Browser Console Logs:
XHR POST http://hello-ollama/ollama/api/chat
[HTTP/1.1 400 Bad Request 853ms]
VersionHTTP/1.1
Transferred 403 B (163 B size)
Docker Container Logs:
N/A
Installation Method
Docker with external Ollama instance running on same server, but outside docker
Additional Information
I've attempted a fix in https://github.com/nielsmaerten/ollama-webui/tree/bugfix/options-stop-array
While this works for me, it may need to be cleaned up a bit.
Screenshots
@tjbck commented on GitHub (Dec 27, 2023):
Hi, Thanks for creating this issue! I'll actively work on this issue soon as I merge #216 to main. Stay tuned!
@tjbck commented on GitHub (Dec 28, 2023):
Hi, Just merged the branch with the fix #301 to main! Let me know if the issue still persists, Thanks!
@nielsmaerten commented on GitHub (Dec 28, 2023):
Just updated my docker container, and it's working without a hitch now :) Many thanks!