[+] Running 5/5
✔ Container milvus-etcd Started 0.3s
✔ Container milvus-minio Started 0.3s
✔ Container chain-server Started 0.2s
✔ Container milvus-standalone Started 0.4s
✔ Container rag-playground Started 0.3s
❯ docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Status}}"
CONTAINER ID NAMES STATUS
3a447f023622 rag-playground Up 8 minutes
96a6762b0113 chain-server Up 8 minutes
ff4ebdfa15b6 milvus-standalone Up 8 minutes
662cc72b09d8 milvus-minio Up 8 minutes (unhealthy)
f3fbd91ef0e5 milvus-etcd Up 8 minutes (healthy)
ed18e9aa80c6 buildx_buildkit_builder0 Up 24 hours
ERROR:: (in web interface chat)
"Failed to get response from /generate endpoint of chain-server. Check if the fastapi server in chain-server is up. Refer to chain-server logs for details."
docker logs 96a6762b01134ab4d62fc07009f3d9e38cc797784d4fb354b974d466f673058c
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO:faiss.loader:Loading faiss.
INFO:faiss.loader:Successfully loaded faiss.
INFO:RAG.src.chain_server.utils:Using nvidia-ai-endpoints as model engine and nvidia/nv-embedqa-e5-v5 and model for embeddings
INFO:RAG.src.chain_server.utils:Using embedding model nvidia/nv-embedqa-e5-v5 hosted at api catalog
INFO:RAG.src.chain_server.utils:Using milvus collection: nvidia_api_catalog
INFO:RAG.src.chain_server.utils:Vector store created and saved.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8081 (Press CTRL+C to quit)
INFO:example:Using llm to generate response directly without knowledge base.
INFO:RAG.src.chain_server.utils:Using nvidia-ai-endpoints as model engine for llm. Model name: meta/llama3-70b-instruct
WARNING:RAG.src.chain_server.utils:The following parameters from kwargs are not supported: ['stop'] for nvidia-ai-endpoints
INFO:RAG.src.chain_server.utils:Using llm model meta/llama3-70b-instruct from api catalog
INFO:example:Prompt used for response generation: System: You are a helpful, respectful and honest assistant.
Always answer as helpfully as possible, while being safe.
Please ensure that your responses are positive in nature.
Human:
Question: what is rag
INFO: 172.19.0.5:59680 - "POST /generate HTTP/1.1" 200 OK
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect
message = await receive()
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive
await self.message_event.wait()
File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope fffee886fb80
During handling of the above exception, another exception occurred:
Exception Group Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
| result = await app( # type: ignore[func-returns-value]
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
| return await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
| await super().call(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
| await self.app(scope, receive, _send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
| await route.handle(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
| await response(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 257, in call
| async with anyio.create_task_group() as task_group:
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 736, in aexit
| raise BaseExceptionGroup(
| exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
| await func()
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 249, in stream_response
| async for chunk in self.body_iterator:
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
| yield await anyio.to_thread.run_sync(_next, as_iterator)
| File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
| return await get_async_backend().run_sync_in_worker_thread(
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
| return await future
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 914, in run
| result = context.run(func, *args)
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 54, in _next
| return next(iterator)
| File "/opt/RAG/src/chain_server/server.py", line 358, in response_generator
| for chunk in generator:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2446, in stream
| yield from self.transform(iter([input]), config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2433, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1513, in _transform_stream_with_config
| chunk: Output = context.run(next, iterator) # type: ignore
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2397, in _transform
| for output in final_pipeline:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/output_parsers/transform.py", line 50, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1489, in _transform_stream_with_config
| final_input: Optional[Input] = next(input_for_tracing, None)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1061, in transform
| yield from self.stream(final, config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 250, in stream
| raise e
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 234, in stream
| for chunk in self._stream(
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/chat_models.py", line 231, in _stream
| for response in self._client.client.get_req_stream(payload=payload):
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 418, in get_req_stream
| self._try_raise(response)
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 311, in _try_raise
| raise Exception(f"{header}\n{body}") from None
| Exception: [401] Unauthorized
| Bearer error="invalid_token"
| error_description="Bearer token is malformed"
| error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
| Please check or regenerate your API key.
+------------------------------------
INFO: 172.19.0.5:42872 - "POST /search HTTP/1.1" 200 OK
INFO:RAG.src.chain_server.server:Knowledge base is enabled. Using rag chain for response generation.
INFO:example:Using rag to generate response from document
INFO:example:Getting retrieved top k values: 4 with confidence threshold: 0.25
WARNING:example:Retrieval failed to get any relevant context
INFO: 172.19.0.5:42884 - "POST /generate HTTP/1.1" 200 OK
INFO: 172.19.0.5:42896 - "POST /search HTTP/1.1" 200 OK
INFO:RAG.src.chain_server.server:Knowledge base is enabled. Using rag chain for response generation.
INFO:example:Using rag to generate response from document
INFO:example:Getting retrieved top k values: 4 with confidence threshold: 0.25
WARNING:example:Retrieval failed to get any relevant context
INFO: 172.19.0.5:42908 - "POST /generate HTTP/1.1" 200 OK
INFO: 172.19.0.5:37442 - "GET /documents HTTP/1.1" 200 OK
INFO: 172.19.0.5:37458 - "GET /documents HTTP/1.1" 200 OK
ERROR:RAG.src.chain_server.server:Error from POST /documents endpoint. Ingestion of file: /tmp/gradio/e5fa06eb8c8e2740f63d74a6ac0f3c2eb0f9cc769163ddcde2fa065dcff945c4/OC_Vibe_Artic_MSA_SAS_storage_20TB_option_5140080098-01.xlsx failed with error: OC_Vibe_Artic_MSA_SAS_storage_20TB_option_5140080098-01.xlsx is not a valid Text, PDF or Markdown file
INFO: 172.19.0.5:51878 - "POST /documents HTTP/1.1" 500 Internal Server Error
INFO: 172.19.0.5:51892 - "GET /documents HTTP/1.1" 200 OK
INFO: 172.19.0.5:51908 - "GET /documents HTTP/1.1" 200 OK
INFO:pikepdf._core:pikepdf C++ to Python logger bridge initialized
INFO:sentence_transformers.SentenceTransformer:Use pytorch device_name: cpu
INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: Snowflake/snowflake-arctic-embed-l
INFO:sentence_transformers.SentenceTransformer:1 prompts are loaded, with the keys: ['query']
ERROR:example:Failed to ingest document due to exception [401] Unauthorized
Bearer error="invalid_token"
error_description="Bearer token is malformed"
error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
Please check or regenerate your API key.
ERROR:RAG.src.chain_server.server:Error from POST /documents endpoint. Ingestion of file: /tmp/gradio/d12a00e719c7214dcf11fb5922931e096ed0c7def97409ae69236ee98a4b3290/python-ai-projects-for-beginners_compress.pdf failed with error: Failed to upload document. Please upload an unstructured text document.
INFO: 172.19.0.5:41762 - "GET /documents HTTP/1.1" 200 OK
INFO: 172.19.0.5:41758 - "POST /documents HTTP/1.1" 500 Internal Server Error
INFO: 172.19.0.5:56174 - "GET /documents HTTP/1.1" 200 OK
INFO: 172.19.0.5:56184 - "GET /documents HTTP/1.1" 200 OK
INFO:example:Using llm to generate response directly without knowledge base.
INFO:example:Prompt used for response generation: System: You are a helpful, respectful and honest assistant.
Always answer as helpfully as possible, while being safe.
Please ensure that your responses are positive in nature.
Human:
Question: rag
INFO: 172.19.0.5:53786 - "POST /generate HTTP/1.1" 200 OK
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect
message = await receive()
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive
await self.message_event.wait()
File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope fffee7355bd0
During handling of the above exception, another exception occurred:
Exception Group Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
| result = await app( # type: ignore[func-returns-value]
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
| return await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
| await super().call(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
| await self.app(scope, receive, _send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
| await route.handle(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
| await response(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 257, in call
| async with anyio.create_task_group() as task_group:
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 736, in aexit
| raise BaseExceptionGroup(
| exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
| await func()
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 249, in stream_response
| async for chunk in self.body_iterator:
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
| yield await anyio.to_thread.run_sync(_next, as_iterator)
| File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
| return await get_async_backend().run_sync_in_worker_thread(
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
| return await future
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 914, in run
| result = context.run(func, *args)
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 54, in _next
| return next(iterator)
| File "/opt/RAG/src/chain_server/server.py", line 358, in response_generator
| for chunk in generator:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2446, in stream
| yield from self.transform(iter([input]), config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2433, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1513, in _transform_stream_with_config
| chunk: Output = context.run(next, iterator) # type: ignore
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2397, in _transform
| for output in final_pipeline:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/output_parsers/transform.py", line 50, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1489, in _transform_stream_with_config
| final_input: Optional[Input] = next(input_for_tracing, None)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1061, in transform
| yield from self.stream(final, config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 250, in stream
| raise e
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 234, in stream
| for chunk in self._stream(
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/chat_models.py", line 231, in _stream
| for response in self._client.client.get_req_stream(payload=payload):
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 418, in get_req_stream
| self._try_raise(response)
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 311, in _try_raise
| raise Exception(f"{header}\n{body}") from None
| Exception: [401] Unauthorized
| Bearer error="invalid_token"
| error_description="Bearer token is malformed"
| error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
| Please check or regenerate your API key.
+------------------------------------
INFO:example:Using llm to generate response directly without knowledge base.
INFO:example:Prompt used for response generation: System: You are a helpful, respectful and honest assistant.
Always answer as helpfully as possible, while being safe.
Please ensure that your responses are positive in nature.
Human:
Question: rag
INFO: 172.19.0.5:49858 - "POST /generate HTTP/1.1" 200 OK
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect
message = await receive()
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive
await self.message_event.wait()
File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope fffe8716d810
During handling of the above exception, another exception occurred:
Exception Group Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
| result = await app( # type: ignore[func-returns-value]
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
| return await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
| await super().call(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
| await self.app(scope, receive, _send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in call
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
| await route.handle(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
| await response(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 257, in call
| async with anyio.create_task_group() as task_group:
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 736, in aexit
| raise BaseExceptionGroup(
| exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap
| await func()
| File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 249, in stream_response
| async for chunk in self.body_iterator:
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
| yield await anyio.to_thread.run_sync(_next, as_iterator)
| File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
| return await get_async_backend().run_sync_in_worker_thread(
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
| return await future
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 914, in run
| result = context.run(func, *args)
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 54, in _next
| return next(iterator)
| File "/opt/RAG/src/chain_server/server.py", line 358, in response_generator
| for chunk in generator:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2446, in stream
| yield from self.transform(iter([input]), config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2433, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1513, in _transform_stream_with_config
| chunk: Output = context.run(next, iterator) # type: ignore
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2397, in _transform
| for output in final_pipeline:
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/output_parsers/transform.py", line 50, in transform
| yield from self._transform_stream_with_config(
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1489, in _transform_stream_with_config
| final_input: Optional[Input] = next(input_for_tracing, None)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1061, in transform
| yield from self.stream(final, config, kwargs)
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 250, in stream
| raise e
| File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 234, in stream
| for chunk in self._stream(
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/chat_models.py", line 231, in _stream
| for response in self._client.client.get_req_stream(payload=payload):
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 418, in get_req_stream
| self._try_raise(response)
| File "/usr/local/lib/python3.10/dist-packages/langchain_nvidia_ai_endpoints/_common.py", line 311, in _try_raise
| raise Exception(f"{header}\n{body}") from None
| Exception: [401] Unauthorized
| Bearer error="invalid_token"
| error_description="Bearer token is malformed"
| error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
| Please check or regenerate your API key.
+------------------------------------
╭─░▒▓ ~ ────────────
[+] Running 5/5 ✔ Container milvus-etcd Started 0.3s ✔ Container milvus-minio Started 0.3s ✔ Container chain-server Started 0.2s ✔ Container milvus-standalone Started 0.4s ✔ Container rag-playground Started 0.3s ❯ docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Status}}" CONTAINER ID NAMES STATUS 3a447f023622 rag-playground Up 8 minutes 96a6762b0113 chain-server Up 8 minutes ff4ebdfa15b6 milvus-standalone Up 8 minutes 662cc72b09d8 milvus-minio Up 8 minutes (unhealthy) f3fbd91ef0e5 milvus-etcd Up 8 minutes (healthy) ed18e9aa80c6 buildx_buildkit_builder0 Up 24 hours
ERROR:: (in web interface chat) "Failed to get response from /generate endpoint of chain-server. Check if the fastapi server in chain-server is up. Refer to chain-server logs for details."
docker logs 96a6762b01134ab4d62fc07009f3d9e38cc797784d4fb354b974d466f673058c INFO: Started server process [1] INFO: Waiting for application startup. INFO:faiss.loader:Loading faiss. INFO:faiss.loader:Successfully loaded faiss. INFO:RAG.src.chain_server.utils:Using nvidia-ai-endpoints as model engine and nvidia/nv-embedqa-e5-v5 and model for embeddings INFO:RAG.src.chain_server.utils:Using embedding model nvidia/nv-embedqa-e5-v5 hosted at api catalog INFO:RAG.src.chain_server.utils:Using milvus collection: nvidia_api_catalog INFO:RAG.src.chain_server.utils:Vector store created and saved. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8081 (Press CTRL+C to quit) INFO:example:Using llm to generate response directly without knowledge base. INFO:RAG.src.chain_server.utils:Using nvidia-ai-endpoints as model engine for llm. Model name: meta/llama3-70b-instruct WARNING:RAG.src.chain_server.utils:The following parameters from kwargs are not supported: ['stop'] for nvidia-ai-endpoints INFO:RAG.src.chain_server.utils:Using llm model meta/llama3-70b-instruct from api catalog INFO:example:Prompt used for response generation: System: You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Please ensure that your responses are positive in nature.
Human:
Question: what is rag
INFO: 172.19.0.5:59680 - "POST /generate HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call await wrap(partial(self.listen_for_disconnect, receive)) File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap await func() File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect message = await receive() File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive await self.message_event.wait() File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait await fut asyncio.exceptions.CancelledError: Cancelled by cancel scope fffee886fb80
During handling of the above exception, another exception occurred:
Human:
Question: rag
INFO: 172.19.0.5:53786 - "POST /generate HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call await wrap(partial(self.listen_for_disconnect, receive)) File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap await func() File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect message = await receive() File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive await self.message_event.wait() File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait await fut asyncio.exceptions.CancelledError: Cancelled by cancel scope fffee7355bd0
During handling of the above exception, another exception occurred:
Human:
Question: rag
INFO: 172.19.0.5:49858 - "POST /generate HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 264, in call await wrap(partial(self.listen_for_disconnect, receive)) File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 260, in wrap await func() File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 237, in listen_for_disconnect message = await receive() File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 580, in receive await self.message_event.wait() File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait await fut asyncio.exceptions.CancelledError: Cancelled by cancel scope fffe8716d810
During handling of the above exception, another exception occurred: