client

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 10 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) GetEntryContent added in v0.5.3

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

GetEntryContent returns the chunks (id, content, metadata) for a specific entry in a collection.

func (*Client) ListCollections

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

ListCollections lists all collections

func (*Client) ListEntries

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

ListEntries lists all entries in a collection

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

type EntryChunk added in v0.5.3

type EntryChunk struct {
	ID       string            `json:"id"`
	Content  string            `json:"content"`
	Metadata map[string]string `json:"metadata"`
}

EntryChunk is a single chunk of an entry's content (id, content, metadata only).

Jump to

Keyboard shortcuts

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