qdrant

package
v0.0.0-...-1bfb889 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCollectionClient

func NewCollectionClient(conn *grpc.ClientConn) (collectionClient pb.CollectionsClient)

func NewConn

func NewConn() (conn *grpc.ClientConn, err error)

func NewPointsClient

func NewPointsClient(conn *grpc.ClientConn) (pointsClient pb.PointsClient)

func NewQdRantClient

func NewQdRantClient(ctx context.Context, conn *grpc.ClientConn) (qdrantClient pb.QdrantClient, err error)

func ToEmbeddings

func ToEmbeddings(ctx context.Context, client *openai.Client, m *DataModel) (prompt, completion string, embedding []float32, err error)

func ToUpsertPoint

func ToUpsertPoint(collectionName, prompt, completion string, embedding []float32, count uint64) *pb.UpsertPoints

Types

type ClientSet

type ClientSet struct {
	pb.QdrantClient
	pb.CollectionsClient
	pb.PointsClient
	// contains filtered or unexported fields
}

func InitHandler

func InitHandler(ctx *gin.Context, collectionName string) (clientSet *ClientSet, err error)

func NewClientSet

func NewClientSet(ctx context.Context) (clientSet *ClientSet, err error)

func (*ClientSet) ConnClose

func (c *ClientSet) ConnClose() error

type DataModel

type DataModel struct {
	Prompt     string `json:"prompt"`
	Completion string `json:"completion"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL