pub struct AnthropicVisionVerifier { /* private fields */ }Expand description
The first usable verifier (08 §6.4): asks an Anthropic vision model to
answer the author’s prompt against the screenshot, over raw HTTP (no
official Rust SDK exists). Discipline unchanged from the trait docs:
verify-only, chain tail only, and every failure mode — missing key,
transport, non-200, unparseable answer, model uncertainty — folds to
unknown with a reason, never an error and never a guessed pass
(principles 4/7).
Implementations§
Source§impl AnthropicVisionVerifier
impl AnthropicVisionVerifier
Sourcepub fn new(
api_key: impl Into<String>,
model: impl Into<String>,
base_url: impl Into<String>,
) -> Self
pub fn new( api_key: impl Into<String>, model: impl Into<String>, base_url: impl Into<String>, ) -> Self
Builds a verifier from explicit configuration.
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Builds from the environment: ANTHROPIC_API_KEY (required — None
without it), POINTLOCK_VISION_MODEL (default
DEFAULT_VISION_MODEL), ANTHROPIC_BASE_URL (default the public
API; overriding it is also how the tests run against a local
canned-response server).
Trait Implementations§
Source§impl VisionVerifier for AnthropicVisionVerifier
impl VisionVerifier for AnthropicVisionVerifier
Source§fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
request: VisionRequest<'life1>,
) -> Pin<Box<dyn Future<Output = VisionVerdict> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
request: VisionRequest<'life1>,
) -> Pin<Box<dyn Future<Output = VisionVerdict> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Answers
request.prompt against the screenshot. Infallible by
construction: anything that prevents an answer is an unknown
verdict with a reason, never an error (principle 4).Auto Trait Implementations§
impl !RefUnwindSafe for AnthropicVisionVerifier
impl !UnwindSafe for AnthropicVisionVerifier
impl Freeze for AnthropicVisionVerifier
impl Send for AnthropicVisionVerifier
impl Sync for AnthropicVisionVerifier
impl Unpin for AnthropicVisionVerifier
impl UnsafeUnpin for AnthropicVisionVerifier
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