Skip to content

feat: Durable web search golem:web-search API across multiple providers in Rust #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b06c9ea
feat: Durable web search golem:web-search API across multiple provide…
SAIKIRANSURAPALLI Jul 2, 2025
7ba26ae
Deleted unwanted files
SaikiranSurapalli17 Jul 2, 2025
92e518c
chore: add GitHub Actions workflow files
SAIKIRANSURAPALLI Jul 2, 2025
34f25a2
Implement test-websearch component with diverse search test functions
SAIKIRANSURAPALLI Jul 3, 2025
c7a6d3b
Implemented durability/failure test for search session, refactored ta…
SaikiranSurapalli17 Jul 17, 2025
41d0f17
Add .DS_Store to .gitignore
SaikiranSurapalli17 Jul 17, 2025
cdff1fa
clippy fix
SaikiranSurapalli17 Jul 18, 2025
a278266
Merge branch 'main' into websearch
SaikiranSurapalli17 Jul 18, 2025
2fd8fe4
clippy
SaikiranSurapalli17 Jul 18, 2025
2a9a4b4
Merge branch 'websearch' of github.com:SaikiranSurapalli17/golem-ai i…
SaikiranSurapalli17 Jul 18, 2025
b0cfd98
Refactor websearch: remove shared event_source module and implement p…
SaikiranSurapalli17 Jul 18, 2025
aae851a
chore: remove unused dependencies from websearch
SaikiranSurapalli17 Jul 18, 2025
f079750
chore: remove .DS_Store
SaikiranSurapalli17 Jul 18, 2025
811c938
chore: remove .DS_Store
SaikiranSurapalli17 Jul 18, 2025
c9e0ec1
Update .github/workflows/ci.yaml
SaikiranSurapalli17 Jul 18, 2025
e2462b9
chore: remove .DS_Store
SaikiranSurapalli17 Jul 18, 2025
a4d0b52
feat: pagination
SaikiranSurapalli17 Jul 19, 2025
3973398
Fix all Clippy lints and formatting for Rust 1.88.0
SaikiranSurapalli17 Jul 19, 2025
ea7d6fe
Merge branch 'main' into websearch
SaikiranSurapalli17 Jul 19, 2025
aae73d8
Merge remote-tracking branch 'upstream/main' into websearch
SaikiranSurapalli17 Jul 19, 2025
4172ec9
improve pagination/durability logic, and add current_page to search-m…
SaikiranSurapalli17 Jul 19, 2025
d490b88
Merge branch 'main' into websearch
SaikiranSurapalli17 Jul 19, 2025
6a0852d
Fix get_metadata to always delegate to live session after replay
SaikiranSurapalli17 Jul 19, 2025
ab1a254
Remove unused pollables and subscribe, fix replay metadata, and repla…
SaikiranSurapalli17 Jul 19, 2025
93ad3c9
Refactor durability logic, fix Brave pagination, and add test delay
SaikiranSurapalli17 Jul 20, 2025
8a63b5a
Stateful-persistence
SaikiranSurapalli17 Jul 20, 2025
cb253a3
Stateful-persistence
SaikiranSurapalli17 Jul 20, 2025
37ccb22
Resilience
SaikiranSurapalli17 Jul 21, 2025
5166b2d
Durable-state
SaikiranSurapalli17 Jul 21, 2025
b675413
Consistency Durability
SaikiranSurapalli17 Jul 21, 2025
b4f73ce
Replay
SaikiranSurapalli17 Jul 21, 2025
addbc2e
Simulated-pagination
SaikiranSurapalli17 Jul 21, 2025
459e7e2
Websearch cleanup: pagination, serde, replay state, and unused code r…
SaikiranSurapalli17 Jul 22, 2025
0b5573a
Merge branch 'main' into websearch
SaikiranSurapalli17 Jul 22, 2025
7d85616
clippy check
SaikiranSurapalli17 Jul 22, 2025
174688a
various fixes and cleanups
mschuwalow Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: CI


on:
push:
tags:
Expand Down
97 changes: 97 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ members = [
"llm/ollama",
"llm/openai",
"llm/openrouter",
"websearch/websearch",
"websearch/brave",
"websearch/google",
"websearch/serper",
"websearch/tavily",
]

[profile.release]
Expand Down
44 changes: 33 additions & 11 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ args = ["test"]
[tasks.build]
script_runner = "@duckscript"
script = '''
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand All @@ -28,7 +28,7 @@ end
[tasks.release-build]
script_runner = "@duckscript"
script = '''
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand All @@ -44,7 +44,7 @@ end
script_runner = "@duckscript"
script = '''
#!/bin/bash
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand All @@ -60,7 +60,7 @@ end
script_runner = "@duckscript"
script = '''
#!/bin/bash
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand All @@ -75,7 +75,7 @@ end
[tasks.wit]
script_runner = "@duckscript"
script = '''
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand All @@ -91,7 +91,7 @@ end
description = "Builds all test components with golem-cli"
script_runner = "@duckscript"
script = '''
domains = array llm
domains = array llm websearch

