parent
							
								
									cc21135188
								
							
						
					
					
						commit
						a4f89b68b2
					
				|  | @ -14,9 +14,9 @@ | |||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| # See the License for the specific language governing permissions and | ||||
| # limitations under the License. | ||||
| import re | ||||
| import base64 | ||||
| import pickle | ||||
| import re | ||||
| import textwrap | ||||
| from io import BytesIO | ||||
| from typing import Any, List, Tuple | ||||
|  | @ -47,7 +47,7 @@ class E2BExecutor: | |||
| 
 | ||||
|         self.custom_tools = {} | ||||
|         self.final_answer = False | ||||
|         self.final_answer_pattern = re.compile(r'^final_answer\((.*)\)$') | ||||
|         self.final_answer_pattern = re.compile(r"^final_answer\((.*)\)$") | ||||
|         self.sbx = Sandbox()  # "qywp2ctmu2q7jzprcf4j") | ||||
|         # TODO: validate installing agents package or not | ||||
|         # print("Installing agents package on remote executor...") | ||||
|  |  | |||
|  | @ -25,9 +25,7 @@ class MethodChecker(ast.NodeVisitor): | |||
|         self.class_attributes = class_attributes | ||||
|         self.errors = [] | ||||
|         self.check_imports = check_imports | ||||
|         self.typing_names = { | ||||
|             'Any' | ||||
|         } | ||||
|         self.typing_names = {"Any"} | ||||
| 
 | ||||
|     def visit_arguments(self, node): | ||||
|         """Collect function arguments""" | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ | |||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| # See the License for the specific language governing permissions and | ||||
| # limitations under the License. | ||||
| import tempfile | ||||
| import unittest | ||||
| from pathlib import Path | ||||
| from textwrap import dedent | ||||
|  | @ -399,7 +400,10 @@ class ToolTests(unittest.TestCase): | |||
|             """ | ||||
|             return | ||||
| 
 | ||||
|         with tempfile.TemporaryDirectory() as tmp_dir: | ||||
|             get_weather.save(tmp_dir) | ||||
|         assert get_weather.inputs["location"]["type"] == "any" | ||||
|         assert get_weather.output_type == "null" | ||||
| 
 | ||||
|     def test_tool_supports_array(self): | ||||
|         @tool | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue