#[non_exhaustive]pub struct InstructionCollectionBuilder { /* private fields */ }Expand description
A builder for InstructionCollection.
Implementations§
Source§impl InstructionCollectionBuilder
impl InstructionCollectionBuilder
Sourcepub fn response_length(self, input: impl Into<String>) -> Self
pub fn response_length(self, input: impl Into<String>) -> Self
Specifies the desired length of responses generated by Amazon Q Business. This parameter allows administrators to control whether responses are concise and brief or more detailed and comprehensive.
Sourcepub fn set_response_length(self, input: Option<String>) -> Self
pub fn set_response_length(self, input: Option<String>) -> Self
Specifies the desired length of responses generated by Amazon Q Business. This parameter allows administrators to control whether responses are concise and brief or more detailed and comprehensive.
Sourcepub fn get_response_length(&self) -> &Option<String>
pub fn get_response_length(&self) -> &Option<String>
Specifies the desired length of responses generated by Amazon Q Business. This parameter allows administrators to control whether responses are concise and brief or more detailed and comprehensive.
Sourcepub fn target_audience(self, input: impl Into<String>) -> Self
pub fn target_audience(self, input: impl Into<String>) -> Self
Defines the intended audience for the responses, allowing Amazon Q Business to tailor its language, terminology, and explanations appropriately. This could range from technical experts to general users with varying levels of domain knowledge.
Sourcepub fn set_target_audience(self, input: Option<String>) -> Self
pub fn set_target_audience(self, input: Option<String>) -> Self
Defines the intended audience for the responses, allowing Amazon Q Business to tailor its language, terminology, and explanations appropriately. This could range from technical experts to general users with varying levels of domain knowledge.
Sourcepub fn get_target_audience(&self) -> &Option<String>
pub fn get_target_audience(&self) -> &Option<String>
Defines the intended audience for the responses, allowing Amazon Q Business to tailor its language, terminology, and explanations appropriately. This could range from technical experts to general users with varying levels of domain knowledge.
Sourcepub fn perspective(self, input: impl Into<String>) -> Self
pub fn perspective(self, input: impl Into<String>) -> Self
Determines the point of view or perspective from which Amazon Q Business generates responses, such as first-person, second-person, or third-person perspective, affecting how information is presented to users.
Sourcepub fn set_perspective(self, input: Option<String>) -> Self
pub fn set_perspective(self, input: Option<String>) -> Self
Determines the point of view or perspective from which Amazon Q Business generates responses, such as first-person, second-person, or third-person perspective, affecting how information is presented to users.
Sourcepub fn get_perspective(&self) -> &Option<String>
pub fn get_perspective(&self) -> &Option<String>
Determines the point of view or perspective from which Amazon Q Business generates responses, such as first-person, second-person, or third-person perspective, affecting how information is presented to users.
Sourcepub fn output_style(self, input: impl Into<String>) -> Self
pub fn output_style(self, input: impl Into<String>) -> Self
Specifies the formatting and structural style of responses, such as bullet points, paragraphs, step-by-step instructions, or other organizational formats that enhance readability and comprehension.
Sourcepub fn set_output_style(self, input: Option<String>) -> Self
pub fn set_output_style(self, input: Option<String>) -> Self
Specifies the formatting and structural style of responses, such as bullet points, paragraphs, step-by-step instructions, or other organizational formats that enhance readability and comprehension.
Sourcepub fn get_output_style(&self) -> &Option<String>
pub fn get_output_style(&self) -> &Option<String>
Specifies the formatting and structural style of responses, such as bullet points, paragraphs, step-by-step instructions, or other organizational formats that enhance readability and comprehension.
Sourcepub fn identity(self, input: impl Into<String>) -> Self
pub fn identity(self, input: impl Into<String>) -> Self
Defines the persona or identity that Amazon Q Business should adopt when responding to users, allowing for customization of the assistant's character, role, or representation within an organization.
Sourcepub fn set_identity(self, input: Option<String>) -> Self
pub fn set_identity(self, input: Option<String>) -> Self
Defines the persona or identity that Amazon Q Business should adopt when responding to users, allowing for customization of the assistant's character, role, or representation within an organization.
Sourcepub fn get_identity(&self) -> &Option<String>
pub fn get_identity(&self) -> &Option<String>
Defines the persona or identity that Amazon Q Business should adopt when responding to users, allowing for customization of the assistant's character, role, or representation within an organization.
Sourcepub fn tone(self, input: impl Into<String>) -> Self
pub fn tone(self, input: impl Into<String>) -> Self
Controls the emotional tone and communication style of responses, such as formal, casual, technical, friendly, or professional, to align with organizational communication standards and user expectations.
Sourcepub fn set_tone(self, input: Option<String>) -> Self
pub fn set_tone(self, input: Option<String>) -> Self
Controls the emotional tone and communication style of responses, such as formal, casual, technical, friendly, or professional, to align with organizational communication standards and user expectations.
Sourcepub fn get_tone(&self) -> &Option<String>
pub fn get_tone(&self) -> &Option<String>
Controls the emotional tone and communication style of responses, such as formal, casual, technical, friendly, or professional, to align with organizational communication standards and user expectations.
Sourcepub fn custom_instructions(self, input: impl Into<String>) -> Self
pub fn custom_instructions(self, input: impl Into<String>) -> Self
Allows administrators to provide specific, custom instructions that guide how Amazon Q Business should respond in particular scenarios or to certain types of queries, enabling fine-grained control over response generation.
Sourcepub fn set_custom_instructions(self, input: Option<String>) -> Self
pub fn set_custom_instructions(self, input: Option<String>) -> Self
Allows administrators to provide specific, custom instructions that guide how Amazon Q Business should respond in particular scenarios or to certain types of queries, enabling fine-grained control over response generation.
Sourcepub fn get_custom_instructions(&self) -> &Option<String>
pub fn get_custom_instructions(&self) -> &Option<String>
Allows administrators to provide specific, custom instructions that guide how Amazon Q Business should respond in particular scenarios or to certain types of queries, enabling fine-grained control over response generation.
Sourcepub fn examples(self, input: impl Into<String>) -> Self
pub fn examples(self, input: impl Into<String>) -> Self
Provides sample responses or templates that Amazon Q Business can reference when generating responses, helping to establish consistent patterns and formats for different types of user queries.
Sourcepub fn set_examples(self, input: Option<String>) -> Self
pub fn set_examples(self, input: Option<String>) -> Self
Provides sample responses or templates that Amazon Q Business can reference when generating responses, helping to establish consistent patterns and formats for different types of user queries.
Sourcepub fn get_examples(&self) -> &Option<String>
pub fn get_examples(&self) -> &Option<String>
Provides sample responses or templates that Amazon Q Business can reference when generating responses, helping to establish consistent patterns and formats for different types of user queries.
Sourcepub fn build(self) -> InstructionCollection
pub fn build(self) -> InstructionCollection
Consumes the builder and constructs a InstructionCollection.
Trait Implementations§
Source§impl Clone for InstructionCollectionBuilder
impl Clone for InstructionCollectionBuilder
Source§fn clone(&self) -> InstructionCollectionBuilder
fn clone(&self) -> InstructionCollectionBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstructionCollectionBuilder
impl Debug for InstructionCollectionBuilder
Source§impl Default for InstructionCollectionBuilder
impl Default for InstructionCollectionBuilder
Source§fn default() -> InstructionCollectionBuilder
fn default() -> InstructionCollectionBuilder
Source§impl PartialEq for InstructionCollectionBuilder
impl PartialEq for InstructionCollectionBuilder
Source§fn eq(&self, other: &InstructionCollectionBuilder) -> bool
fn eq(&self, other: &InstructionCollectionBuilder) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InstructionCollectionBuilder
Auto Trait Implementations§
impl Freeze for InstructionCollectionBuilder
impl RefUnwindSafe for InstructionCollectionBuilder
impl Send for InstructionCollectionBuilder
impl Sync for InstructionCollectionBuilder
impl Unpin for InstructionCollectionBuilder
impl UnwindSafe for InstructionCollectionBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);