Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collections list wont't be cleaned up as you change it #3512

Closed
1 task
MetaLab-UAutonoma opened this issue Jun 28, 2024 · 0 comments
Closed
1 task

Collections list wont't be cleaned up as you change it #3512

MetaLab-UAutonoma opened this issue Jun 28, 2024 · 0 comments

Comments

@MetaLab-UAutonoma
Copy link

Description:

When you select new collections, old ones are not getting cleaned.
This is a node/frontend issue, python cleans it, yet it receives it back when parcing the requests body.
This is at main.py specifically in class ChatCompletionMiddleware (on line 288 to 292, v 0.3.5)

When placing the model with knowledge of all documents, conversations start by default with it, but when choosing with # another collection it should stop considering the all documents collection and focus on the new selected.

Reproduction Details

Download the docker, create some collections, and try it yourself.
Add this log line after data is parsed

log.warning(f"\n init 1 ====\n\n {str(data_2)}\n\nend ======\n ")

Consider these scenarios:

  1. You have over 100 documents, two chunks of 20, one of 30, and the rest in chunks of 5.
    If you search for an answer on the first group, and then look for something on the second group, and then you look for an answer on one of the small groups, the RAG will still look on 55 documents.

  2. If you added searched for something on All Documents, and then you want to specify, you can't, and it will take the time it takes to search in all of them.

  3. If you have collections of law docs grouped by country, you need to create a new chat to ask the LLM to focus on one particular country if you asked it to focus in another one before.

Confirmation:

  • [ yes] I have read and followed all the instructions provided in the README.md.
  • [ NO] I am on the latest version of both Open WebUI and Ollama, buyt changelog doesn't state this was fixed
  • I have included the browser console logs.
  • [ y] I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:

