Skip to content

installers.db.qdrant_installer #

qdrant

Is a powerfull db for embedding for AI Agents.

To get started


import incubaid.herolib.installers.db.qdrant_installer

heroscript:='
!!qdrant.configure name:'test'
    password: '1234'
    port: 7701

!!qdrant.start name:'test' reset:1 
'

qdrant_installer.play(heroscript=heroscript)!

//or we can call the default and do a start with reset
//mut installer:= qdrant_installer.get()!
//installer.start(reset:true)!

Constants #

const version = '1.13.4'

fn delete #

fn delete(args ArgsGet) !

fn exists #

fn exists(args ArgsGet) !bool

does the config exists?

fn get #

fn get(args ArgsGet) !&QDrant

fn heroscript_dumps #

fn heroscript_dumps(obj QDrant) !string

///////////NORMALLY NO NEED TO TOUCH

fn heroscript_loads #

fn heroscript_loads(heroscript string) !QDrant

fn list #

fn list(args ArgsList) ![]&QDrant

if fromdb set: load from filesystem, and not from mem, will also reset what is in mem

fn new #

fn new(args ArgsGet) !&QDrant

fn play #

fn play(mut plbook PlayBook) !

fn set #

fn set(o QDrant) !

register the config for the future

fn switch #

fn switch(name string)

switch instance to be used for qdrant_installer

struct ArgsGet #

@[params]
struct ArgsGet {
pub mut:
	name   string = 'default'
	fromdb bool // will load from filesystem
	create bool // default will not create if not exist
}

///////FACTORY

struct ArgsList #

@[params]
struct ArgsList {
pub mut:
	fromdb bool // will load from filesystem
}

struct InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset bool
}

struct QDrant #

@[heap]
struct QDrant {
pub mut:
	name       string = 'default'
	homedir    string
	configpath string
	username   string
	password   string @[secret]
	title      string
	host       string
	port       int
}

THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED

fn (QDrant) build #

fn (mut self QDrant) build() !

fn (QDrant) destroy #

fn (mut self QDrant) destroy() !

fn (QDrant) install #

fn (mut self QDrant) install(args InstallArgs) !

fn (QDrant) install_start #

fn (mut self QDrant) install_start(args InstallArgs) !

fn (QDrant) reload #

fn (mut self QDrant) reload() !

load from disk and make sure is properly intialized

fn (QDrant) restart #

fn (mut self QDrant) restart() !

fn (QDrant) running #

fn (mut self QDrant) running() !bool

fn (QDrant) start #

fn (mut self QDrant) start() !

fn (QDrant) stop #

fn (mut self QDrant) stop() !