Record Class Store.ChatRequest
java.lang.Object
java.lang.Record
com.oracle.coherence.rag.api.Store.ChatRequest
- Record Components:
chatModel- name of the chat model to use (null for default)question- the user question to answermaxResults- maximum number of context documents to retrieveminScore- minimum relevance score for context documentsfullTextWeight- weight for full-text search in context retrieval (0.0-1.0)scoringModel- optional scoring model for context re-ranking
- Enclosing class:
Store
public static record Store.ChatRequest(String chatModel, String question, int maxResults, double minScore, double fullTextWeight, String scoringModel)
extends Record
Request object for chat operations with RAG context retrieval.
This record encapsulates all parameters needed for RAG-enhanced chat functionality, including model selection, context retrieval settings, and optional result re-ranking.
- Since:
- 25.09
- Author:
- Aleks Seovic 2025.07.04
-
Constructor Summary
ConstructorsConstructorDescriptionChatRequest(String chatModel, String question, int maxResults, double minScore, double fullTextWeight, String scoringModel) Creates an instance of aChatRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechatModelrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefullTextWeightrecord component.final inthashCode()Returns a hash code value for this object.intReturns the maximum results with a default value.doubleminScore()Returns the value of theminScorerecord component.question()Returns the value of thequestionrecord component.Returns the value of thescoringModelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChatRequest
public ChatRequest(String chatModel, String question, int maxResults, double minScore, double fullTextWeight, String scoringModel) Creates an instance of aChatRequestrecord class.- Parameters:
chatModel- the value for thechatModelrecord componentquestion- the value for thequestionrecord componentmaxResults- the value for themaxResultsrecord componentminScore- the value for theminScorerecord componentfullTextWeight- the value for thefullTextWeightrecord componentscoringModel- the value for thescoringModelrecord component
-
-
Method Details
-
maxResults
public int maxResults()Returns the maximum results with a default value.This method ensures a sensible default when maxResults is 0.
- Returns:
- maxResults or 5 if maxResults is 0
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
chatModel
-
question
-
minScore
-
fullTextWeight
public double fullTextWeight()Returns the value of thefullTextWeightrecord component.- Returns:
- the value of the
fullTextWeightrecord component
-
scoringModel
Returns the value of thescoringModelrecord component.- Returns:
- the value of the
scoringModelrecord component
-