Skip to content

Commit e8e6d4c

Browse files
64bitifsheldon
authored andcommitted
update all crate dependencies (64bit#313)
* updated crate dependencies * updated dependencies of all examples * fix assistants-file-search example (cherry picked from commit 4b69cf2)
1 parent 4db12c0 commit e8e6d4c

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

async-openai-wasm/src/types/realtime/client_event.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct ConversationItemTruncateEvent {
6868
/// The index of the content part to truncate.
6969
pub content_index: u32,
7070

71-
/// Inclusive duration up to which audio is truncated, in milliseconds.
71+
/// Inclusive duration up to which audio is truncated, in milliseconds.
7272
pub audio_end_ms: u32,
7373
}
7474

@@ -140,9 +140,15 @@ pub enum ClientEvent {
140140
ResponseCancel(ResponseCancelEvent),
141141
}
142142

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())
146152
}
147153
}
148154

examples/realtime/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ edition = "2021"
77
async-openai-wasm = { path = "../../async-openai-wasm", features = ["realtime"] }
88
futures-channel = "0.3.31"
99
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 = [
1313
"io-std",
1414
"io-util",
1515
"macros",
1616
"rt-multi-thread",
1717
] }
18-
tokio-tungstenite = { version = "0.24.0", features = ["connect", "native-tls"] }
18+
tokio-tungstenite = { version = "0.26.1", features = ["connect", "native-tls"] }

0 commit comments

Comments
 (0)