Class RetrievalSearchConfiguration

java.lang.Object
com.sap.ai.sdk.grounding.model.RetrievalSearchConfiguration

public class RetrievalSearchConfiguration extends Object
RetrievalSearchConfiguration
  • Constructor Details

    • RetrievalSearchConfiguration

      protected RetrievalSearchConfiguration()
      Default constructor for RetrievalSearchConfiguration.
  • Method Details

    • maxChunkCount

      @Nonnull public RetrievalSearchConfiguration maxChunkCount(@Nullable Integer maxChunkCount)
      Set the maxChunkCount of this RetrievalSearchConfiguration instance and return the same instance.
      Parameters:
      maxChunkCount - Maximum number of chunks to be returned. Cannot be used with 'maxDocumentCount'. Minimum: 0 Maximum: 10000000
      Returns:
      The same instance of this RetrievalSearchConfiguration class
    • getMaxChunkCount

      @Nullable public Integer getMaxChunkCount()
      Maximum number of chunks to be returned. Cannot be used with 'maxDocumentCount'. minimum: 0 maximum: 10000000
      Returns:
      maxChunkCount The maxChunkCount of this RetrievalSearchConfiguration instance.
    • setMaxChunkCount

      public void setMaxChunkCount(@Nullable Integer maxChunkCount)
      Set the maxChunkCount of this RetrievalSearchConfiguration instance.
      Parameters:
      maxChunkCount - Maximum number of chunks to be returned. Cannot be used with 'maxDocumentCount'. Minimum: 0 Maximum: 10000000
    • maxDocumentCount

      @Nonnull public RetrievalSearchConfiguration maxDocumentCount(@Nullable Integer maxDocumentCount)
      Set the maxDocumentCount of this RetrievalSearchConfiguration instance and return the same instance.
      Parameters:
      maxDocumentCount - [Only supports 'vector' dataRepositoryType] - Maximum number of documents to be returned. Cannot be used with 'maxChunkCount'. If maxDocumentCount is given, then only one chunk per document is returned. Minimum: 0 Maximum: 10000000
      Returns:
      The same instance of this RetrievalSearchConfiguration class
    • getMaxDocumentCount

      @Nullable public Integer getMaxDocumentCount()
      [Only supports 'vector' dataRepositoryType] - Maximum number of documents to be returned. Cannot be used with 'maxChunkCount'. If maxDocumentCount is given, then only one chunk per document is returned. minimum: 0 maximum: 10000000
      Returns:
      maxDocumentCount The maxDocumentCount of this RetrievalSearchConfiguration instance.
    • setMaxDocumentCount

      public void setMaxDocumentCount(@Nullable Integer maxDocumentCount)
      Set the maxDocumentCount of this RetrievalSearchConfiguration instance.
      Parameters:
      maxDocumentCount - [Only supports 'vector' dataRepositoryType] - Maximum number of documents to be returned. Cannot be used with 'maxChunkCount'. If maxDocumentCount is given, then only one chunk per document is returned. Minimum: 0 Maximum: 10000000
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the RetrievalSearchConfiguration.
      Returns:
      The set of properties names
    • getCustomField

      @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
      Deprecated.
      Use toMap() instead.
      Get the value of an unrecognizable property of this RetrievalSearchConfiguration instance.
      Parameters:
      name - The name of the property
      Returns:
      The value of the property
      Throws:
      NoSuchElementException - If no property with the given name could be found.
    • toMap

      @Nonnull public Map<String,Object> toMap()
      Get the value of all properties of this RetrievalSearchConfiguration instance including unrecognized properties.
      Returns:
      The map of all properties
    • setCustomField

      public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
      Set an unrecognizable property of this RetrievalSearchConfiguration instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      customFieldName - The name of the property
      customFieldValue - The value of the property
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • create

      public static RetrievalSearchConfiguration create()
      Create a new RetrievalSearchConfiguration instance. No arguments are required.