diff --git a/retrieval-augmented-generation/README.md b/retrieval-augmented-generation/README.md index c2bc987f2..45cf0c876 100644 --- a/retrieval-augmented-generation/README.md +++ b/retrieval-augmented-generation/README.md @@ -120,6 +120,19 @@ have created a tenant at tenant name, it will be used in the next steps. For more information, see the Vespa Cloud [getting started](https://cloud.vespa.ai/en/getting-started) guide. +Add your OpenAI API key to the Vespa secret store as described in +[Secret Management](https://cloud.vespa.ai/en/security/secret-store.html#secret-management). +Create a new vault, unless you already have one, and add your OpenAI API key +as a secret. + +The `services.xml` file must refer to the newly added secret in the secret store. +Replace `` and `` below with your own values: +
+    <secrets>
+      <openai-api-key vault="<my-vault-name>" name="<my-secret-name>"/>
+    </secrets>
+
+ Configure the vespa client. Replace `tenant-name` below with your tenant name. We use the application name `rag-app` here, but you are free to choose your own application name: @@ -171,6 +184,10 @@ $ vespa query \ traceLevel=1 +On Vespa cloud, just skip the `--header` parameter, as the API key is already +set up in the services.xml file, and will be retrieved from the Vespa secret +store. + Here, we specifically set the search chain to `openai`. This calls the `RAGSearcher` which is set up to use the `OpenAI` client. Note that this requires an OpenAI API key, which is sent in the header. We also add a timeout @@ -228,4 +245,3 @@ To remove the application from Vespa Cloud:
 $ vespa destroy
 
- diff --git a/retrieval-augmented-generation/services.xml b/retrieval-augmented-generation/services.xml index 499ca4e59..826069043 100644 --- a/retrieval-augmented-generation/services.xml +++ b/retrieval-augmented-generation/services.xml @@ -6,8 +6,16 @@ + + + + - + + + openai-api-key + +