Struct ImportRagFilesConfig

Source
#[non_exhaustive]
pub struct ImportRagFilesConfig { pub rag_file_transformation_config: Option<RagFileTransformationConfig>, pub rag_file_parsing_config: Option<RagFileParsingConfig>, pub max_embedding_requests_per_min: i32, pub rebuild_ann_index: bool, pub import_source: Option<ImportSource>, pub partial_failure_sink: Option<PartialFailureSink>, pub import_result_sink: Option<ImportResultSink>, /* private fields */ }
Expand description

Config for importing RagFiles.

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.
§rag_file_transformation_config: Option<RagFileTransformationConfig>

Specifies the transformation config for RagFiles.

§rag_file_parsing_config: Option<RagFileParsingConfig>

Optional. Specifies the parsing config for RagFiles. RAG will use the default parser if this field is not set.

§max_embedding_requests_per_min: i32

Optional. The max number of queries per minute that this job is allowed to make to the embedding model specified on the corpus. This value is specific to this job and not shared across other import jobs. Consult the Quotas page on the project to set an appropriate value here. If unspecified, a default value of 1,000 QPM would be used.

§rebuild_ann_index: bool

Rebuilds the ANN index to optimize for recall on the imported data. Only applicable for RagCorpora running on RagManagedDb with retrieval_strategy set to ANN. The rebuild will be performed using the existing ANN config set on the RagCorpus. To change the ANN config, please use the UpdateRagCorpus API.

Default is false, i.e., index is not rebuilt.

§import_source: Option<ImportSource>

The source of the import.

§partial_failure_sink: Option<PartialFailureSink>

Optional. If provided, all partial failures are written to the sink. Deprecated. Prefer to use the import_result_sink.

§import_result_sink: Option<ImportResultSink>

Optional. If provided, all successfully imported files and all partial failures are written to the sink.

Implementations§

Source§

impl ImportRagFilesConfig

Source

pub fn new() -> Self

Source

pub fn set_rag_file_transformation_config<T: Into<Option<RagFileTransformationConfig>>>( self, v: T, ) -> Self

Sets the value of rag_file_transformation_config.

Source

pub fn set_rag_file_parsing_config<T: Into<Option<RagFileParsingConfig>>>( self, v: T, ) -> Self

Sets the value of rag_file_parsing_config.

Source

pub fn set_max_embedding_requests_per_min<T: Into<i32>>(self, v: T) -> Self

Sets the value of max_embedding_requests_per_min.

Source

pub fn set_rebuild_ann_index<T: Into<bool>>(self, v: T) -> Self

Sets the value of rebuild_ann_index.

Source

pub fn set_import_source<T: Into<Option<ImportSource>>>(self, v: T) -> Self

Sets the value of import_source.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn gcs_source(&self) -> Option<&Box<GcsSource>>

The value of import_source if it holds a GcsSource, None if the field is not set or holds a different branch.

Source

pub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self

Sets the value of import_source to hold a GcsSource.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn google_drive_source(&self) -> Option<&Box<GoogleDriveSource>>

The value of import_source if it holds a GoogleDriveSource, None if the field is not set or holds a different branch.

Source

pub fn set_google_drive_source<T: Into<Box<GoogleDriveSource>>>( self, v: T, ) -> Self

Sets the value of import_source to hold a GoogleDriveSource.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn slack_source(&self) -> Option<&Box<SlackSource>>

The value of import_source if it holds a SlackSource, None if the field is not set or holds a different branch.

Source

pub fn set_slack_source<T: Into<Box<SlackSource>>>(self, v: T) -> Self

Sets the value of import_source to hold a SlackSource.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn jira_source(&self) -> Option<&Box<JiraSource>>

The value of import_source if it holds a JiraSource, None if the field is not set or holds a different branch.

Source

pub fn set_jira_source<T: Into<Box<JiraSource>>>(self, v: T) -> Self

Sets the value of import_source to hold a JiraSource.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn share_point_sources(&self) -> Option<&Box<SharePointSources>>

The value of import_source if it holds a SharePointSources, None if the field is not set or holds a different branch.

Source

pub fn set_share_point_sources<T: Into<Box<SharePointSources>>>( self, v: T, ) -> Self

Sets the value of import_source to hold a SharePointSources.

Note that all the setters affecting import_source are mutually exclusive.

Source

pub fn set_partial_failure_sink<T: Into<Option<PartialFailureSink>>>( self, v: T, ) -> Self

Sets the value of partial_failure_sink.

Note that all the setters affecting partial_failure_sink are mutually exclusive.

Source

pub fn partial_failure_gcs_sink(&self) -> Option<&Box<GcsDestination>>

👎Deprecated

The value of partial_failure_sink if it holds a PartialFailureGcsSink, None if the field is not set or holds a different branch.

Source

pub fn set_partial_failure_gcs_sink<T: Into<Box<GcsDestination>>>( self, v: T, ) -> Self

👎Deprecated

Sets the value of partial_failure_sink to hold a PartialFailureGcsSink.

Note that all the setters affecting partial_failure_sink are mutually exclusive.

Source

pub fn partial_failure_bigquery_sink(&self) -> Option<&Box<BigQueryDestination>>

👎Deprecated

The value of partial_failure_sink if it holds a PartialFailureBigquerySink, None if the field is not set or holds a different branch.

Source

pub fn set_partial_failure_bigquery_sink<T: Into<Box<BigQueryDestination>>>( self, v: T, ) -> Self

👎Deprecated

Sets the value of partial_failure_sink to hold a PartialFailureBigquerySink.

Note that all the setters affecting partial_failure_sink are mutually exclusive.

Source

pub fn set_import_result_sink<T: Into<Option<ImportResultSink>>>( self, v: T, ) -> Self

Sets the value of import_result_sink.

Note that all the setters affecting import_result_sink are mutually exclusive.

Source

pub fn import_result_gcs_sink(&self) -> Option<&Box<GcsDestination>>

The value of import_result_sink if it holds a ImportResultGcsSink, None if the field is not set or holds a different branch.

Source

pub fn set_import_result_gcs_sink<T: Into<Box<GcsDestination>>>( self, v: T, ) -> Self

Sets the value of import_result_sink to hold a ImportResultGcsSink.

Note that all the setters affecting import_result_sink are mutually exclusive.

Source

pub fn import_result_bigquery_sink(&self) -> Option<&Box<BigQueryDestination>>

The value of import_result_sink if it holds a ImportResultBigquerySink, None if the field is not set or holds a different branch.

Source

pub fn set_import_result_bigquery_sink<T: Into<Box<BigQueryDestination>>>( self, v: T, ) -> Self

Sets the value of import_result_sink to hold a ImportResultBigquerySink.

Note that all the setters affecting import_result_sink are mutually exclusive.

Trait Implementations§

Source§

impl Clone for ImportRagFilesConfig

Source§

fn clone(&self) -> ImportRagFilesConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ImportRagFilesConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ImportRagFilesConfig

Source§

fn default() -> ImportRagFilesConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ImportRagFilesConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for ImportRagFilesConfig

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for ImportRagFilesConfig

Source§

fn eq(&self, other: &ImportRagFilesConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ImportRagFilesConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ImportRagFilesConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,