From 7e65404591d5d3eb91a3f5c7cafa75d59cf029e6 Mon Sep 17 00:00:00 2001 From: chenwanqq Date: Fri, 1 Mar 2024 10:05:03 +0800 Subject: [PATCH] update some comment --- src/chat/function.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/chat/function.rs b/src/chat/function.rs index d1b1c94..e5dbc63 100644 --- a/src/chat/function.rs +++ b/src/chat/function.rs @@ -28,12 +28,11 @@ pub struct Function { pub struct Example { /// Same as the role in Message, can be "user", "assistant", or "function". pub role: Role, - /**Dialog content instructions: + /// Dialog content instructions: - (1) When the current message contains a function_call and the role is "assistant", the message can be empty. However, in other scenarios, it cannot be empty. + /// (1) If the current message contains a function_call and the role is "assistant", the message can be empty. However, in other scenarios, it cannot be empty. - (2) The content corresponding to the last message cannot be a blank character, including spaces, "\n", "\r", "\f", etc. - */ + /// (2) The content corresponding to the last message cannot be a blank character, including spaces, "\n", "\r", r"\f", etc. pub content: Option, #[serde(skip_serializing_if = "Option::is_none")] /// The "author" of the message. the This member is required when the role value is "function", and in this case is should be the name in the function_call in the response content