Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed May 26, 2023
1 parent ffbad51 commit 35505fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions experimental/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ type ChunkInterface interface {
// Interface returned should be of type Documents or Chunk
Query(query string, topK int, sorted bool) (*interface{}, error)
}
type Client struct {
Chunk ChunkInterface
}

type ClientInterface interface {
// This should handle encoding and finding the correct chunk to add the document to
Add(text string) error
// Queries return a pointer to a Documents struct. This means that you can remove documents from the returned struct and it will be reflected in the database.
Query(queries []string, topK int, sorted bool) (*Documents, error)
// Returns a Chunk in an optimized format. It might be difficult to write to the returned database
GetOptimized() (Chunk, error)
}

0 comments on commit 35505fb

Please sign in to comment.