Struct CheckGrounding (0.5.0)

Builder permintaan untuk panggilan [GroundedGenerationService::check_grounding][crate::client::GroundedGenerationService::check_grounding].

Contoh

# use google_cloud_discoveryengine_v1::builder;
use builder::grounded_generation_service::CheckGrounding;
# tokio_test::block_on(async {

let builder = prepare_request_builder();
let response = builder.send().await?;
# gax::Result::<()>::Ok(()) });

fn prepare_request_builder() -> CheckGrounding {
  # panic!();
  // ... details omitted ...
}

Implementasi

with_request

 fn with_request<V: Into<crate::model::CheckGroundingRequest>>(self, v: V) -> Self

Menetapkan permintaan lengkap, menggantikan nilai sebelumnya.

with_options

 fn with_options<V: Into<gax::options::RequestOptions>>(self, v: V) -> Self

Menetapkan semua opsi, menggantikan nilai sebelumnya.

kirim

async fn send(self) -> Result<crate::model::CheckGroundingResponse>

Mengirim permintaan.

set_grounding_config

 fn set_grounding_config<T: Into<std::string::String>>(self, v: T) -> Self

Menetapkan nilai [grounding_config][crate::model::CheckGroundingRequest::grounding_config].

Kolom ini wajib diisi untuk permintaan.

set_answer_candidate

 fn set_answer_candidate<T: Into<std::string::String>>(self, v: T) -> Self

Menetapkan nilai [answer_candidate][crate::model::CheckGroundingRequest::answer_candidate].

set_facts

 fn set_facts<T, V>(self, v: T) -> Self
where
    T: std::iter::IntoIterator,
    V: std::convert::Into<crate::model::GroundingFact>,

Menetapkan nilai [facts][crate::model::CheckGroundingRequest::facts].

set_grounding_spec

 fn set_grounding_spec<T>(self, v: T) -> Self
where
    T: std::convert::Into<crate::model::CheckGroundingSpec>,

Menetapkan nilai [grounding_spec][crate::model::CheckGroundingRequest::grounding_spec].

set_or_clear_grounding_spec

 fn set_or_clear_grounding_spec<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<crate::model::CheckGroundingSpec>,

Menetapkan atau menghapus nilai [grounding_spec][crate::model::CheckGroundingRequest::grounding_spec].

set_user_labels

 fn set_user_labels<T, K, V>(self, v: T) -> Self
where
    T: std::iter::IntoIterator,
    K: std::convert::Into<std::string::String>,
    V: std::convert::Into<std::string::String>,

Menetapkan nilai [user_labels][crate::model::CheckGroundingRequest::user_labels].