Class Result<T>

java.lang.Object
dev.langchain4j.service.Result<T>
Type Parameters:
T - The type of the content. Can be of any return type supported by AI Services, such as String, Enum, MyCustomPojo, etc.

public class Result<T> extends Object
Represents the result of an AI Service invocation. It contains actual content (LLM response) and additional information associated with it, such as TokenUsage and sources (Contents retrieved during RAG).