Package com.google.genkit.ai.session
Class SessionOptions<S>
java.lang.Object
com.google.genkit.ai.session.SessionOptions<S>
- Type Parameters:
S- the type of the custom session state
SessionOptions provides configuration options for creating or loading
sessions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for SessionOptions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> SessionOptions.Builder<S> builder()Creates a builder for SessionOptions.Gets the initial state.Gets the session ID.getStore()Gets the session store.voidsetInitialState(S initialState) Sets the initial state.voidsetSessionId(String sessionId) Sets the session ID.voidsetStore(SessionStore<S> store) Sets the session store.
-
Constructor Details
-
SessionOptions
public SessionOptions()Default constructor.
-
-
Method Details
-
getStore
Gets the session store.- Returns:
- the session store
-
setStore
Sets the session store.- Parameters:
store- the session store
-
getInitialState
Gets the initial state.- Returns:
- the initial state
-
setInitialState
Sets the initial state.- Parameters:
initialState- the initial state
-
getSessionId
Gets the session ID.- Returns:
- the session ID
-
setSessionId
Sets the session ID.- Parameters:
sessionId- the session ID
-
builder
Creates a builder for SessionOptions.- Type Parameters:
S- the state type- Returns:
- a new builder
-