chromadb 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,7 +40,10 @@ const collection = await chroma.createCollection({ name: "my-collection" });
40
40
  // Add documents to the collection
41
41
  await collection.add({
42
42
  ids: ["id1", "id2"],
43
- embeddings: [[1.1, 2.3, 3.2], [4.5, 6.9, 4.4]],
43
+ embeddings: [
44
+ [1.1, 2.3, 3.2],
45
+ [4.5, 6.9, 4.4],
46
+ ],
44
47
  metadatas: [{ source: "doc1" }, { source: "doc2" }],
45
48
  documents: ["Document 1 content", "Document 2 content"],
46
49
  });
@@ -61,13 +64,13 @@ import { ChromaClient, OpenAIEmbeddingFunction } from "chromadb";
61
64
 
62
65
  const embedder = new OpenAIEmbeddingFunction({
63
66
  openai_api_key: "your-api-key",
64
- model_name: "text-embedding-ada-002"
67
+ model_name: "text-embedding-ada-002",
65
68
  });
66
69
 
67
70
  const chroma = new ChromaClient({ path: "http://localhost:8000" });
68
71
  const collection = await chroma.createCollection({
69
72
  name: "my-collection",
70
- embeddingFunction: embedder
73
+ embeddingFunction: embedder,
71
74
  });
72
75
 
73
76
  // Now you can add documents without providing embeddings
@@ -92,4 +95,4 @@ const results = await collection.query({
92
95
 
93
96
  ## License
94
97
 
95
- Apache 2.0
98
+ Apache 2.0