Skip to content

Commit 760eedc

Browse files
j-mendezclaude
andcommitted
feat(spider_agent): complete RemoteMultimodalConfigs builder pattern (#376), bump v2.47.48
Add 27 with_* builder methods to RemoteMultimodalConfigs so all cfg fields can be set in a single fluent chain without reaching into mm_config.cfg directly. Update dual-automation example accordingly. Closes #376 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6d5e0e6 commit 760eedc

10 files changed

Lines changed: 285 additions & 45 deletions

File tree

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/remote_multimodal_dual_automation.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ async fn main() {
6262
.with_vision_route_mode(VisionRouteMode::VisionFirst);
6363

6464
// ── Multi-round automation config ─────────────────────────────────
65-
let mut mm_config = mm_config;
66-
mm_config.cfg.extra_ai_data = true;
67-
mm_config.cfg.include_html = true;
68-
mm_config.cfg.include_title = true;
69-
mm_config.cfg.include_url = true;
70-
mm_config.cfg.max_rounds = 4; // Multi-round: full automation prompt
71-
mm_config.cfg.request_json_object = true;
72-
mm_config.cfg.extraction_prompt = Some(
73-
"Navigate to the first book in the catalog. Extract its title, price, and availability."
74-
.to_string(),
75-
);
76-
77-
// Optional: set the user instruction for the automation task
78-
mm_config.user_message_extra = Some(
79-
"Click on the first book link to navigate to its detail page, then extract the book data."
80-
.to_string(),
81-
);
65+
//
66+
// All cfg fields are now available as `with_*` builders on
67+
// RemoteMultimodalConfigs, so the entire config can be built
68+
// in a single fluent chain.
69+
let mm_config = mm_config
70+
.with_extra_ai_data(true)
71+
.with_include_html(true)
72+
.with_include_title(true)
73+
.with_include_url(true)
74+
.with_max_rounds(4)
75+
.with_request_json_object(true)
76+
.with_extraction_prompt(
77+
"Navigate to the first book in the catalog. Extract its title, price, and availability.",
78+
)
79+
.with_user_message_extra(
80+
"Click on the first book link to navigate to its detail page, then extract the book data.",
81+
);
8282

8383
// ── Run ───────────────────────────────────────────────────────────
8484
let mut website: Website = Website::new(url)

spider/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider"
3-
version = "2.47.47"
3+
version = "2.47.48"
44
authors = ["j-mendez <jeff@spider.cloud>"]
55
description = "A web crawler and scraper, building blocks for data curation workloads."
66
repository = "https://github.com/spider-rs/spider"
@@ -120,11 +120,11 @@ features = ["serde", "headers", "dynamic-versions"]
120120

121121
[dependencies.spider_agent_types]
122122
path = "../spider_agent_types"
123-
version = "2.47.47"
123+
version = "2.47.48"
124124

125125
[dependencies.spider_agent]
126126
path = "../spider_agent"
127-
version = "2.47.47"
127+
version = "2.47.48"
128128
optional = true
129129
default-features = false
130130

spider_agent/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider_agent"
3-
version = "2.47.47"
3+
version = "2.47.48"
44
authors = ["j-mendez <jeff@spider.cloud>"]
55
description = "A concurrent-safe multimodal agent for web automation and research."
66
repository = "https://github.com/spider-rs/spider"
@@ -28,8 +28,8 @@ parking_lot = "0.12"
2828
base64 = "0.22"
2929

3030
# Extracted types and HTML processing
31-
spider_agent_types = { version = "2.47.47", path = "../spider_agent_types" }
32-
spider_agent_html = { version = "2.47.47", path = "../spider_agent_html" }
31+
spider_agent_types = { version = "2.47.48", path = "../spider_agent_types" }
32+
spider_agent_html = { version = "2.47.48", path = "../spider_agent_html" }
3333

3434
# HTML processing (still needed for engine internals)
3535
lol_html = "2"

0 commit comments

Comments
 (0)