diff --git a/athina/steps/code_execution.py b/athina/steps/code_execution.py index 2e8d855..210a74f 100644 --- a/athina/steps/code_execution.py +++ b/athina/steps/code_execution.py @@ -119,6 +119,7 @@ def execute(self, input_data: Any) -> Union[Dict[str, Any], None]: import textdistance from datetime import datetime import textstat + import urllib custom_builtins = safe_builtins.copy() custom_builtins.update( @@ -171,6 +172,7 @@ def execute(self, input_data: Any) -> Union[Dict[str, Any], None]: "_getitem_": default_guarded_getitem, "_getiter_": default_guarded_getiter, "_write_": lambda x: x, + "urllib": urllib, } ) # Whitelist of allowed modules @@ -182,6 +184,7 @@ def execute(self, input_data: Any) -> Union[Dict[str, Any], None]: "datetime", "time", "textstat", + "urllib", } def guarded_import(name, *args, **kwargs): diff --git a/pyproject.toml b/pyproject.toml index 4cb8319..16a4f93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "athina" -version = "1.7.12" +version = "1.7.13" description = "Python SDK to configure and run evaluations for your LLM-based application" authors = ["Shiv Sakhuja ", "Akshat Gupta ", "Vivek Aditya ", "Akhil Bisht "] readme = "README.md"