From d25a23f93c1d0551abdef3c203da1d2f18dff6e7 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 22 May 2024 21:01:46 +0200 Subject: [PATCH] updated calculartor --- lollms/functions/calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lollms/functions/calculator.py b/lollms/functions/calculator.py index ef3728f..c7c6bb5 100644 --- a/lollms/functions/calculator.py +++ b/lollms/functions/calculator.py @@ -1,7 +1,7 @@ import math from functools import partial -def calculate(expression: str) -> float: +def calculate(expression: str) -> float: try: # Add the math module functions to the local namespace allowed_names = {k: v for k, v in math.__dict__.items() if not k.startswith("__")}