Skip to content

Commit

Permalink
fix(agents-api): fix reduce call in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedantsahai18 committed Jan 2, 2025
1 parent d6db947 commit 4d9f18d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agents-api/agents_api/activities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from dataclasses import dataclass
from threading import Lock as ThreadLock
from typing import Any, ParamSpec, TypeVar
from functools import reduce

import re2
from beartype import beartype
Expand Down Expand Up @@ -140,6 +141,7 @@ def safe_extract_json(string: str):
"sum": sum,
"tuple": tuple,
"zip": zip,
"reduce": reduce,
# Safe versions of potentially dangerous functions
"range": safe_range,
"load_json": safe_json_loads,
Expand Down

0 comments on commit 4d9f18d

Please sign in to comment.