Class Context
java.lang.Object
dev.langchain4j.agentic.internal.Context
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Context.ContextSummarizercreateStreamingSummarizer(StreamingChatModel streamingChatModel) Creates a new stateless summarizer that sends the summarization prompt to the givenStreamingChatModeland returns the text of its answer.static Context.ContextSummarizercreateSummarizer(ChatModel chatModel) Creates a new stateless summarizer that sends the summarization prompt to the givenChatModeland returns the text of its answer.
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
createSummarizer
Creates a new stateless summarizer that sends the summarization prompt to the givenChatModeland returns the text of its answer.- Throws:
IllegalConfigurationException- ifchatModelisnull
-
createStreamingSummarizer
public static Context.ContextSummarizer createStreamingSummarizer(StreamingChatModel streamingChatModel) Creates a new stateless summarizer that sends the summarization prompt to the givenStreamingChatModeland returns the text of its answer. The returned summarizer blocks until the streamed answer is complete.- Throws:
IllegalConfigurationException- ifstreamingChatModelisnull
-