qdrant / go-client

Go client for Qdrant vector search engine
Apache License 2.0
147 stars 14 forks source link

Example doesn't work? #26

Closed akfaew closed 2 months ago

akfaew commented 1 year ago

Hello,

I'm trying to run the examples/authentication code. I run it as:

$ go run . -addr xxxxxxx.us-east-1-0.aws.cloud.qdrant.io:6333
2023/06/07 08:39:51 could not get collections: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 464 (); malformed header: missing HTTP content-type
exit status 1

I have manually edited line 35 to contain my API key.

generall commented 1 year ago

Hi @akfaew, thanks for reaching out! It seems you are using REST port (6333), while go client works with gRPC port (6334)

Please try runnning the command with go run . -addr xxxxxxx.us-east-1-0.aws.cloud.qdrant.io:6334

The expected output should be:

Similar to this:

go run examples/authentication/main.go -addr 6eb7695c-e21f-459c-aa8f-9adb06594876.eu-central-1-0.aws.cloud.qdrant.io:6334
2023/06/08 11:41:26 List of collections: [name:"collection-concurrent-lifecycle-drill"]