From 3da5527c3dd0474fe82555d90b14e858a1bf752f Mon Sep 17 00:00:00 2001 From: Rob Whelan Date: Thu, 19 Oct 2023 14:44:53 +0200 Subject: [PATCH 1/2] re-add vector prov to readme --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index 8a4d0984..222ad51a 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,49 @@ where: which Azure deployment to use in place of each model you wish to be used. +### Provisioning vector services + +The vector services of the plugin allow certain AI-based features to perform semantic search to improve the responses given by LLMs. Configuration is in roughly three parts: + +- 'global' vector settings: + - `enabled` - whether to enable or disable vector services overall + - `model` - the name of the model to use to calculate embeddings for searches. This must match the model used when storing the data, or the embeddings will be meaningless. +- 'embedding' vector settings (`embed`): + - `type` - must be `openai`, for now. + - `openai` - custom settings for OpenAI embeddings, with keys: + - `url` - the URL to the OpenAI instance. +- 'store' vector settings (`store`): + - `type` - the type of vector store to connect to, either `qdrant` to use [Qdrant](https://qdrant.tech) or `grafana/vectorapi` to use Grafana's own vector API. + - `qdrant`, if `type` is `qdrant`, with keys: + - `address` - the address of the Qdrant server. Note that this uses a gRPC connection. + - `secure` - boolean, whether to use a secure connection. If you're using a secure connection you can set the `qdrantApiKey` field in `secureJsonData` to provide an API key with each request. + - `grafanaVectorAPI`, if `type` is `grafana/vectorapi`, with keys: + - `url` - the URL of the Grafana VectorAPI instance. + +**Qdrant example** + +```yaml +apiVersion: 1 + +apps: + - type: 'grafana-llm-app' + disabled: false + jsonData: + vector: + enabled: true + model: text-embedding-ada-002 + embed: + type: openai + store: + type: qdrant + qdrant: + address: localhost:6334 + secure: true + secureJsonData: + openAIKey: $OPENAI_API_KEY + qdrantApiKey: $QDRANT_API_KEY +``` + ## Adding LLM features to your plugin or Grafana core To make use of this plugin when adding LLM-based features, you can use the helper functions in the `@grafana/experimental` package. From 7d6cf2d29a3d4f4605c01b4ab8a6701ad6fb4a23 Mon Sep 17 00:00:00 2001 From: Edward Qian Date: Mon, 30 Oct 2023 10:06:48 -0400 Subject: [PATCH 2/2] update vector provisioning instructions --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 222ad51a..f145f5cd 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,13 @@ The vector services of the plugin allow certain AI-based features to perform sem - `enabled` - whether to enable or disable vector services overall - `model` - the name of the model to use to calculate embeddings for searches. This must match the model used when storing the data, or the embeddings will be meaningless. - 'embedding' vector settings (`embed`): - - `type` - must be `openai`, for now. - - `openai` - custom settings for OpenAI embeddings, with keys: + - `type` - the type of embedding service, either `openai` or `grafana/vectorapi` to use Grafana's own vector API. + - `openai`, if `type` is `openai`, with keys: - `url` - the URL to the OpenAI instance. + - `grafanaVectorAPI` - custom settings for OpenAI embeddings, with keys: + - `url` - the URL to the OpenAI instance. + - `authType` - the type of authentication to use, either `no-auth` or `basic-auth`. + - `basicAuthUser` - the username to use if `authType` is `basic-auth`. - 'store' vector settings (`store`): - `type` - the type of vector store to connect to, either `qdrant` to use [Qdrant](https://qdrant.tech) or `grafana/vectorapi` to use Grafana's own vector API. - `qdrant`, if `type` is `qdrant`, with keys: @@ -105,6 +109,8 @@ The vector services of the plugin allow certain AI-based features to perform sem - `secure` - boolean, whether to use a secure connection. If you're using a secure connection you can set the `qdrantApiKey` field in `secureJsonData` to provide an API key with each request. - `grafanaVectorAPI`, if `type` is `grafana/vectorapi`, with keys: - `url` - the URL of the Grafana VectorAPI instance. + - `authType` - the type of authentication to use, either `no-auth` or `basic-auth`. + - `basicAuthUser` - the username to use if `authType` is `basic-auth`. **Qdrant example** @@ -127,7 +133,8 @@ apps: secure: true secureJsonData: openAIKey: $OPENAI_API_KEY - qdrantApiKey: $QDRANT_API_KEY + vectorStoreBasicAuthPassword: $STORE_PASSWORD + vectorEmbedderBasicAuthPassword: $EMBEDDER_PASSWORD ``` ## Adding LLM features to your plugin or Grafana core