Record Class AiServiceMethodCreateInfo.TemplateInfo
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.runtime.aiservice.AiServiceMethodCreateInfo.TemplateInfo
- Record Components:
methodParamPosition- this is used to determine the position of the parameter that holds the template, and it is never set if 'text' is set
- Enclosing class:
- AiServiceMethodCreateInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fromMethodParam(Integer methodParamPosition, Map<String, Integer> nameToParamPosition) final inthashCode()Returns a hash code value for this object.Returns the value of themethodParamPositionrecord component.Returns the value of thenameToParamPositionrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TemplateInfo
public TemplateInfo(Optional<String> text, Map<String, Integer> nameToParamPosition, Optional<Integer> methodParamPosition) Creates an instance of aTemplateInforecord class.- Parameters:
text- the value for thetextrecord componentnameToParamPosition- the value for thenameToParamPositionrecord componentmethodParamPosition- the value for themethodParamPositionrecord component
-
-
Method Details
-
fromText
public static AiServiceMethodCreateInfo.TemplateInfo fromText(String text, Map<String, Integer> nameToParamPosition) -
fromMethodParam
public static AiServiceMethodCreateInfo.TemplateInfo fromMethodParam(Integer methodParamPosition, Map<String, Integer> nameToParamPosition) -
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). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
nameToParamPosition
Returns the value of thenameToParamPositionrecord component.- Returns:
- the value of the
nameToParamPositionrecord component
-
methodParamPosition
Returns the value of themethodParamPositionrecord component.- Returns:
- the value of the
methodParamPositionrecord component
-