#[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
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: i32Optional. 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: boolRebuilds 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
impl ImportRagFilesConfig
pub fn new() -> Self
Sourcepub fn set_rag_file_transformation_config<T: Into<Option<RagFileTransformationConfig>>>(
self,
v: T,
) -> Self
pub fn set_rag_file_transformation_config<T: Into<Option<RagFileTransformationConfig>>>( self, v: T, ) -> Self
Sets the value of rag_file_transformation_config.
Sourcepub fn set_rag_file_parsing_config<T: Into<Option<RagFileParsingConfig>>>(
self,
v: T,
) -> Self
pub fn set_rag_file_parsing_config<T: Into<Option<RagFileParsingConfig>>>( self, v: T, ) -> Self
Sets the value of rag_file_parsing_config.
Sourcepub fn set_max_embedding_requests_per_min<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_embedding_requests_per_min<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_embedding_requests_per_min.
Sourcepub fn set_rebuild_ann_index<T: Into<bool>>(self, v: T) -> Self
pub fn set_rebuild_ann_index<T: Into<bool>>(self, v: T) -> Self
Sets the value of rebuild_ann_index.
Sourcepub fn set_import_source<T: Into<Option<ImportSource>>>(self, v: T) -> Self
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.
Sourcepub fn gcs_source(&self) -> Option<&Box<GcsSource>>
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.
Sourcepub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self
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.
Sourcepub fn google_drive_source(&self) -> Option<&Box<GoogleDriveSource>>
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.
Sourcepub fn set_google_drive_source<T: Into<Box<GoogleDriveSource>>>(
self,
v: T,
) -> Self
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.
Sourcepub fn slack_source(&self) -> Option<&Box<SlackSource>>
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.
Sourcepub fn set_slack_source<T: Into<Box<SlackSource>>>(self, v: T) -> Self
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.
Sourcepub fn jira_source(&self) -> Option<&Box<JiraSource>>
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.
Sourcepub fn set_jira_source<T: Into<Box<JiraSource>>>(self, v: T) -> Self
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.
The value of import_source
if it holds a SharePointSources, None if the field is not set or
holds a different branch.
Sets the value of import_source
to hold a SharePointSources.
Note that all the setters affecting import_source are
mutually exclusive.
Sourcepub fn set_partial_failure_sink<T: Into<Option<PartialFailureSink>>>(
self,
v: T,
) -> Self
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.
Sourcepub fn partial_failure_gcs_sink(&self) -> Option<&Box<GcsDestination>>
👎Deprecated
pub fn partial_failure_gcs_sink(&self) -> Option<&Box<GcsDestination>>
The value of partial_failure_sink
if it holds a PartialFailureGcsSink, None if the field is not set or
holds a different branch.
Sourcepub fn set_partial_failure_gcs_sink<T: Into<Box<GcsDestination>>>(
self,
v: T,
) -> Self
👎Deprecated
pub fn set_partial_failure_gcs_sink<T: Into<Box<GcsDestination>>>( self, v: T, ) -> Self
Sets the value of partial_failure_sink
to hold a PartialFailureGcsSink.
Note that all the setters affecting partial_failure_sink are
mutually exclusive.
Sourcepub fn partial_failure_bigquery_sink(&self) -> Option<&Box<BigQueryDestination>>
👎Deprecated
pub fn partial_failure_bigquery_sink(&self) -> Option<&Box<BigQueryDestination>>
The value of partial_failure_sink
if it holds a PartialFailureBigquerySink, None if the field is not set or
holds a different branch.
Sourcepub fn set_partial_failure_bigquery_sink<T: Into<Box<BigQueryDestination>>>(
self,
v: T,
) -> Self
👎Deprecated
pub fn set_partial_failure_bigquery_sink<T: Into<Box<BigQueryDestination>>>( self, v: T, ) -> Self
Sets the value of partial_failure_sink
to hold a PartialFailureBigquerySink.
Note that all the setters affecting partial_failure_sink are
mutually exclusive.
Sourcepub fn set_import_result_sink<T: Into<Option<ImportResultSink>>>(
self,
v: T,
) -> Self
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.
Sourcepub fn import_result_gcs_sink(&self) -> Option<&Box<GcsDestination>>
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.
Sourcepub fn set_import_result_gcs_sink<T: Into<Box<GcsDestination>>>(
self,
v: T,
) -> Self
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.
Sourcepub fn import_result_bigquery_sink(&self) -> Option<&Box<BigQueryDestination>>
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.
Sourcepub fn set_import_result_bigquery_sink<T: Into<Box<BigQueryDestination>>>(
self,
v: T,
) -> Self
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
impl Clone for ImportRagFilesConfig
Source§fn clone(&self) -> ImportRagFilesConfig
fn clone(&self) -> ImportRagFilesConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more