#[non_exhaustive]pub struct LlmParser {
pub model_name: String,
pub max_parsing_requests_per_min: i32,
pub custom_parsing_prompt: String,
/* private fields */
}Expand description
Specifies the advanced parsing for 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.model_name: StringThe name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}
max_parsing_requests_per_min: i32The maximum number of requests the job is allowed to make to the LLM model per minute. Consult https://cloud.google.com/vertex-ai/generative-ai/docs/quotas and your document size to set an appropriate value here. If unspecified, a default value of 5000 QPM would be used.
custom_parsing_prompt: StringThe prompt to use for parsing. If not specified, a default prompt will be used.
Implementations§
Source§impl LlmParser
impl LlmParser
pub fn new() -> Self
Sourcepub fn set_model_name<T: Into<String>>(self, v: T) -> Self
pub fn set_model_name<T: Into<String>>(self, v: T) -> Self
Sets the value of model_name.
Sourcepub fn set_max_parsing_requests_per_min<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_parsing_requests_per_min<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_parsing_requests_per_min.
Sourcepub fn set_custom_parsing_prompt<T: Into<String>>(self, v: T) -> Self
pub fn set_custom_parsing_prompt<T: Into<String>>(self, v: T) -> Self
Sets the value of custom_parsing_prompt.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LlmParser
impl<'de> Deserialize<'de> for LlmParser
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for LlmParser
Auto Trait Implementations§
impl Freeze for LlmParser
impl RefUnwindSafe for LlmParser
impl Send for LlmParser
impl Sync for LlmParser
impl Unpin for LlmParser
impl UnwindSafe for LlmParser
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