async_llm/response/mod.rs
1pub mod chat;
2
3pub use chat::{ChatResponse, ChatResponseStream};
4
5use crate::{Error, Printable};
6
7pub trait Respondable {
8 fn is_success(&self) -> bool {
9 true
10 }
11}
12
13impl Respondable for serde_json::Value {}
14
15impl Printable for serde_json::Value {
16 fn to_string_pretty(&self) -> Result<String, Error> {
17 Ok(serde_json::to_string_pretty(self)?)
18 }
19}