{'model': 'llama3:latest', 'messages': [{'role': 'user', 'content': 'hola'}, {'role': 'assistant', 'content': 'Hola!\n\n Como experto en construcción, me alegra poder ayudarte con cualquier consulta o pregunta que tengas. Si deseas saber más sobre un tema específico o necesitas orientación sobre algún proceso o procedimiento en el ámbito de la construcción, no dudes en preguntar.\n\nPara empezar, puedo ver que tienes una gran cantidad de información relacionada con planes reguladores comunales y consumo energético. ¿En qué área específica te gustaría obtener más información? ¿Estás trabajando en un proyecto o necesitas aclaraciones sobre algún tema en particular? Estoy aquí para ayudarte.'}, {'role': 'user', 'content': 'pelo'}, {'role': 'assistant', 'content': '¡Haha! No entiendo qué tiene que ver "pelo" con la construcción y energía. ¿Puedes explicar mejor?'}, {'role': 'user', 'content': 'rojo fama contra fama'}, {'role': 'assistant',
'content': '¡Ahah!\n\nNo tengo información específica sobre "rojo fama contra fama". Sin embargo, puedo buscar en mis archivos escaneados para ver si encontró algo relevante.\n\nDespués de revisar los archivos, no encontré contenido directamente relacionado con "rojo fama contra fama". Puedo sugerirte que es un tema o concepto que no está directamente relacionado con la construcción y energía. Si deseas saber más sobre este tema, puedo ayudarte a buscar información en línea o en otros recursos.\n\n¿Quieres seguir explorando o necesitas ayuda para encontrar algo específico?'}, {'role': 'user', 'content': 'h'}], 'options': {}, 'docs': [{'name': 'All Documents', 'type': 'collection', 'title': 'Todos los Documentos', 'collection_names': ['42aa8b17efc0a42171a0df445a280ce018d885f049acf808e995e118084fad1', '0dde37104b932d7b5d00abd14bb2fe3269852ff6c8c78897524f76da7656f88', '94c053e6b91322d161c8d058306a53460d4eb5337cac5e3e6e8688e76ee1526', '5f3e9b82149809d895da6039c743532233bd59931117fc2d3b7eb398c6d7e9a', 'dbd868a5a90d45ba03e34c7d7a8c9d3bdcab7be718e8b58cb1ddc3b68fd6b32', 'e8e780b837adfd3767961831b90a4f016b7af537bf80a1715cd77e7b046f909', '2d12b2b27e3aef72deb32a685d5249e0ad6925702d17930d225fb831500af9e', 'cad124a960e33cb24ff63e8bf51e597f9f4f80368337d18895f5f640a43195f', '2c409de58a729c033643fb4d1a2c2e6f9223c4da5b5b680f93ded5c5b0b8c60', '743e79ea17027b06e0b03e696fef69982d4d18f2f535b8d7165708671023601', '7118ff3bf2cc24d468462ca98c12a0c5860773c2f288c6ac1e4439d158bfb1e', '9e62a0a926a66b4536b132a127eb31bbccb1fd6f6109d67294906bd702e5bb6', 'd21abaa6e51bf272e61e3a94c484ef05e9ac78572eeb92f55490bed9fbbe4dc', '72fdaf0e2a510075ccc7d5e9aa0ba5ff1821d7a7b9812c53a59c62191791b05', 'c4a57235c9f81fff3be68f6d2acc10967dea709d8c3d8b8bd48538a2eff84ba', 'af160ab11970aface37c079778bc65cc26fae40be007ac8eb6423418e88ae03', '2a9f6504a638db0192e669a74913fc57e008f622add339a8c4b45dca22a91bf', '0b3273d8c60c2f0f883e53ecd1278637ff2aaac713f3f8df6a23acf23813eab', '087b4f8765e6a82d882eedcf46e6a23ea38bd4ae3aa25dbd041aa7748754adc', '339fd5172b8ea7ceb88f9316fb76d010d5c670ff1d72ad477bf33a69db0111e']}, {'type': 'collection', 'name': 'leyes', 'collection_names': ['94c053e6b91322d161c8d058306a53460d4eb5337cac5e3e6e8688e76ee1526', '087b4f8765e6a82d882eedcf46e6a23ea38bd4ae3aa25dbd041aa7748754adc', '339fd5172b8ea7ceb88f9316fb76d010d5c670ff1d72ad477bf33a69db0111e'], 'upload_status': True}, {'type': 'collection', 'name': 'All Documents', 'title': 'Todos los Documentos', 'collection_names': ['42aa8b17efc0a42171a0df445a280ce018d885f049acf808e995e118084fad1', '0dde37104b932d7b5d00abd14bb2fe3269852ff6c8c78897524f76da7656f88', '94c053e6b91322d161c8d058306a53460d4eb5337cac5e3e6e8688e76ee1526', '5f3e9b82149809d895da6039c743532233bd59931117fc2d3b7eb398c6d7e9a', 'dbd868a5a90d45ba03e34c7d7a8c9d3bdcab7be718e8b58cb1ddc3b68fd6b32', 'e8e780b837adfd3767961831b90a4f016b7af537bf80a1715cd77e7b046f909', '2d12b2b27e3aef72deb32a685d5249e0ad6925702d17930d225fb831500af9e', 'cad124a960e33cb24ff63e8bf51e597f9f4f80368337d18895f5f640a43195f', '2c409de58a729c033643fb4d1a2c2e6f9223c4da5b5b680f93ded5c5b0b8c60', '743e79ea17027b06e0b03e696fef69982d4d18f2f535b8d7165708671023601', '7118ff3bf2cc24d468462ca98c12a0c5860773c2f288c6ac1e4439d158bfb1e', '9e62a0a926a66b4536b132a127eb31bbccb1fd6f6109d67294906bd702e5bb6', 'd21abaa6e51bf272e61e3a94c484ef05e9ac78572eeb92f55490bed9fbbe4dc', '72fdaf0e2a510075ccc7d5e9aa0ba5ff1821d7a7b9812c53a59c62191791b05', 'c4a57235c9f81fff3be68f6d2acc10967dea709d8c3d8b8bd48538a2eff84ba', 'af160ab11970aface37c079778bc65cc26fae40be007ac8eb6423418e88ae03', '2a9f6504a638db0192e669a74913fc57e008f622add339a8c4b45dca22a91bf', '0b3273d8c60c2f0f883e53ecd1278637ff2aaac713f3f8df6a23acf23813eab', '087b4f8765e6a82d882eedcf46e6a23ea38bd4ae3aa25dbd041aa7748754adc', '339fd5172b8ea7ceb88f9316fb76d010d5c670ff1d72ad477bf33a69db0111e'], 'upload_status': True}, {'type': 'collection', 'name': 'guias', 'collection_names': ['2c409de58a729c033643fb4d1a2c2e6f9223c4da5b5b680f93ded5c5b0b8c60', '339fd5172b8ea7ceb88f9316fb76d010d5c670ff1d72ad477bf33a69db0111e'], 'upload_status': True}]}

end ============================================================

Screenshots (if applicable):
image

Installation Method

docker

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

@open-webui open-webui locked and limited conversation to collaborators Jun 29, 2024
@tjbck tjbck converted this issue into discussion #3528 Jun 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant