diff --git a/agency_swarm/agents/agent.py b/agency_swarm/agents/agent.py index 779c9736..f39f21d6 100644 --- a/agency_swarm/agents/agent.py +++ b/agency_swarm/agents/agent.py @@ -366,7 +366,6 @@ def get_id_from_file(f_path): file_id = self.client.with_options( timeout=80 * 1000, ).files.create(file=f, purpose="assistants").id - f.close() add_id_to_file(f_path, file_id) if file_ext in code_interpreter_file_extensions: @@ -464,7 +463,6 @@ def _parse_schemas(self): for f_path in f_paths: with open(f_path, 'r') as f: openapi_spec = f.read() - f.close() try: validate_openapi_spec(openapi_spec) except Exception as e: