8000 wip by adiom-mark · Pull Request #230 · adiom-data/dsync · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wip #230

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

wip #230

wants to merge 1 commit into from

Conversation

adiom-mark
Copy link
Collaborator

In cmd/grpcexample/main.go
replace the existing EmbeddingServiceHandler with something like:

epath, ehandler := adiomv1connect.NewEmbeddingServiceHandler(vector.NewOllama("http://localhost:11434/api", "nomic-embed-text"))

Run go run cmd/grpcexample/main.go

Create a collection like this:

package main

import (
	"context"

	"github.com/qdrant/go-client/qdrant"
)

func main() {
	client, err := qdrant.NewClient(&qdrant.Config{
		Host: "localhost",
		Port: 6334,
	})
	if err != nil {
		panic(err)
	}

	client.CreateCollection(context.Background(), &qdrant.CreateCollection{
		CollectionName: "test_collection",
		VectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{
			Size:     768,
			Distance: qdrant.Distance_Cosine,
		}),
	})

}

Run qdrant

docker pull qdrant/qdrant
docker run -d -p 6333:6333 -p 6334:6334 \
    -v "$(pwd)/qdrant_storage:/qdrant/storage:z" \
    qdrant/qdrant

example dsync run cmd with movie dataset:

 go run main.go -ns test.movies:test_collection --verbosity DEBUG mongodb://localhost:27017 --max-page-size 300 qdrant --host localhost --port 6334 grpc://localhost:8085 --insecure

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.

1 participant
0