Package com.google.genkit.ai.session
Class SessionData.Builder<S>
java.lang.Object
com.google.genkit.ai.session.SessionData.Builder<S>
- Type Parameters:
S- the state type
- Enclosing class:
SessionData<S>
Builder for SessionData.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the SessionData.Sets the session ID.Sets the session state.Adds a thread.Sets the conversation threads.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the session ID.- Parameters:
id- the session ID- Returns:
- this builder
-
state
Sets the session state.- Parameters:
state- the session state- Returns:
- this builder
-
threads
Sets the conversation threads.- Parameters:
threads- the threads map- Returns:
- this builder
-
thread
Adds a thread.- Parameters:
threadName- the thread namemessages- the messages- Returns:
- this builder
-
build
Builds the SessionData.- Returns:
- the built SessionData
-