Package com.google.genkit.ai.agent
Class SessionState<S>
java.lang.Object
com.google.genkit.ai.agent.SessionState<S>
- Type Parameters:
S- the type of custom state
SessionState represents the state of an agent session.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> SessionState.Builder<S> builder()Creates a builder for SessionState.Returns the session artifacts.Returns the custom state.Returns the session messages.Returns the session ID.voidsetArtifacts(List<Artifact> artifacts) Sets the session artifacts.voidSets the custom state.voidsetMessages(List<Message> messages) Sets the session messages.voidsetSessionId(String sessionId) Sets the session ID.
-
Constructor Details
-
SessionState
public SessionState()Default constructor.
-
-
Method Details
-
builder
Creates a builder for SessionState.- Type Parameters:
S- the type of custom state- Returns:
- a new builder
-
getSessionId
Returns the session ID.- Returns:
- the session ID
-
setSessionId
Sets the session ID.- Parameters:
sessionId- the session ID
-
getMessages
Returns the session messages.- Returns:
- the messages
-
setMessages
Sets the session messages.- Parameters:
messages- the messages
-
getCustom
Returns the custom state.- Returns:
- the custom state
-
setCustom
Sets the custom state.- Parameters:
custom- the custom state
-
getArtifacts
Returns the session artifacts.- Returns:
- the artifacts
-
setArtifacts
Sets the session artifacts.- Parameters:
artifacts- the artifacts
-