Record Class ChromaApi.QueryRequest
java.lang.Object
java.lang.Record
org.springframework.ai.chroma.vectorstore.ChromaApi.QueryRequest
- Record Components:
queryEmbeddings- The embeddings to get the closes neighbors of.nResults- The number of neighbors to return for each query_embedding or query_texts.where- Condition to filter results based on metadata values.include- A list of what to include in the results. Can contain "embeddings", "metadatas", "documents", "distances". Ids are always included. Defaults to [metadatas, documents, distances].
- Enclosing class:
- ChromaApi
public static record ChromaApi.QueryRequest(List<float[]> queryEmbeddings, Integer nResults, Map<String,Object> where, List<ChromaApi.QueryRequest.Include> include)
extends Record
Request to get the nResults nearest neighbor embeddings for provided
queryEmbeddings.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQueryRequest(float[] queryEmbedding, Integer nResults) Convenience to query for a single embedding instead of a batch of embeddings.QueryRequest(float[] queryEmbedding, Integer nResults, Map<String, Object> where) QueryRequest(List<float[]> queryEmbeddings, Integer nResults, Map<String, Object> where, List<ChromaApi.QueryRequest.Include> include) Creates an instance of aQueryRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.include()Returns the value of theincluderecord component.nResults()Returns the value of thenResultsrecord component.List<float[]>Returns the value of thequeryEmbeddingsrecord component.final StringtoString()Returns a string representation of this record class.where()Returns the value of thewhererecord component.
-
Constructor Details
-
QueryRequest
Convenience to query for a single embedding instead of a batch of embeddings. -
QueryRequest
-
QueryRequest
public QueryRequest(List<float[]> queryEmbeddings, Integer nResults, @Nullable Map<String, Object> where, List<ChromaApi.QueryRequest.Include> include) Creates an instance of aQueryRequestrecord class.- Parameters:
queryEmbeddings- the value for thequeryEmbeddingsrecord componentnResults- the value for thenResultsrecord componentwhere- the value for thewhererecord componentinclude- the value for theincluderecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
queryEmbeddings
Returns the value of thequeryEmbeddingsrecord component.- Returns:
- the value of the
queryEmbeddingsrecord component
-
nResults
Returns the value of thenResultsrecord component.- Returns:
- the value of the
nResultsrecord component
-
where
Returns the value of thewhererecord component.- Returns:
- the value of the
whererecord component
-
include
Returns the value of theincluderecord component.- Returns:
- the value of the
includerecord component
-