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
ConstructorDescriptionGeneration
(String text) Generation
(String text, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Retrieves the metadata associated with the result of an AI model.Retrieves the output generated by the AI model.int
hashCode()
toString()
withGenerationMetadata
(ChatGenerationMetadata chatGenerationMetadata)
-
Constructor Details
-
Generation
-
Generation
-
-
Method Details
-
getOutput
Description copied from interface:ModelResult
Retrieves the output generated by the AI model.- Specified by:
getOutput
in interfaceModelResult<AssistantMessage>
- Returns:
- the output generated by the AI model
-
getMetadata
Description copied from interface:ModelResult
Retrieves the metadata associated with the result of an AI model.- Specified by:
getMetadata
in interfaceModelResult<AssistantMessage>
- Returns:
- the metadata associated with the result
-
withGenerationMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-