#[non_exhaustive]pub struct OutputFieldSpec {
pub field_name: String,
pub guidance: String,
pub field_type: FieldType,
/* private fields */
}Available on crate feature
data-foundry-service only.Expand description
Defines a specification for a single output field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.field_name: StringRequired. The name of the output field.
guidance: StringOptional. Optional, but recommended. Additional guidance specific to this field to provide targeted instructions for the LLM to generate the content of a single output field. While the LLM can sometimes infer content from the field name, providing explicit guidance is preferred.
field_type: FieldTypeOptional. The data type of the field. Defaults to CONTENT if not set.
Implementations§
Source§impl OutputFieldSpec
impl OutputFieldSpec
pub fn new() -> Self
Sourcepub fn set_field_name<T: Into<String>>(self, v: T) -> Self
pub fn set_field_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_guidance<T: Into<String>>(self, v: T) -> Self
pub fn set_guidance<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_field_type<T: Into<FieldType>>(self, v: T) -> Self
pub fn set_field_type<T: Into<FieldType>>(self, v: T) -> Self
Sets the value of field_type.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::output_field_spec::FieldType;
let x0 = OutputFieldSpec::new().set_field_type(FieldType::Content);
let x1 = OutputFieldSpec::new().set_field_type(FieldType::Text);
let x2 = OutputFieldSpec::new().set_field_type(FieldType::Image);Trait Implementations§
Source§impl Clone for OutputFieldSpec
impl Clone for OutputFieldSpec
Source§fn clone(&self) -> OutputFieldSpec
fn clone(&self) -> OutputFieldSpec
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 moreSource§impl Debug for OutputFieldSpec
impl Debug for OutputFieldSpec
Source§impl Default for OutputFieldSpec
impl Default for OutputFieldSpec
Source§fn default() -> OutputFieldSpec
fn default() -> OutputFieldSpec
Returns the “default value” for a type. Read more
Source§impl Message for OutputFieldSpec
impl Message for OutputFieldSpec
Source§impl PartialEq for OutputFieldSpec
impl PartialEq for OutputFieldSpec
impl StructuralPartialEq for OutputFieldSpec
Auto Trait Implementations§
impl Freeze for OutputFieldSpec
impl RefUnwindSafe for OutputFieldSpec
impl Send for OutputFieldSpec
impl Sync for OutputFieldSpec
impl Unpin for OutputFieldSpec
impl UnwindSafe for OutputFieldSpec
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