pub struct PrivateCloudComputeLanguageModel { /* private fields */ }Expand description
Apple Foundation Models running on Private Cloud Compute.
This model requires a 27.0-or-newer Apple platform, network access, an
Apple Intelligence-capable device, and Apple’s managed
com.apple.developer.private-cloud-compute entitlement authorized by the
app’s provisioning profile. Construction on an older SDK or runtime returns
Error::UnsupportedPlatform.
Implementations§
Source§impl PrivateCloudComputeLanguageModel
impl PrivateCloudComputeLanguageModel
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Checks whether PCC is currently available.
Sourcepub fn availability(&self) -> ModelAvailability
pub fn availability(&self) -> ModelAvailability
Returns the current reason-specific PCC availability.
Sourcepub fn ensure_available(&self) -> Result<()>
pub fn ensure_available(&self) -> Result<()>
Returns a reason-specific error if PCC is unavailable.
Sourcepub fn quota_usage(&self) -> Result<QuotaUsage>
pub fn quota_usage(&self) -> Result<QuotaUsage>
Returns the user’s current Private Cloud Compute quota usage.
Apple applies a daily, per-user iCloud quota; check this before
sending requests to decide whether to fall back to the on-device
crate::SystemLanguageModel.
Sourcepub fn context_size(&self) -> Result<u64>
pub fn context_size(&self) -> Result<u64>
Returns the Private Cloud Compute context window size in tokens.
This performs a network request and can fail with
Error::NetworkFailure or Error::ServiceUnavailable.
Trait Implementations§
Source§impl Debug for PrivateCloudComputeLanguageModel
Available on crate feature private-cloud-compute only.
impl Debug for PrivateCloudComputeLanguageModel
private-cloud-compute only.Source§impl LanguageModel for PrivateCloudComputeLanguageModel
Available on crate feature private-cloud-compute only.
impl LanguageModel for PrivateCloudComputeLanguageModel
private-cloud-compute only.