mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-20 19:49:25 +00:00
updated calculartor
This commit is contained in:
parent
b3291c5878
commit
d25a23f93c
@ -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("__")}
|
||||
|
Loading…
Reference in New Issue
Block a user