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

Function _get_field

examples/tools/code_interpreter.py:8–11  ·  view source on GitHub ↗
(obj: Any, key: str)

Source from the content-addressed store, hash-verified

6
7
8def _get_field(obj: Any, key: str) -> Any:
9 if isinstance(obj, Mapping):
10 return obj.get(key)
11 return getattr(obj, key, None)
12
13
14async def main():

Callers 1

mainFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected