#[non_exhaustive]pub struct AugmentPromptRequest {
pub parent: String,
pub contents: Vec<Content>,
pub model: Option<Model>,
pub data_source: Option<DataSource>,
/* private fields */
}Available on crate feature
vertex-rag-service only.Expand description
Request message for AugmentPrompt.
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.parent: StringRequired. The resource name of the Location from which to augment prompt.
The users must have permission to make a call in the project.
Format:
projects/{project}/locations/{location}.
contents: Vec<Content>Optional. Input content to augment, only text format is supported for now.
model: Option<Model>Optional. Metadata of the backend deployed model.
data_source: Option<DataSource>The data source for retrieving contexts.
Implementations§
Source§impl AugmentPromptRequest
impl AugmentPromptRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_contents<T, V>(self, v: T) -> Self
pub fn set_contents<T, V>(self, v: T) -> Self
Sourcepub fn set_or_clear_model<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_model<T>(self, v: Option<T>) -> Self
Sourcepub fn set_data_source<T: Into<Option<DataSource>>>(self, v: T) -> Self
pub fn set_data_source<T: Into<Option<DataSource>>>(self, v: T) -> Self
Sets the value of data_source.
Note that all the setters affecting data_source are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VertexRagStore;
let x = AugmentPromptRequest::new().set_data_source(Some(
google_cloud_aiplatform_v1::model::augment_prompt_request::DataSource::VertexRagStore(VertexRagStore::default().into())));Sourcepub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
pub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
The value of data_source
if it holds a VertexRagStore, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
pub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
Sets the value of data_source
to hold a VertexRagStore.
Note that all the setters affecting data_source are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VertexRagStore;
let x = AugmentPromptRequest::new().set_vertex_rag_store(VertexRagStore::default()/* use setters */);
assert!(x.vertex_rag_store().is_some());Trait Implementations§
Source§impl Clone for AugmentPromptRequest
impl Clone for AugmentPromptRequest
Source§fn clone(&self) -> AugmentPromptRequest
fn clone(&self) -> AugmentPromptRequest
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 AugmentPromptRequest
impl Debug for AugmentPromptRequest
Source§impl Default for AugmentPromptRequest
impl Default for AugmentPromptRequest
Source§fn default() -> AugmentPromptRequest
fn default() -> AugmentPromptRequest
Returns the “default value” for a type. Read more
Source§impl Message for AugmentPromptRequest
impl Message for AugmentPromptRequest
Source§impl PartialEq for AugmentPromptRequest
impl PartialEq for AugmentPromptRequest
impl StructuralPartialEq for AugmentPromptRequest
Auto Trait Implementations§
impl Freeze for AugmentPromptRequest
impl RefUnwindSafe for AugmentPromptRequest
impl Send for AugmentPromptRequest
impl Sync for AugmentPromptRequest
impl Unpin for AugmentPromptRequest
impl UnwindSafe for AugmentPromptRequest
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