Package org.springframework.ai.chat
Class Generation
java.lang.Object
org.springframework.ai.chat.Generation
- All Implemented Interfaces:
ModelResult<AssistantMessage>
Represents a response returned by the AI.
-
Constructor Summary
ConstructorsConstructorDescriptionGeneration(String text) Generation(String text, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the metadata associated with the result of an AI model.Retrieves the output generated by the AI model.inthashCode()toString()withGenerationMetadata(ChatGenerationMetadata chatGenerationMetadata)
-
Constructor Details
-
Generation
-
Generation
-
-
Method Details
-
getOutput
Description copied from interface:ModelResultRetrieves the output generated by the AI model.- Specified by:
getOutputin interfaceModelResult<AssistantMessage>- Returns:
- the output generated by the AI model
-
getMetadata
Description copied from interface:ModelResultRetrieves the metadata associated with the result of an AI model.- Specified by:
getMetadatain interfaceModelResult<AssistantMessage>- Returns:
- the metadata associated with the result
-
withGenerationMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-