Commit d08286e2 authored by alex yao's avatar alex yao

feat: Function新增计算器

parent 6ba75e92
......@@ -26,7 +26,7 @@ public class CalculatorFunction extends AbstractLargeModelFunction {
.name("calculator")
.description(DESC)
.parameters(new Parameters("object")
.addProperties("arithmetic_expression", new Properties("string", "算术表达式,需要精确的算术表达式如6的平方为 6^2")))
.addProperties("arithmetic_expression", new Properties("string", "算术表达式,需要精确的算术表达式如6的平方为 6*6")))
.build();
@Override
......
......@@ -20,6 +20,6 @@ public class AviatorFunctionTest {
@Test
public void test_aviator() {
System.out.println(AviatorEvaluator.compile("6^2").execute().toString());
System.out.println(AviatorEvaluator.compile("6%3").execute().toString());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment