rpehkone / Chat-With-RTX-python-api

Chat With RTX Python API
54 stars 10 forks source link

Getting Invalid Session #1

Closed thawancomt closed 5 months ago

thawancomt commented 5 months ago

When I try to run the code, I get an error message: "Invalid Session"

hsm990629 commented 5 months ago

can you upload the file of CHAT WITH RTX,the Nvidia official website can‘t download now,thank you!

thawancomt commented 5 months ago

Ok, I will

magistr-of-code commented 5 months ago

Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1561, in process_api result = await self.call_function( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\utils.py", line 678, in wrapper response = f(args, **kwargs) File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 533, in _validate_session_and_raise self._validate_request(request) gradio.exceptions.Error: 'Invalid session' Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1559, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1310, in preprocess_data self.validate_inputs(fn_index, inputs) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1294, in validate_inputs raise ValueError( ValueError: An event handler (process_retry) didn't receive enough input values (needed: 1, got: 0). Check if the event handler calls a Javascript function, and make sure its return value is correct. Wanted inputs: [chatbot] Received inputs: [] Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1559, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1337, in preprocess_data inputs_cached = block.data_model(root=inputs_cached) # type: ignore File "E:\chat-rtx\env_nvd_rag\lib\site-packages\pydantic\root_model.py", line 63, in init pydantic_self.pydantic_validator.validate_python(root, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for ChatbotData Input should be a valid list [type=list_type, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.3/v/list_type Traceback (most recent call last): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 531, in _validate_session_and_raise def _validate_session_and_raise(self, request: gr.Request): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 296, in _validate_request TypeError: exceptions must derive from BaseException

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1561, in process_api result = await self.call_function( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\utils.py", line 678, in wrapper response = f(args, **kwargs) File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 533, in _validate_session_and_raise self._validate_request(request) gradio.exceptions.Error: 'Invalid session' Traceback (most recent call last): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 531, in _validate_session_and_raise def _validate_session_and_raise(self, request: gr.Request): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 296, in _validate_request TypeError: exceptions must derive from BaseException

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1561, in process_api result = await self.call_function( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\utils.py", line 678, in wrapper response = f(args, **kwargs) File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 533, in _validate_session_and_raise self._validate_request(request) gradio.exceptions.Error: 'Invalid session' Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1559, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1310, in preprocess_data self.validate_inputs(fn_index, inputs) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1294, in validate_inputs raise ValueError( ValueError: An event handler (process_retry) didn't receive enough input values (needed: 1, got: 0). Check if the event handler calls a Javascript function, and make sure its return value is correct. Wanted inputs: [chatbot] Received inputs: [] Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1559, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1337, in preprocess_data inputs_cached = block.data_model(root=inputs_cached) # type: ignore File "E:\chat-rtx\env_nvd_rag\lib\site-packages\pydantic\root_model.py", line 63, in init pydantic_self.pydantic_validator.validate_python(root, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for ChatbotData Input should be a valid list [type=list_type, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.3/v/list_type Traceback (most recent call last): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 531, in _validate_session_and_raise def _validate_session_and_raise(self, request: gr.Request): File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 296, in _validate_request TypeError: exceptions must derive from BaseException

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1561, in process_api result = await self.call_function( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "E:\chat-rtx\env_nvd_rag\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "E:\chat-rtx\env_nvd_rag\lib\site-packages\gradio\utils.py", line 678, in wrapper response = f(args, **kwargs) File "E:\chat-rtx\RAG\trt-llm-rag-windows-main\ui\user_interface.py", line 533, in _validate_session_and_raise self._validate_request(request) gradio.exceptions.Error: 'Invalid session'

i have basically the same issue

rpehkone commented 5 months ago

i had ChatWithRtx 2.11 from february and they updated to 3.5, they just removed the youtube transcript RAG thing. Which changed the order of gardio functions in rag/trt/ui/user_interface.py also mistral faster 110 -> 130 tok/s

import rtx_api_3_5 as rtx_api