summaryrefslogtreecommitdiffstats
path: root/src/client/openai.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-04-25 14:39:31 +0800
committerGitHub <noreply@github.com>2024-04-25 14:39:31 +0800
commit1a56e38fe22336e6b6587ff7d99218295e28235f (patch)
tree0b19a492fe27ad2f5f8a98f1eca89cb73d3fcd50 /src/client/openai.rs
parenta193710a7f88de12ef11c5a5c66a5591150fe247 (diff)
downloadaichat-1a56e38fe22336e6b6587ff7d99218295e28235f.tar.gz
refactor: fix typo and some error message (#438)
Diffstat (limited to 'src/client/openai.rs')
-rw-r--r--src/client/openai.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs
index e5aae24..bb9c07c 100644
--- a/src/client/openai.rs
+++ b/src/client/openai.rs
@@ -107,7 +107,10 @@ pub async fn openai_send_message_streaming(
let data: Value = match text.parse() {
Ok(data) => data,
Err(_) => {
- bail!("Invalid respoinse, status: {status}, text: {text}");
+ bail!(
+ "Invalid response data: {text} (status: {})",
+ status.as_u16()
+ );
}
};
catch_error(&data, status.as_u16())?;