---
depth: 2
local: true
backlinks: none
---
-
Edit the
RetrievalAugmentedGeneration/examples/simple_rag_api_catalog/chains.pyfile and add the following statements after theimportstatements.The following statements use the FAISS vector store for the embeddings that the NVIDIA API Catalog model creates.
:language: python :start-after: start-ingest-faiss :end-before: end-ingest-faiss -
Add the import statements for libraries:
:language: python :start-after: start-ingest-imports :end-before: end-ingest-imports -
Update the
ingest_docsmethod with the following statements::language: python :start-after: start-ingest-docs-method :end-before: end-ingest-docs-method
Using the containers has one additional step this time: exporting your NVIDIA API key as an environment variable.
-
Build the container for the Chain Server:
$ docker compose --env-file deploy/compose/compose.env -f deploy/compose/simple-rag-api-catalog.yaml build chain-server -
Export your NVIDIA API key in an environment variable:
$ export NVIDIA_API_KEY=nvapi-... -
Run the containers:
$ docker compose --env-file deploy/compose/compose.env -f deploy/compose/simple-rag-api-catalog.yaml up -d
You can access the Chain Server with a URL like http://localhost:8081.
-
Confirm the
ingest_docsmethod runs by uploading a sample document, such as the README from the repository:$ curl http://localhost:8081/documents -F "file=@README.md"Example Output
:language: jsonView the logs for the Chain Server to see the logged message from the method:
$ docker logs chain-serverExample Output
:language: output