R2R
R2R copied to clipboard
Filter by collection id returns 500
Describe the bug A clear and concise description of what the bug is.
Ep - client.retrieval.rag
"filters": {
"collection_ids": {"$overlap": ["26305e57-d321-4bd0-bb7c-b5016326a7d0"]},
}
Log:
24-12-16 16:13:06 - ERROR - Pipeline error: column "parent_id" does not exist
2024-12-16 16:13:06 - ERROR - Error in base endpoint rag_app() -
500: Internal Server Error
Traceback (most recent call last):
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/main/services/retrieval_service.py", line 187, in rag
results = await self.pipelines.rag_pipeline.run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipelines/rag_pipeline.py", line 86, in run
rag_results = await self._rag_pipeline.run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 86, in run
else await self._consume_all(current_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 91, in _consume_all
async for item in gen:
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 156, in _run_pipe
async for ele in await pipe.run(
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipes/base_pipe.py", line 134, in wrapped_run
async for result in self._run_logic( # type: ignore
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipes/retrieval/search_rag_pipe.py", line 55, in _run_logic
async for query, search_results in input.message:
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipelines/rag_pipeline.py", line 79, in multi_query_generator
yield (query, await task)
^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipelines/search_pipeline.py", line 87, in run
kg_results = await kg_task
^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 86, in run
else await self._consume_all(current_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 91, in _consume_all
async for item in gen:
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipeline/base_pipeline.py", line 156, in _run_pipe
async for ele in await pipe.run(
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/base/pipes/base_pipe.py", line 134, in wrapped_run
async for result in self._run_logic( # type: ignore
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipes/retrieval/kg_search_pipe.py", line 269, in _run_logic
async for result in self.search(input, state, run_id, search_settings):
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/pipes/retrieval/kg_search_pipe.py", line 217, in search
async for search_result in self.database_provider.graph_handler.graph_search( # type: ignore
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/providers/database/graph.py", line 2410, in graph_search
results = await self.connection_manager.fetch_query(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/providers/database/base.py", line 152, in fetch_query
await conn.fetch(query, *params)
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/asyncpg/connection.py", line 691, in fetch
return await self._execute(
^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/asyncpg/connection.py", line 1794, in _execute
result, _ = await self.__execute(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/asyncpg/connection.py", line 1892, in __execute
result, stmt = await self._do_execute(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/asyncpg/connection.py", line 1925, in _do_execute
stmt = await self._get_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/asyncpg/connection.py", line 433, in _get_statement
statement = await self._protocol.prepare(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "asyncpg/protocol/protocol.pyx", line 166, in prepare
asyncpg.exceptions.UndefinedColumnError: column "parent_id" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/main/api/v3/base_router.py", line 44, in wrapper
func_result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/main/api/v3/retrieval_router.py", line 476, in rag_app
response = await self.services["retrieval"].rag(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/telemetry/telemetry_decorator.py", line 117, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test/r2r-playground/r2r_env/lib/python3.12/site-packages/core/main/services/retrieval_service.py", line 211, in rag
raise HTTPException(
fastapi.exceptions.HTTPException: 500: Internal Server Error
2024-12-16 16:13:06 - ERROR - 127.0.0.1:64927 - "POST /v3/retrieval/rag HTTP/1.1" 500
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.