MCPcopy Index your code
hub / github.com/openai/openai-agents-python / prompt_yes_no

Function prompt_yes_no

examples/memory/memory_session_hitl_example.py:44–53  ·  view source on GitHub ↗

Prompt user for yes/no answer. Args: question: The question to ask Returns: True if user answered yes, False otherwise

(question: str)

Source from the content-addressed store, hash-verified

42
43
44async def prompt_yes_no(question: str) -> bool:
45 """Prompt user for yes/no answer.
46
47 Args:
48 question: The question to ask
49
50 Returns:
51 True if user answered yes, False otherwise
52 """
53 return confirm_with_fallback(f"\n{question} (y/n): ", default=True)
54
55
56async def main():

Callers 1

mainFunction · 0.70

Calls 1

confirm_with_fallbackFunction · 0.90

Tested by

no test coverage detected