cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *cobra.Command

Types

type Client

type Client struct {
	Server string `usage:"URL of the Knowledge API Server" default:"" env:"KNOW_SERVER_URL"`
	types.OpenAIConfig
	types.DatabaseConfig
	types.VectorDBConfig
}

type ClientCreateDataset

type ClientCreateDataset struct {
	Client
	EmbedDim int `usage:"Embedding dimension" default:"1536"`
}

func (*ClientCreateDataset) Customize

func (s *ClientCreateDataset) Customize(cmd *cobra.Command)

func (*ClientCreateDataset) Run

func (s *ClientCreateDataset) Run(cmd *cobra.Command, args []string) error

type ClientDeleteDataset

type ClientDeleteDataset struct {
	Client
}

func (*ClientDeleteDataset) Customize

func (s *ClientDeleteDataset) Customize(cmd *cobra.Command)

func (*ClientDeleteDataset) Run

func (s *ClientDeleteDataset) Run(cmd *cobra.Command, args []string) error

type ClientGetDataset

type ClientGetDataset struct {
	Client
}

func (*ClientGetDataset) Customize

func (s *ClientGetDataset) Customize(cmd *cobra.Command)

func (*ClientGetDataset) Run

func (s *ClientGetDataset) Run(cmd *cobra.Command, args []string) error

type ClientIngest

type ClientIngest struct {
	Client
	Dataset          string `usage:"Target Dataset ID" short:"d" default:"default" env:"KNOW_TARGET_DATASET"`
	IgnoreExtensions string `usage:"Comma-separated list of file extensions to ignore" env:"KNOW_INGEST_IGNORE_EXTENSIONS"`
	Concurrency      int    `usage:"Number of concurrent ingestion processes" short:"c" default:"10" env:"KNOW_INGEST_CONCURRENCY"`
	Recursive        bool   `usage:"Recursively ingest directories" short:"r" default:"false" env:"KNOW_INGEST_RECURSIVE"`
}

func (*ClientIngest) Customize

func (s *ClientIngest) Customize(cmd *cobra.Command)

func (*ClientIngest) Run

func (s *ClientIngest) Run(cmd *cobra.Command, args []string) error

type ClientListDatasets

type ClientListDatasets struct {
	Client
}

func (*ClientListDatasets) Customize

func (s *ClientListDatasets) Customize(cmd *cobra.Command)

func (*ClientListDatasets) Run

func (s *ClientListDatasets) Run(cmd *cobra.Command, args []string) error

type ClientResetDatastore

type ClientResetDatastore struct {
	Client
}

func (*ClientResetDatastore) Customize

func (s *ClientResetDatastore) Customize(cmd *cobra.Command)

func (*ClientResetDatastore) Run

func (s *ClientResetDatastore) Run(cmd *cobra.Command, args []string) error

type ClientRetrieve

type ClientRetrieve struct {
	Client
	Dataset string `usage:"Target Dataset ID" short:"d" default:"default" env:"KNOW_TARGET_DATASET"`
	TopK    int    `usage:"Number of sources to retrieve" short:"k" default:"5"`
}

func (*ClientRetrieve) Customize

func (s *ClientRetrieve) Customize(cmd *cobra.Command)

func (*ClientRetrieve) Run

func (s *ClientRetrieve) Run(cmd *cobra.Command, args []string) error

type Knowledge

type Knowledge struct{}

func (*Knowledge) Run

func (c *Knowledge) Run(cmd *cobra.Command, _ []string) error

type Server

type Server struct {
	ServerURL     string `usage:"Server URL" default:"http://localhost" env:"KNOW_SERVER_URL"`
	ServerPort    string `usage:"Server port" default:"8000" env:"KNOW_SERVER_PORT"`
	ServerAPIBase string `usage:"Server API base" default:"/v1" env:"KNOW_SERVER_API_BASE"`

	types.OpenAIConfig
	types.DatabaseConfig
	types.VectorDBConfig
}

Server is the Server CLI command

func (*Server) Run

func (s *Server) Run(cmd *cobra.Command, _ []string) error

Jump to

Keyboard shortcuts

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