#[non_exhaustive]pub struct ComputerUse {
pub environment: Environment,
pub excluded_predefined_functions: Vec<String>,
/* private fields */
}Available on crate features
gen-ai-cache-service or llm-utility-service or prediction-service only.Expand description
Tool to support computer use.
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.environment: EnvironmentRequired. The environment being operated.
excluded_predefined_functions: Vec<String>Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes:
- Using a more restricted / different action space.
- Improving the definitions / instructions of predefined functions.
Implementations§
Source§impl ComputerUse
impl ComputerUse
pub fn new() -> Self
Sourcepub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
pub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
Sets the value of environment.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::tool::computer_use::Environment;
let x0 = ComputerUse::new().set_environment(Environment::Browser);Sourcepub fn set_excluded_predefined_functions<T, V>(self, v: T) -> Self
pub fn set_excluded_predefined_functions<T, V>(self, v: T) -> Self
Sets the value of excluded_predefined_functions.
§Example
ⓘ
let x = ComputerUse::new().set_excluded_predefined_functions(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for ComputerUse
impl Clone for ComputerUse
Source§fn clone(&self) -> ComputerUse
fn clone(&self) -> ComputerUse
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 ComputerUse
impl Debug for ComputerUse
Source§impl Default for ComputerUse
impl Default for ComputerUse
Source§fn default() -> ComputerUse
fn default() -> ComputerUse
Returns the “default value” for a type. Read more
Source§impl Message for ComputerUse
impl Message for ComputerUse
Source§impl PartialEq for ComputerUse
impl PartialEq for ComputerUse
impl StructuralPartialEq for ComputerUse
Auto Trait Implementations§
impl Freeze for ComputerUse
impl RefUnwindSafe for ComputerUse
impl Send for ComputerUse
impl Sync for ComputerUse
impl Unpin for ComputerUse
impl UnwindSafe for ComputerUse
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