MCPcopy Create free account
hub / github.com/openai/openai-agents-python / read_file

Method read_file

tests/sandbox/test_runtime.py:808–811  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

806
807 @function_tool(name_override="read_file")
808 async def read_file(path: str) -> str:
809 assert self.bound_session is not None
810 data = await self.bound_session.read(Path(path))
811 return cast(bytes, data.read()).decode("utf-8")
812
813 return [write_file, read_file]
814

Callers 2

readMethod · 0.45

Calls 2

readMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected