[GH-ISSUE #7720] Autocomplete passes full conversation to log #14862

Closed
opened 2026-04-19 21:07:24 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @c-hoffmann on GitHub (Dec 9, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7720

Originally assigned to: @tjbck on GitHub.

Installation Method

pip

Environment

  • Open WebUI Version: v0.4.7

  • Ollama (if applicable): n/a

  • Operating System: Server: RHEL9; Client: Win11

  • Browser: Firefox 133.0

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • (Reason: #7677) I am on the latest version of both Open WebUI and Ollama.
  • (Reason: Not necessary) I have included the browser console logs.
  • (Reason: Docker not used) I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

I expect sensitive information to not be passed to the log files if logging-level exceeds DEBUG. This includes not logging sensitive information when doing an auto-complete for prompts.

Actual Behavior:

Sensitive information is logged for auto-completion of prompts.

Description

Bug Summary:
Sensitive information is logged for auto-completion of prompts even though that should not be the case.

Reproduction Details

Steps to Reproduce:

Make sure to save the output-log of the running open-webui instance. Type something (e.g. "wer" for example below) in the prompt text-field with auto-completion activated and wait until auto-completion generates a suggestion.

If you try this for ongoing conversations, you will see a lot more details about the conversation being logged / shown.

Logs and Screenshots

Console Logs:

INFO:     10.31.108.32:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PEhhdQh&sid=wNtHGgGtocr_232AAAAC HTTP/1.0" 200 OK
INFO:     10.31.108.32:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=PEhhjXf&sid=wNtHGgGtocr_232AAAAC HTTP/1.0" 200 OK
INFO:     10.31.108.32:0 - "GET /api/v1/users/user/settings HTTP/1.0" 200 OK
INFO  [open_webui.apps.openai.main] get_all_models()
{'model': 'myModel 1.0', 'messages': [{'role': 'user', 'content': '### Task:\nYou are an autocompletion system. Continue the text in `<text>` based on the **completion type** in `<type>` and the given language.  \n\n### **Instructions**:\n1. Analyze `<text>` for context and meaning.  \n2. Use `<type>` to guide your output:  \n   - **General**: Provide a natural, concise continuation.  \n   - **Search Query**: Complete as if generating a realistic search query.  \n3. Start as if you are directly continuing `<text>`. Do **not** repeat, paraphrase, or respond as a model. Simply complete the text.  \n4. Ensure the continuation:\n   - Flows naturally from `<text>`.  \n   - Avoids repetition, overexplaining, or unrelated ideas.  \n5. If unsure, return: `{ "text": "" }`.  \n\n### **Output Rules**:\n- Respond only in JSON format: `{ "text": "<your_completion>" }`.\n\n### **Examples**:\n#### Example 1:  \nInput:  \n<type>General</type>  \n<text>The sun was setting over the horizon, painting the sky</text>  \nOutput:  \n{ "text": "with vibrant shades of orange and pink." }\n\n#### Example 2:  \nInput:  \n<type>Search Query</type>  \n<text>Top-rated restaurants in</text>  \nOutput:  \n{ "text": "New York City for Italian cuisine." }  \n\n---\n### Context:\n<chat_history>\n\n</chat_history>\n<type>search query</type>  \n<text>wer</text>  \n#### Output:\n'}], 'stream': False, 'metadata': {'task': 'autocomplete_generation', 'task_body': {'model': 'myModel 1.0', 'prompt': 'wer', 'type': 'search query', 'stream': False}, 'chat_id': None}}
INFO:     10.31.108.32:0 - "POST /api/task/auto/completions HTTP/1.0" 200 OK
INFO:     10.31.108.32:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PEhhiqz&sid=GyNWJfF7-EAYjC3_AAAA HTTP/1.0" 200 OK
INFO:     10.31.108.32:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=PEhhoxm&sid=GyNWJfF7-EAYjC3_AAAA HTTP/1.0" 200 OK

Additional Information

No environment-variables for logging have been explicitly set via .env. But I see the same result if every LOG_LEVEL was set to "INFO" explicitly.

Originally created by @c-hoffmann on GitHub (Dec 9, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7720 Originally assigned to: @tjbck on GitHub. ## Installation Method pip ## Environment - **Open WebUI Version:** v0.4.7 - **Ollama (if applicable):** n/a - **Operating System:** Server: RHEL9; Client: Win11 - **Browser:** Firefox 133.0 **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [ ] (Reason: #7677) I am on the latest version of both Open WebUI and Ollama. - [ ] (Reason: Not necessary) I have included the browser console logs. - [ ] (Reason: Docker not used) I have included the Docker container logs. - [X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: I expect sensitive information to not be passed to the log files if [logging-level exceeds DEBUG](https://docs.openwebui.com/getting-started/advanced-topics/logging/#application-serverbackend-logging). This includes not logging sensitive information when doing an auto-complete for prompts. ## Actual Behavior: Sensitive information is logged for auto-completion of prompts. ## Description **Bug Summary:** Sensitive information is logged for auto-completion of prompts even though that should not be the case. ## Reproduction Details **Steps to Reproduce:** Make sure to save the output-log of the running open-webui instance. Type something (e.g. "wer" for example below) in the prompt text-field with auto-completion activated and wait until auto-completion generates a suggestion. If you try this for ongoing conversations, you will see a lot more details about the conversation being logged / shown. ## Logs and Screenshots **Console Logs:** ``` INFO: 10.31.108.32:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PEhhdQh&sid=wNtHGgGtocr_232AAAAC HTTP/1.0" 200 OK INFO: 10.31.108.32:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=PEhhjXf&sid=wNtHGgGtocr_232AAAAC HTTP/1.0" 200 OK INFO: 10.31.108.32:0 - "GET /api/v1/users/user/settings HTTP/1.0" 200 OK INFO [open_webui.apps.openai.main] get_all_models() {'model': 'myModel 1.0', 'messages': [{'role': 'user', 'content': '### Task:\nYou are an autocompletion system. Continue the text in `<text>` based on the **completion type** in `<type>` and the given language. \n\n### **Instructions**:\n1. Analyze `<text>` for context and meaning. \n2. Use `<type>` to guide your output: \n - **General**: Provide a natural, concise continuation. \n - **Search Query**: Complete as if generating a realistic search query. \n3. Start as if you are directly continuing `<text>`. Do **not** repeat, paraphrase, or respond as a model. Simply complete the text. \n4. Ensure the continuation:\n - Flows naturally from `<text>`. \n - Avoids repetition, overexplaining, or unrelated ideas. \n5. If unsure, return: `{ "text": "" }`. \n\n### **Output Rules**:\n- Respond only in JSON format: `{ "text": "<your_completion>" }`.\n\n### **Examples**:\n#### Example 1: \nInput: \n<type>General</type> \n<text>The sun was setting over the horizon, painting the sky</text> \nOutput: \n{ "text": "with vibrant shades of orange and pink." }\n\n#### Example 2: \nInput: \n<type>Search Query</type> \n<text>Top-rated restaurants in</text> \nOutput: \n{ "text": "New York City for Italian cuisine." } \n\n---\n### Context:\n<chat_history>\n\n</chat_history>\n<type>search query</type> \n<text>wer</text> \n#### Output:\n'}], 'stream': False, 'metadata': {'task': 'autocomplete_generation', 'task_body': {'model': 'myModel 1.0', 'prompt': 'wer', 'type': 'search query', 'stream': False}, 'chat_id': None}} INFO: 10.31.108.32:0 - "POST /api/task/auto/completions HTTP/1.0" 200 OK INFO: 10.31.108.32:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PEhhiqz&sid=GyNWJfF7-EAYjC3_AAAA HTTP/1.0" 200 OK INFO: 10.31.108.32:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=PEhhoxm&sid=GyNWJfF7-EAYjC3_AAAA HTTP/1.0" 200 OK ``` ## Additional Information No environment-variables for logging have been explicitly set via `.env`. But I see the same result if every `LOG_LEVEL `was set to "INFO" explicitly.
Author
Owner

@tjbck commented on GitHub (Dec 10, 2024):

Good catch, fixed on dev!

<!-- gh-comment-id:2529883556 --> @tjbck commented on GitHub (Dec 10, 2024): Good catch, fixed on dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14862