Package org.bsc.langgraph4j.agent
Interface ConversationContextPolicy<Message>
- All Known Implementing Classes:
MessageWindowConversationContextPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Policy used at model-call time to select which graph messages are sent to the LLM.
Implementations must not mutate the graph state and should return a filtered view/copy.
-
Method Summary
Modifier and TypeMethodDescription<State extends MessagesState<Message>>
List<Message> filter(State state, RunnableConfig config) Filters graph messages before they are sent to the model.
-
Method Details
-
filter
Filters graph messages before they are sent to the model.- Parameters:
state- the state containing messages currently stored in graph- Returns:
- filtered messages to be sent to the model
-