client

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
}

Client is a client for the RAG API

func NewClient

func NewClient(baseURL string) *Client

NewClient creates a new RAG API client

func (*Client) CreateCollection

func (c *Client) CreateCollection(name string) error

CreateCollection creates a new collection

func (*Client) DeleteEntry

func (c *Client) DeleteEntry(collection, entry string) ([]string, error)

DeleteEntry deletes an Entry in a collection and return the entries left

func (*Client) ListCollections

func (c *Client) ListCollections() ([]string, error)

ListCollections lists all collections

func (*Client) ListEntries

func (c *Client) ListEntries(collection string) ([]string, error)

ListCollections lists all collections

func (*Client) Reset

func (c *Client) Reset(collection string) error

func (*Client) Search

func (c *Client) Search(collection, query string, maxResults int) ([]types.Result, error)

Search searches a collection

func (*Client) Store

func (c *Client) Store(collection, filePath string) error

Store uploads a file to a collection

Jump to

Keyboard shortcuts

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