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

Add qdrant read vector store implementation #43

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

sd2k
Copy link
Contributor

@sd2k sd2k commented Sep 12, 2023

PR #33 can't really be merged until we open-source and package up vectorapi, so this commit adds a qdrant implementation and modifies the provisioning file to use it (and OpenAI) by default, rather than vectorapi.

Still a little hard to test without any way of synchronising data in there, I've been working on https://github.com/grafana/grafana-llm-app/compare/vector-service-qdrant...vector-sync-2?expand=1 to make it a bit easier to get data in and test it but it's not really ideal.

@sd2k sd2k force-pushed the vector-service-qdrant branch 2 times, most recently from a68c495 to 3805348 Compare September 12, 2023 08:10
@sd2k sd2k marked this pull request as ready for review September 12, 2023 09:01
PR #33 can't really be merged until we open-source and package up
vectorapi, so this commit adds a qdrant implementation and modifies
the provisioning file to use it (and OpenAI) by default, rather than
vectorapi.
Copy link
Collaborator

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me and I like having a more concrete option to start with.

pkg/plugin/vector/store/qdrant.go Outdated Show resolved Hide resolved
Otherwise the payloads are JSON marshaled like this:

```json
{"results":[{"payload":{"description":{"Kind":{"NullValue":0}},"panels":{"Kind":{"ListValue":{"values":[{"Kind":{"StructValue":{"fields":{"description":{"Kind":{"StringValue":"CPU usage of Mimir"}},"title":{"Kind":{"StringValue":"CPU usage"}}}}}}]}}},"title":{"Kind":{"StringValue":"Mimir resource usage"}}},"score":0.7932371497154236}]}
```

instead of what we want (after this PR):

```json
{"results":[{"payload":{"description":null,"panels":[{"description":"CPU usage of Mimir","title":"CPU usage"}],"title":"Mimir resource usage"},"score":0.7932371497154236}]}
```
@sd2k
Copy link
Contributor Author

sd2k commented Sep 13, 2023

I noticed an issue with the payload marshalling due to the payload being stored in a bunch of nested gRPC structs. Should be fixed by cba49f6.

@sd2k sd2k merged commit 977f0b0 into vector-service Sep 13, 2023
1 check passed
@sd2k sd2k deleted the vector-service-qdrant branch September 13, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants