NVIDIA / GenerativeAIExamples

Generative AI reference workflows optimized for accelerated infrastructure and microservice architecture.
Apache License 2.0
2.47k stars 534 forks source link

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

Open Minxiangliu opened 6 months ago

Minxiangliu commented 6 months ago

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

SauravSinghPaliwal commented 2 months ago

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:
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:
  1. Modify the Dockerfile in the directory GenerativeAIExamples/industries/healthcare/medical-device-training-assistant/src/rag_playground/Dockerfile:

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.