Record Class CohereChatBedrockApi.CohereChatResponse
java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.cohere.api.CohereChatBedrockApi.CohereChatResponse
- Record Components:
id
- An identifier for the request (always returned).prompt
- The prompt from the input request. (Always returned).generations
- A list of generated results along with the likelihoods for tokens requested. (Always returned).
- Enclosing class:
- CohereChatBedrockApi
public static record CohereChatBedrockApi.CohereChatResponse(String id, String prompt, List<CohereChatBedrockApi.CohereChatResponse.Generation> generations)
extends Record
CohereChatResponse encapsulates the response parameters for the Cohere command model.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Generated result along with the likelihoods for tokens requested. -
Constructor Summary
ConstructorDescriptionCohereChatResponse
(String id, String prompt, List<CohereChatBedrockApi.CohereChatResponse.Generation> generations) Creates an instance of aCohereChatResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegenerations
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.prompt()
Returns the value of theprompt
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CohereChatResponse
public CohereChatResponse(String id, String prompt, List<CohereChatBedrockApi.CohereChatResponse.Generation> generations) Creates an instance of aCohereChatResponse
record class.- Parameters:
id
- the value for theid
record componentprompt
- the value for theprompt
record componentgenerations
- the value for thegenerations
record 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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
prompt
Returns the value of theprompt
record component.- Returns:
- the value of the
prompt
record component
-
generations
Returns the value of thegenerations
record component.- Returns:
- the value of the
generations
record component
-