From a9faabc3742440aa6b196666b6d5eea288edc25a Mon Sep 17 00:00:00 2001 From: sunxichen Date: Tue, 25 Jun 2024 16:59:50 +0800 Subject: [PATCH] fix ChatCompletion and ChatCompletionChunk object string not compatible with standard openai api (#2089) Co-authored-by: sunxichen --- router/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/src/lib.rs b/router/src/lib.rs index b0b93c13..5d201937 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -570,7 +570,7 @@ impl ChatCompletion { }; Self { id: String::new(), - object: "text_completion".into(), + object: "chat.completion".into(), created, model, system_fingerprint, @@ -682,7 +682,7 @@ impl ChatCompletionChunk { }; Self { id: String::new(), - object: "text_completion".to_string(), + object: "chat.completion.chunk".to_string(), created, model, system_fingerprint,