pub struct SessionPolicy {
pub model: ModelSpec,
pub provider_id: String,
pub session_id: Option<String>,
pub autonomous: bool,
pub max_turns: Option<usize>,
pub prompt: PromptLayer,
}Fields§
§model: ModelSpec§provider_id: String§session_id: Option<String>§autonomous: bool§max_turns: Option<usize>§prompt: PromptLayerImplementations§
Source§impl SessionPolicy
impl SessionPolicy
pub fn recorded_provider_id(&self) -> &str
pub fn model_id(&self) -> &str
pub fn model_variant(&self) -> Option<&str>
pub fn context_window_tokens(&self) -> usize
Trait Implementations§
Source§impl Clone for SessionPolicy
impl Clone for SessionPolicy
Source§fn clone(&self) -> SessionPolicy
fn clone(&self) -> SessionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionPolicy
impl Debug for SessionPolicy
Source§impl Default for SessionPolicy
impl Default for SessionPolicy
Source§fn default() -> SessionPolicy
fn default() -> SessionPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionPolicy
impl<'de> Deserialize<'de> for SessionPolicy
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SessionPolicy, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SessionPolicy, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SessionPolicy
Source§impl From<SessionPolicy> for RemoteProcessExecutionPolicy
impl From<SessionPolicy> for RemoteProcessExecutionPolicy
Source§fn from(value: SessionPolicy) -> RemoteProcessExecutionPolicy
fn from(value: SessionPolicy) -> RemoteProcessExecutionPolicy
Converts to this type from the input type.
Source§impl PartialEq for SessionPolicy
impl PartialEq for SessionPolicy
Source§fn eq(&self, other: &SessionPolicy) -> bool
fn eq(&self, other: &SessionPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionPolicy
impl Serialize for SessionPolicy
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SessionPolicy
Source§impl TryFrom<RemoteProcessExecutionPolicy> for SessionPolicy
impl TryFrom<RemoteProcessExecutionPolicy> for SessionPolicy
Source§type Error = RemoteProtocolError
type Error = RemoteProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: RemoteProcessExecutionPolicy,
) -> Result<SessionPolicy, <SessionPolicy as TryFrom<RemoteProcessExecutionPolicy>>::Error>
fn try_from( value: RemoteProcessExecutionPolicy, ) -> Result<SessionPolicy, <SessionPolicy as TryFrom<RemoteProcessExecutionPolicy>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SessionPolicy
impl RefUnwindSafe for SessionPolicy
impl Send for SessionPolicy
impl Sync for SessionPolicy
impl Unpin for SessionPolicy
impl UnsafeUnpin for SessionPolicy
impl UnwindSafe for SessionPolicy
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