* @summary Builds one Chroma query option with a valid optional where clause. * @param {Object} options * @returns {Object} Chroma query options.
({queryEmbeddingValues, requesterTenantId, typeFilter, nResults})
| 384 | * @returns {Object} Chroma query options. |
| 385 | */ |
| 386 | createQueryOption({queryEmbeddingValues, requesterTenantId, typeFilter, nResults}) { |
| 387 | const where = this.createWhereClause({requesterTenantId, typeFilter}); |
| 388 | const option = { |
| 389 | queryEmbeddings: [queryEmbeddingValues], |
| 390 | nResults |
| 391 | }; |
| 392 | |
| 393 | if (where) { |
| 394 | option.where = where; |
| 395 | } |
| 396 | |
| 397 | return option; |
| 398 | } |
| 399 | |
| 400 | /** |
| 401 | * @summary Creates a Chroma metadata filter without emitting invalid empty objects. |
no test coverage detected