pub struct SessionConfigBuilder<C, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<C, S: State> SessionConfigBuilder<C, S>
impl<C, S: State> SessionConfigBuilder<C, S>
Sourcepub fn build(self) -> SessionConfig<C>where
S: IsComplete,
pub fn build(self) -> SessionConfig<C>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn model(
self,
value: impl Into<String>,
) -> SessionConfigBuilder<C, SetModel<S>>where
S::Model: IsUnset,
pub fn model(
self,
value: impl Into<String>,
) -> SessionConfigBuilder<C, SetModel<S>>where
S::Model: IsUnset,
Sourcepub fn maybe_model(
self,
value: Option<impl Into<String>>,
) -> SessionConfigBuilder<C, SetModel<S>>where
S::Model: IsUnset,
pub fn maybe_model(
self,
value: Option<impl Into<String>>,
) -> SessionConfigBuilder<C, SetModel<S>>where
S::Model: IsUnset,
Sourcepub fn cwd(self, value: PathBuf) -> SessionConfigBuilder<C, SetCwd<S>>where
S::Cwd: IsUnset,
pub fn cwd(self, value: PathBuf) -> SessionConfigBuilder<C, SetCwd<S>>where
S::Cwd: IsUnset,
Sourcepub fn maybe_cwd(
self,
value: Option<PathBuf>,
) -> SessionConfigBuilder<C, SetCwd<S>>where
S::Cwd: IsUnset,
pub fn maybe_cwd(
self,
value: Option<PathBuf>,
) -> SessionConfigBuilder<C, SetCwd<S>>where
S::Cwd: IsUnset,
Sourcepub fn additional_dirs(
self,
value: Vec<PathBuf>,
) -> SessionConfigBuilder<C, SetAdditionalDirs<S>>where
S::AdditionalDirs: IsUnset,
pub fn additional_dirs(
self,
value: Vec<PathBuf>,
) -> SessionConfigBuilder<C, SetAdditionalDirs<S>>where
S::AdditionalDirs: IsUnset,
Sourcepub fn maybe_additional_dirs(
self,
value: Option<Vec<PathBuf>>,
) -> SessionConfigBuilder<C, SetAdditionalDirs<S>>where
S::AdditionalDirs: IsUnset,
pub fn maybe_additional_dirs(
self,
value: Option<Vec<PathBuf>>,
) -> SessionConfigBuilder<C, SetAdditionalDirs<S>>where
S::AdditionalDirs: IsUnset,
Sourcepub fn env(
self,
value: HashMap<String, String>,
) -> SessionConfigBuilder<C, SetEnv<S>>where
S::Env: IsUnset,
pub fn env(
self,
value: HashMap<String, String>,
) -> SessionConfigBuilder<C, SetEnv<S>>where
S::Env: IsUnset,
Sourcepub fn maybe_env(
self,
value: Option<HashMap<String, String>>,
) -> SessionConfigBuilder<C, SetEnv<S>>where
S::Env: IsUnset,
pub fn maybe_env(
self,
value: Option<HashMap<String, String>>,
) -> SessionConfigBuilder<C, SetEnv<S>>where
S::Env: IsUnset,
Sourcepub fn env_remove(
self,
value: HashSet<String>,
) -> SessionConfigBuilder<C, SetEnvRemove<S>>where
S::EnvRemove: IsUnset,
pub fn env_remove(
self,
value: HashSet<String>,
) -> SessionConfigBuilder<C, SetEnvRemove<S>>where
S::EnvRemove: IsUnset,
Sourcepub fn maybe_env_remove(
self,
value: Option<HashSet<String>>,
) -> SessionConfigBuilder<C, SetEnvRemove<S>>where
S::EnvRemove: IsUnset,
pub fn maybe_env_remove(
self,
value: Option<HashSet<String>>,
) -> SessionConfigBuilder<C, SetEnvRemove<S>>where
S::EnvRemove: IsUnset,
Sourcepub fn max_turns(self, value: u32) -> SessionConfigBuilder<C, SetMaxTurns<S>>where
S::MaxTurns: IsUnset,
pub fn max_turns(self, value: u32) -> SessionConfigBuilder<C, SetMaxTurns<S>>where
S::MaxTurns: IsUnset,
Sourcepub fn maybe_max_turns(
self,
value: Option<u32>,
) -> SessionConfigBuilder<C, SetMaxTurns<S>>where
S::MaxTurns: IsUnset,
pub fn maybe_max_turns(
self,
value: Option<u32>,
) -> SessionConfigBuilder<C, SetMaxTurns<S>>where
S::MaxTurns: IsUnset,
Sourcepub fn system_prompt(
self,
value: impl Into<String>,
) -> SessionConfigBuilder<C, SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
pub fn system_prompt(
self,
value: impl Into<String>,
) -> SessionConfigBuilder<C, SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
Sourcepub fn maybe_system_prompt(
self,
value: Option<impl Into<String>>,
) -> SessionConfigBuilder<C, SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
pub fn maybe_system_prompt(
self,
value: Option<impl Into<String>>,
) -> SessionConfigBuilder<C, SetSystemPrompt<S>>where
S::SystemPrompt: IsUnset,
Sourcepub fn backend(self, value: C) -> SessionConfigBuilder<C, SetBackend<S>>where
S::Backend: IsUnset,
pub fn backend(self, value: C) -> SessionConfigBuilder<C, SetBackend<S>>where
S::Backend: IsUnset,
Required.
Auto Trait Implementations§
impl<C, S> Freeze for SessionConfigBuilder<C, S>where
C: Freeze,
impl<C, S> RefUnwindSafe for SessionConfigBuilder<C, S>where
C: RefUnwindSafe,
impl<C, S> Send for SessionConfigBuilder<C, S>where
C: Send,
impl<C, S> Sync for SessionConfigBuilder<C, S>where
C: Sync,
impl<C, S> Unpin for SessionConfigBuilder<C, S>where
C: Unpin,
impl<C, S> UnsafeUnpin for SessionConfigBuilder<C, S>where
C: UnsafeUnpin,
impl<C, S> UnwindSafe for SessionConfigBuilder<C, S>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more