fix ChatCompletion and ChatCompletionChunk object string not compatible with standard openai api (#2089)

Co-authored-by: sunxichen <sun.xc@digitalcnzz.com>
This commit is contained in:
sunxichen 2024-06-25 16:59:50 +08:00 committed by yuanwu
parent e49aed4713
commit a9faabc374

View File

@ -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,