File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
async-openai-wasm/src/types/realtime Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ pub struct ConversationItemTruncateEvent {
68
68
/// The index of the content part to truncate.
69
69
pub content_index : u32 ,
70
70
71
- /// Inclusive duration up to which audio is truncated, in milliseconds.
71
+ /// Inclusive duration up to which audio is truncated, in milliseconds.
72
72
pub audio_end_ms : u32 ,
73
73
}
74
74
@@ -140,9 +140,15 @@ pub enum ClientEvent {
140
140
ResponseCancel ( ResponseCancelEvent ) ,
141
141
}
142
142
143
- impl Into < String > for & ClientEvent {
144
- fn into ( self ) -> String {
145
- serde_json:: to_string ( self ) . unwrap ( )
143
+ impl From < & ClientEvent > for String {
144
+ fn from ( value : & ClientEvent ) -> Self {
145
+ serde_json:: to_string ( value) . unwrap ( )
146
+ }
147
+ }
148
+
149
+ impl From < ClientEvent > for Message {
150
+ fn from ( value : ClientEvent ) -> Self {
151
+ Message :: Text ( String :: from ( & value) . into ( ) )
146
152
}
147
153
}
148
154
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ edition = "2021"
7
7
async-openai-wasm = { path = " ../../async-openai-wasm" , features = [" realtime" ] }
8
8
futures-channel = " 0.3.31"
9
9
futures-util = { version = " 0.3.31" , features = [" sink" , " std" ] }
10
- serde = { version = " 1.0.210 " , features = [" derive" ] }
11
- serde_json = " 1.0.128 "
12
- tokio = { version = " 1.40 .0" , features = [
10
+ serde = { version = " 1.0.217 " , features = [" derive" ] }
11
+ serde_json = " 1.0.135 "
12
+ tokio = { version = " 1.43 .0" , features = [
13
13
" io-std" ,
14
14
" io-util" ,
15
15
" macros" ,
16
16
" rt-multi-thread" ,
17
17
] }
18
- tokio-tungstenite = { version = " 0.24.0 " , features = [" connect" , " native-tls" ] }
18
+ tokio-tungstenite = { version = " 0.26.1 " , features = [" connect" , " native-tls" ] }
You can’t perform that action at this time.
0 commit comments