GenerativeAIExamples icon indicating copy to clipboard operation
GenerativeAIExamples copied to clipboard

Unable to upload files in Q&A Chatbot's RAG service

Open Minxiangliu opened this issue 1 year ago • 1 comments

Hi there, I'm currently trying to build a Q&A Chatbot using the example here. Since my GPU model is A30 (with two 20GB GPUs), I'm using a smaller-scale model: llama-2-7B-chat. I followed the instructions in the example to set up the service, but I'm having trouble uploading knowledge documents. What can I do here to solve the problem?

image

image

Minxiangliu avatar May 10 '24 06:05 Minxiangliu

To resolve the problem, the following modifications need to be made:

  1. Update requirements.txt in the directory GenerativeAIExamples/industries/healthcare/medical-device-training-assistant/chain_server/requirements.txt: Add langchain-community to the list of libraries. The updated requirements.txt should look like this:
  • requirements.txt
fastapi
uvicorn[standard]
python-multipart
langchain
unstructured[all-docs]
sentence-transformers
llama-index-core
llama-index-readers-file
llama-index-llms-langchain
llama-index-embeddings-langchain
llama-index-vector-stores-milvus
llama-index-vector-stores-postgres
pymilvus[model]
dataclass-wizard
opencv-python
minio
asyncpg
psycopg2-binary
pgvector
langchain-core
langchain-nvidia-ai-endpoints
langchain-community  # Added this
opentelemetry-sdk
opentelemetry-api
opentelemetry-exporter-otlp-proto-grpc
faiss-cpu
httpcore
httpx
bleach
flatdict
chardet

  1. Modify the Dockerfile in the directory GenerativeAIExamples/industries/healthcare/medical-device-training-assistant/chain_server/Dockerfile:
  • Replace line 11 with apt install -y curl software-properties-common libgl1 libglib2.0-0 libmagic1 libmagic-dev && \
  1. Modify the Dockerfile in the directory GenerativeAIExamples/industries/healthcare/medical-device-training-assistant/src/rag_playground/Dockerfile:
  • Replace line 11 with: apt install -y dpkg openssl libgl1 linux-libc-dev libksba8 curl software-properties-common build-essential libssl-dev libffi-dev ffmpeg && \

These changes should ensure that the correct libraries are installed and that all dependencies required for both the chain server and RAG playground are properly configured.

SauravSinghPaliwal avatar Sep 12 '24 09:09 SauravSinghPaliwal