pub struct PromptTemplateStructured {
pub description: Option<String>,
pub examples: Vec<ExampleData>,
/* private fields */
}
Expand description
Backward compatibility - simplified prompt template
Fields§
§description: Option<String>
Description of what to extract
examples: Vec<ExampleData>
Example data for guidance
Implementations§
Source§impl PromptTemplateStructured
impl PromptTemplateStructured
Sourcepub fn with_format_and_provider(
description: Option<&str>,
format_type: FormatType,
provider_type: ProviderType,
) -> Self
pub fn with_format_and_provider( description: Option<&str>, format_type: FormatType, provider_type: ProviderType, ) -> Self
Create with specific format and provider
Sourcepub fn render(
&self,
input_text: &str,
additional_context: Option<&str>,
) -> LangExtractResult<String>
pub fn render( &self, input_text: &str, additional_context: Option<&str>, ) -> LangExtractResult<String>
Render the prompt for given text
Sourcepub fn template(&self) -> &PromptTemplate
pub fn template(&self) -> &PromptTemplate
Get the underlying template for advanced customization
Sourcepub fn template_mut(&mut self) -> &mut PromptTemplate
pub fn template_mut(&mut self) -> &mut PromptTemplate
Get mutable reference to the underlying template
Trait Implementations§
Source§impl Clone for PromptTemplateStructured
impl Clone for PromptTemplateStructured
Source§fn clone(&self) -> PromptTemplateStructured
fn clone(&self) -> PromptTemplateStructured
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PromptTemplateStructured
impl RefUnwindSafe for PromptTemplateStructured
impl Send for PromptTemplateStructured
impl Sync for PromptTemplateStructured
impl Unpin for PromptTemplateStructured
impl UnwindSafe for PromptTemplateStructured
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