From 8e859cf9ddd0dc1aac57c585c1dc9143e621030c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken=20=E2=99=BE=EF=B8=8F?= Date: Wed, 29 Oct 2025 21:50:53 -0700 Subject: [PATCH 1/4] make object field in openai-compatible response optional --- src/v1/chat_completion/chat_completion.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v1/chat_completion/chat_completion.rs b/src/v1/chat_completion/chat_completion.rs index 2c56287..bd2807a 100644 --- a/src/v1/chat_completion/chat_completion.rs +++ b/src/v1/chat_completion/chat_completion.rs @@ -101,7 +101,7 @@ impl_builder_methods!( #[derive(Debug, Deserialize, Serialize)] pub struct ChatCompletionResponse { pub id: Option, - pub object: String, + pub object: Option, pub created: i64, pub model: String, pub choices: Vec, From 84d6eea41844fbbba1210fc66878996a1c734d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken=20=E2=99=BE=EF=B8=8F?= Date: Wed, 29 Oct 2025 22:04:58 -0700 Subject: [PATCH 2/4] add '-prime' to package name so it can be published to crates.io --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f7b8410..7733ce0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "openai-api-rs" +name = "openai-api-rs-prime" version = "7.0.1" edition = "2021" authors = ["Dongri Jin "] From f1ec7609b9cf74d390b4c8e7f00806385dd991c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken=20=E2=99=BE=EF=B8=8F?= Date: Wed, 29 Oct 2025 22:06:27 -0700 Subject: [PATCH 3/4] update repository url --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7733ce0..c617438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" authors = ["Dongri Jin "] license = "MIT" description = "OpenAI API client library for Rust (unofficial)" -repository = "https://github.com/dongri/openai-api-rs" +repository = "https://github.com/MoonKraken/openai-api-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 931f234b4eb9dcc36d91bc88079c787aa17be522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken=20=E2=99=BE=EF=B8=8F?= Date: Thu, 30 Oct 2025 11:33:54 -0700 Subject: [PATCH 4/4] revert Cargo.toml changes for PR to upstream repo --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c617438..f7b8410 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "openai-api-rs-prime" +name = "openai-api-rs" version = "7.0.1" edition = "2021" authors = ["Dongri Jin "] license = "MIT" description = "OpenAI API client library for Rust (unofficial)" -repository = "https://github.com/MoonKraken/openai-api-rs" +repository = "https://github.com/dongri/openai-api-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html