Skip to content

Commit 9c8e3f5

Browse files
committed
always add default values and merge user inputs
1 parent b02aefe commit 9c8e3f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store/src/Bridge/ChromaDb/Store.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public function add(VectorDocument ...$documents): void
5757
*/
5858
public function query(Vector $vector, array $options = []): iterable
5959
{
60-
$include = null;
60+
$include ??= ['embeddings', 'metadatas', 'distances'];
6161
if ([] !== ($options['include'] ?? [])) {
6262
$include = array_values(
6363
array_unique(
64-
array_merge(['embeddings', 'metadatas', 'distances'], $options['include'])
64+
array_merge($include, $options['include'])
6565
)
6666
);
6767
}

0 commit comments

Comments
 (0)