File tree Expand file tree Collapse file tree 12 files changed +53
-34
lines changed Expand file tree Collapse file tree 12 files changed +53
-34
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ lto = true
17
17
opt-level = ' s'
18
18
19
19
[workspace .dependencies ]
20
+ golem-llm = { path = " llm" , version = " 0.0.0" , default-features = false }
21
+
20
22
golem-rust = " 1.6.0"
21
23
log = " 0.4.27"
22
24
reqwest = { git = " https://github.com/golemcloud/reqwest" , branch = " update-may-2025" , features = [
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ default = ["durability"]
16
16
durability = [" golem-rust/durability" , " golem-llm/durability" ]
17
17
18
18
[dependencies ]
19
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
19
+ golem-llm = { workspace = true }
20
20
21
21
golem-rust = { workspace = true }
22
22
log = { workspace = true }
23
- reqwest = { workspace = true }
23
+ reqwest = { workspace = true }
24
24
serde = { workspace = true }
25
25
serde_json = { workspace = true }
26
26
wit-bindgen-rt = { workspace = true }
@@ -40,4 +40,4 @@ path = "wit"
40
40
41
41
[package .metadata .component .target .dependencies ]
42
42
"golem:llm" = { path = " wit/deps/golem-llm" }
43
- "wasi:io" = { path = " wit/deps/wasi:io" }
43
+ "wasi:io" = { path = " wit/deps/wasi:io" }
File renamed without changes.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ repository = "https://github.com/golemcloud/golem-llm"
8
8
description = " WebAssembly component for working with Amazon Bedrock APIs, with special support for Golem Cloud"
9
9
10
10
[dependencies ]
11
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
11
+ golem-llm = { workspace = true }
12
12
13
13
# AWS SDK crates
14
14
aws-config = { version = " 1.5.19" , default-features = false , features = [
@@ -38,7 +38,11 @@ path = "src/lib.rs"
38
38
39
39
[features ]
40
40
default = [" durability" ]
41
- durability = [" golem-rust/durability" , " golem-llm/durability" ]
41
+ durability = [
42
+ " golem-rust/durability" ,
43
+ " golem-llm/durability" ,
44
+ " golem-llm/nopoll" ,
45
+ ]
42
46
43
47
[package .metadata .component ]
44
48
package = " golem:llm-bedrock"
Original file line number Diff line number Diff line change @@ -62,10 +62,6 @@ impl ExtendedGuest for BedrockComponent {
62
62
63
63
bedrock. unwrap ( ) . converse_stream ( messages, config)
64
64
}
65
-
66
- fn subscribe ( stream : & Self :: ChatStream ) -> golem_rust:: wasm_rpc:: Pollable {
67
- stream. subscribe ( )
68
- }
69
65
}
70
66
71
67
type DurableBedrockComponent = DurableLLM < BedrockComponent > ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use aws_sdk_bedrockruntime::{
3
3
types:: error:: ConverseStreamOutputError ,
4
4
} ;
5
5
use golem_llm:: golem:: llm:: llm;
6
- use golem_rust:: wasm_rpc:: wasi:: io:: poll:: Pollable ;
7
6
use std:: cell:: { RefCell , RefMut } ;
8
7
9
8
use crate :: {
@@ -52,10 +51,6 @@ impl BedrockChatStream {
52
51
fn set_finished ( & self ) {
53
52
* self . finished . borrow_mut ( ) = true ;
54
53
}
55
-
56
- pub fn subscribe ( & self ) -> Pollable {
57
- golem_rust:: bindings:: wasi:: clocks:: monotonic_clock:: subscribe_duration ( 0 )
58
- }
59
54
}
60
55
61
56
impl llm:: GuestChatStream for BedrockChatStream {
@@ -97,10 +92,8 @@ impl llm::GuestChatStream for BedrockChatStream {
97
92
}
98
93
99
94
fn blocking_get_next ( & self ) -> Vec < llm:: StreamEvent > {
100
- let pollable = self . subscribe ( ) ;
101
95
let mut result = Vec :: new ( ) ;
102
96
loop {
103
- pollable. block ( ) ;
104
97
match self . get_next ( ) {
105
98
Some ( events) => {
106
99
result. extend ( events) ;
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ default = ["durability"]
16
16
durability = [" golem-rust/durability" , " golem-llm/durability" ]
17
17
18
18
[dependencies ]
19
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
19
+ golem-llm = { workspace = true }
20
20
21
21
golem-rust = { workspace = true }
22
22
log = { workspace = true }
23
- reqwest = { workspace = true }
23
+ reqwest = { workspace = true }
24
24
serde = { workspace = true }
25
25
serde_json = { workspace = true }
26
26
wit-bindgen-rt = { workspace = true }
@@ -40,4 +40,4 @@ path = "wit"
40
40
41
41
[package .metadata .component .target .dependencies ]
42
42
"golem:llm" = { path = " wit/deps/golem-llm" }
43
- "wasi:io" = { path = " wit/deps/wasi:io" }
43
+ "wasi:io" = { path = " wit/deps/wasi:io" }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ default = ["durability"]
17
17
durability = [" golem-rust/durability" , " golem-llm/durability" ]
18
18
19
19
[dependencies ]
20
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
20
+ golem-llm = { workspace = true }
21
21
base64 = " 0.21"
22
22
mime_guess = " 2.0"
23
23
url = " 2.4"
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ default = ["durability"]
16
16
durability = [" golem-rust/durability" , " golem-llm/durability" ]
17
17
18
18
[dependencies ]
19
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
19
+ golem-llm = { workspace = true }
20
20
21
21
golem-rust = { workspace = true }
22
22
log = { workspace = true }
23
- reqwest = { workspace = true }
23
+ reqwest = { workspace = true }
24
24
serde = { workspace = true }
25
25
serde_json = { workspace = true }
26
26
wit-bindgen-rt = { workspace = true }
@@ -40,4 +40,4 @@ path = "wit"
40
40
41
41
[package .metadata .component .target .dependencies ]
42
42
"golem:llm" = { path = " wit/deps/golem-llm" }
43
- "wasi:io" = { path = " wit/deps/wasi:io" }
43
+ "wasi:io" = { path = " wit/deps/wasi:io" }
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ default = ["durability"]
16
16
durability = [" golem-rust/durability" , " golem-llm/durability" ]
17
17
18
18
[dependencies ]
19
- golem-llm = { path = " ../llm " , version = " 0.0.0 " , default-features = false }
19
+ golem-llm = { workspace = true }
20
20
21
21
golem-rust = { workspace = true }
22
22
log = { workspace = true }
23
- reqwest = { workspace = true }
23
+ reqwest = { workspace = true }
24
24
serde = { workspace = true }
25
25
serde_json = { workspace = true }
26
26
wit-bindgen-rt = { workspace = true }
@@ -40,4 +40,4 @@ path = "wit"
40
40
41
41
[package .metadata .component .target .dependencies ]
42
42
"golem:llm" = { path = " wit/deps/golem-llm" }
43
- "wasi:io" = { path = " wit/deps/wasi:io" }
43
+ "wasi:io" = { path = " wit/deps/wasi:io" }
You can’t perform that action at this time.
0 commit comments