chromadb 0.2.0 copy "chromadb: ^0.2.0" to clipboard
chromadb: ^0.2.0 copied to clipboard

Dart Client for the Chroma open-source embedding database API.

example/chromadb_example.dart

// ignore_for_file: avoid_print
import 'package:chromadb/chromadb.dart';

void main() async {
  final client = ChromaClient();
  final collection = await client.createCollection(name: 'test');
  await collection.add(
    ids: ['id1', 'id2'],
    embeddings: [
      [1.0, 2.0, 3.0],
      [4.0, 5.0, 6.0],
    ],
    metadatas: [
      {'source': 'source1'},
      {'source': 'source2'},
    ],
  );
  final result = await collection.query(
    nResults: 2,
    queryEmbeddings: [
      [1.0, 2.0, 3.0],
    ],
  );
  print(result);
}
14
likes
0
points
38
downloads

Publisher

verified publisherlangchaindart.dev

Weekly Downloads

Dart Client for the Chroma open-source embedding database API.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #nlp #vector-db

Documentation

Documentation

License

unknown (license)

Dependencies

freezed_annotation, http, json_annotation, meta

More

Packages that depend on chromadb