Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-add vector provisioning details to readme #111

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,56 @@ 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` - 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:
- `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.
- `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**

```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
vectorStoreBasicAuthPassword: $STORE_PASSWORD
vectorEmbedderBasicAuthPassword: $EMBEDDER_PASSWORD
```

## 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.
Expand Down