MCPcopy Create free account
hub / github.com/neomjs/neo / createQueryOption

Method createQueryOption

ai/services/knowledge-base/QueryService.mjs:386–398  ·  view source on GitHub ↗

* @summary Builds one Chroma query option with a valid optional where clause. * @param {Object} options * @returns {Object} Chroma query options.

({queryEmbeddingValues, requesterTenantId, typeFilter, nResults})

Source from the content-addressed store, hash-verified

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.

Callers 2

createQueryOptionsMethod · 0.95

Calls 1

createWhereClauseMethod · 0.95

Tested by

no test coverage detected