NAME

WebService::Chroma - chromadb client

VERSION

Version 0.03

SYNOPSIS

use WebService::Chroma;

my $chroma = WebService::Chroma->new(
	embeddings_class => 'OpenAI' # you will need OPENAI_API_KEY env variable set
);

my $version = $chroma->version();

my $tenant = $chroma->create_tenant(
	name => 'testing-tenant'
);

my $db = $tenant->create_database(
	name => 'testing-db'
);

my $collection = $db->create_collection(
	name => 'testing'
);

...

my $db = $chroma->get_tenant(
	name => 'testing-tenant'
)->get_database(
	name => 'testing-db'
);

my $collection = $db->get_collection(
	name => 'testing'
);

$collection->add(
	documents => [
		'a blue scarf, a red hat, a woolly jumper, black gloves',
		'a pink scarf, a blue hat, a woolly jumper, green gloves'
	],
	ids => [
		"1",
		"2"
	]
);

$collection->query(
	query_texts => [
		'a pink scarf, a blue hat, green gloves'
	],
	n_results => 1
);

Description

Chroma is the AI-native open-source vector database. Chroma makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.

https://docs.trychroma.com/getting-started https://docs.trychroma.com/deployment/client-server-mode

chroma run --path /db_path

http://localhost:8000/docs

Methods

version

reset

heartbeat

pre_flight_checks

auth_identity

create_tenant

get_tenant

get_database

get_collection

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-webservice-chroma at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Chroma. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WebService::Chroma

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2024 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)