# if there is no domain passed run for every domain
if is_empty ${1}
Expand Down Expand Up @@ -137,8 +137,19 @@ script = '''

is_portable = eq ${1} "--portable"

targets = array llm_openai llm_anthropic llm_grok llm_openrouter llm_ollama
for target in ${targets}
# LLM targets
llm_targets = array llm_openai llm_anthropic llm_grok llm_openrouter llm_ollama
for target in ${llm_targets}
if is_portable
cp target/wasm32-wasip1/debug/golem_${target}.wasm components/debug/golem_${target}-portable.wasm
else
cp target/wasm32-wasip1/debug/golem_${target}.wasm components/debug/golem_${target}.wasm
end
end

# WebSearch targets - use correct target names that match the actual WASM files
websearch_targets = array web_search_brave web_search_google web_search_serper web_search_tavily
for target in ${websearch_targets}
if is_portable
cp target/wasm32-wasip1/debug/golem_${target}.wasm components/debug/golem_${target}-portable.wasm
else
Expand All @@ -153,8 +164,19 @@ script = '''

is_portable = eq ${1} "--portable"

targets = array llm_openai llm_anthropic llm_grok llm_openrouter llm_ollama
for target in ${targets}
# LLM targets
llm_targets = array llm_openai llm_anthropic llm_grok llm_openrouter llm_ollama
for target in ${llm_targets}
if is_portable
cp target/wasm32-wasip1/release/golem_${target}.wasm components/release/golem_${target}-portable.wasm
else
cp target/wasm32-wasip1/release/golem_${target}.wasm components/release/golem_${target}.wasm
end
end

