Package sk.iway.iwcm.rag.search
Record Class MarkdownSearchService.SearchResponse
java.lang.Object
java.lang.Record
sk.iway.iwcm.rag.search.MarkdownSearchService.SearchResponse
- Record Components:
results- unique authorized source resultsanswer- plain-text answer, ornullwhen none is availableanswerHtml- answer with safe formatting only, ornullwhen none is available
- Enclosing class:
- MarkdownSearchService
public static record MarkdownSearchService.SearchResponse(List<MarkdownSearchService.SearchResult> results, String answer, String answerHtml)
extends Record
Carries ranked documentation sources and an optional generated answer.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchResponse(List<MarkdownSearchService.SearchResult> results, String answer, String answerHtml) Creates an instance of aSearchResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionanswer()Returns the value of theanswerrecord component.Returns the value of theanswerHtmlrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SearchResponse
public SearchResponse(List<MarkdownSearchService.SearchResult> results, String answer, String answerHtml) Creates an instance of aSearchResponserecord class.- Parameters:
results- the value for theresultsrecord componentanswer- the value for theanswerrecord componentanswerHtml- the value for theanswerHtmlrecord 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). -
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-
answer
Returns the value of theanswerrecord component.- Returns:
- the value of the
answerrecord component
-
answerHtml
Returns the value of theanswerHtmlrecord component.- Returns:
- the value of the
answerHtmlrecord component
-