Skip to content

Commit

Permalink
test: round to 2 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
rellfy committed Dec 22, 2024
1 parent ccaebcc commit 4247a14
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,10 @@ mod tests {
[
ChatCompletionMessage {
role: ChatCompletionMessageRole::User,
content: Some("What's 0.9102847*28456? reply in plain text please".to_string()),
content: Some(
"What's 0.9102847*28456? reply in plain text and round to 2 decimals"
.to_string(),
),
name: None,
function_call: None,
tool_call_id: None,
Expand Down Expand Up @@ -852,7 +855,7 @@ mod tests {
.content
.as_ref()
.unwrap(),
"The result of 0.9102847 multiplied by 28456 is approximately 25903.06."
"The result of 0.9102847 * 28456 is approximately 25903.06 when rounded to two decimal places."
);
}
}

0 comments on commit 4247a14

Please sign in to comment.