# WebSearch targets
websearch_targets = array websearch_brave websearch_google websearch_serper websearch_tavily
for target in ${websearch_targets}
if is_portable
cp target/wasm32-wasip1/release/golem_${target}.wasm components/release/golem_${target}-portable.wasm
else
Expand Down Expand Up @@ -229,4 +251,4 @@ foreach ($file in $cargoFiles)
Foreach-Object { $_ -replace "0.0.0", $Env:VERSION } |
Set-Content $file.PSPath
}
'''
'''
11 changes: 7 additions & 4 deletions llm/anthropic/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Generated by `wit-bindgen` 0.36.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT!
// Options used:
// * runtime_path: "wit_bindgen_rt"
// * with "golem:llm/llm@1.0.0" = "golem_llm::golem::llm::llm"
// * generate_unused_types
use golem_llm::golem::llm::llm as __with_name0;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.36.0:golem:llm-anthropic@1.0.0:llm-library:encoded world"]
#[unsafe(
link_section = "component-type:wit-bindgen:0.41.0:golem:llm-anthropic@1.0.0:llm-library:encoded world"
)]
#[doc(hidden)]
#[allow(clippy::octal_escapes)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1762] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xe0\x0c\x01A\x02\x01\
A\x02\x01BO\x01m\x04\x04user\x09assistant\x06system\x04tool\x04\0\x04role\x03\0\0\
Expand Down Expand Up @@ -43,8 +46,8 @@ ng-get-next\x01B\x01p\x15\x01@\x02\x08messages\xc3\0\x06config)\06\x04\0\x04send
\0\x06config)\06\x04\0\x08continue\x01G\x01i=\x01@\x02\x08messages\xc3\0\x06conf\
ig)\0\xc8\0\x04\0\x06stream\x01I\x04\0\x13golem:llm/llm@1.0.0\x05\0\x04\0%golem:\
llm-anthropic/llm-library@1.0.0\x04\0\x0b\x11\x01\0\x0bllm-library\x03\0\0\0G\x09\
producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.220.0\x10wit-bindgen-rus\
t\x060.36.0";
producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rus\
t\x060.41.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
11 changes: 7 additions & 4 deletions llm/grok/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Generated by `wit-bindgen` 0.36.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT!
// Options used:
// * runtime_path: "wit_bindgen_rt"
// * with "golem:llm/llm@1.0.0" = "golem_llm::golem::llm::llm"
// * generate_unused_types
use golem_llm::golem::llm::llm as __with_name0;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.36.0:golem:llm-grok@1.0.0:llm-library:encoded world"]
#[unsafe(
link_section = "component-type:wit-bindgen:0.41.0:golem:llm-grok@1.0.0:llm-library:encoded world"
)]
#[doc(hidden)]
#[allow(clippy::octal_escapes)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1757] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdb\x0c\x01A\x02\x01\
A\x02\x01BO\x01m\x04\x04user\x09assistant\x06system\x04tool\x04\0\x04role\x03\0\0\
Expand Down Expand Up @@ -43,8 +46,8 @@ ng-get-next\x01B\x01p\x15\x01@\x02\x08messages\xc3\0\x06config)\06\x04\0\x04send
\0\x06config)\06\x04\0\x08continue\x01G\x01i=\x01@\x02\x08messages\xc3\0\x06conf\
ig)\0\xc8\0\x04\0\x06stream\x01I\x04\0\x13golem:llm/llm@1.0.0\x05\0\x04\0\x20gol\
em:llm-grok/llm-library@1.0.0\x04\0\x0b\x11\x01\0\x0bllm-library\x03\0\0\0G\x09p\
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.220.0\x10wit-bindgen-rust\
\x060.36.0";
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rust\
\x060.41.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
11 changes: 7 additions & 4 deletions llm/ollama/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Generated by `wit-bindgen` 0.36.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT!
// Options used:
// * runtime_path: "wit_bindgen_rt"
// * with "golem:llm/llm@1.0.0" = "golem_llm::golem::llm::llm"
// * generate_unused_types
use golem_llm::golem::llm::llm as __with_name0;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.36.0:golem:llm-ollama@1.0.0:llm-library:encoded world"]
#[unsafe(
link_section = "component-type:wit-bindgen:0.41.0:golem:llm-ollama@1.0.0:llm-library:encoded world"
)]
#[doc(hidden)]
#[allow(clippy::octal_escapes)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1759] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdd\x0c\x01A\x02\x01\
A\x02\x01BO\x01m\x04\x04user\x09assistant\x06system\x04tool\x04\0\x04role\x03\0\0\
Expand Down Expand Up @@ -43,8 +46,8 @@ ng-get-next\x01B\x01p\x15\x01@\x02\x08messages\xc3\0\x06config)\06\x04\0\x04send
\0\x06config)\06\x04\0\x08continue\x01G\x01i=\x01@\x02\x08messages\xc3\0\x06conf\
ig)\0\xc8\0\x04\0\x06stream\x01I\x04\0\x13golem:llm/llm@1.0.0\x05\0\x04\0\"golem\
:llm-ollama/llm-library@1.0.0\x04\0\x0b\x11\x01\0\x0bllm-library\x03\0\0\0G\x09p\
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.220.0\x10wit-bindgen-rust\
\x060.36.0";
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rust\
\x060.41.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
11 changes: 7 additions & 4 deletions llm/openai/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Generated by `wit-bindgen` 0.36.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT!
// Options used:
// * runtime_path: "wit_bindgen_rt"
// * with "golem:llm/llm@1.0.0" = "golem_llm::golem::llm::llm"
// * generate_unused_types
use golem_llm::golem::llm::llm as __with_name0;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.36.0:golem:llm-openai@1.0.0:llm-library:encoded world"]
#[unsafe(
link_section = "component-type:wit-bindgen:0.41.0:golem:llm-openai@1.0.0:llm-library:encoded world"
)]
#[doc(hidden)]
#[allow(clippy::octal_escapes)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1759] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdd\x0c\x01A\x02\x01\
A\x02\x01BO\x01m\x04\x04user\x09assistant\x06system\x04tool\x04\0\x04role\x03\0\0\
Expand Down Expand Up @@ -43,8 +46,8 @@ ng-get-next\x01B\x01p\x15\x01@\x02\x08messages\xc3\0\x06config)\06\x04\0\x04send
\0\x06config)\06\x04\0\x08continue\x01G\x01i=\x01@\x02\x08messages\xc3\0\x06conf\
ig)\0\xc8\0\x04\0\x06stream\x01I\x04\0\x13golem:llm/llm@1.0.0\x05\0\x04\0\"golem\
:llm-openai/llm-library@1.0.0\x04\0\x0b\x11\x01\0\x0bllm-library\x03\0\0\0G\x09p\
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.220.0\x10wit-bindgen-rust\
\x060.36.0";
roducers\x01\x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rust\
\x060.41.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
11 changes: 7 additions & 4 deletions llm/openrouter/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Generated by `wit-bindgen` 0.36.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT!
// Options used:
// * runtime_path: "wit_bindgen_rt"
// * with "golem:llm/llm@1.0.0" = "golem_llm::golem::llm::llm"
// * generate_unused_types
use golem_llm::golem::llm::llm as __with_name0;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.36.0:golem:llm-openrouter@1.0.0:llm-library:encoded world"]
#[unsafe(
link_section = "component-type:wit-bindgen:0.41.0:golem:llm-openrouter@1.0.0:llm-library:encoded world"
)]
#[doc(hidden)]
#[allow(clippy::octal_escapes)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1763] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xe1\x0c\x01A\x02\x01\
A\x02\x01BO\x01m\x04\x04user\x09assistant\x06system\x04tool\x04\0\x04role\x03\0\0\
Expand Down Expand Up @@ -43,8 +46,8 @@ ng-get-next\x01B\x01p\x15\x01@\x02\x08messages\xc3\0\x06config)\06\x04\0\x04send
\0\x06config)\06\x04\0\x08continue\x01G\x01i=\x01@\x02\x08messages\xc3\0\x06conf\
ig)\0\xc8\0\x04\0\x06stream\x01I\x04\0\x13golem:llm/llm@1.0.0\x05\0\x04\0&golem:\
llm-openrouter/llm-library@1.0.0\x04\0\x0b\x11\x01\0\x0bllm-library\x03\0\0\0G\x09\
producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.220.0\x10wit-bindgen-rus\
t\x060.36.0";
producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rus\
t\x060.41.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
12 changes: 12 additions & 0 deletions test/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading