def get_input() -> str:
    print("Insert your text. Enter 'q' or press Ctrl-D (or Ctrl-Z on Windows) to end.")
    contents = []
    while True:
        try:
            line = input()
        except EOFError:
            break
        if line == "q":
            break
        contents.append(line)
    return "\n".join(contents)
# You can modify the tool when loading
tools = load_tools(
    ["human", "ddg-search"], 
    llm=math_llm,
    input_func=get_input
)
# Or you can directly instantiate the tool
from langchain.tools import HumanInputRun
tool = HumanInputRun(input_func=get_input)
agent_chain = initialize_agent(
    tools,
    llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True,
)
agent_chain.run("I need help attributing a quote")
> Entering new AgentExecutor chain...
I should ask a human for guidance
Action: Human
Action Input: "Can you help me attribute a quote?"
Can you help me attribute a quote?
Insert your text. Enter 'q' or press Ctrl-D (or Ctrl-Z on Windows) to end.
 vini
 vidi
 vici
 q
Observation: vini
vidi
vici
Thought:I need to provide more context about the quote
Action: Human
Action Input: "The quote is 'Veni, vidi, vici'"
The quote is 'Veni, vidi, vici'
Insert your text. Enter 'q' or press Ctrl-D (or Ctrl-Z on Windows) to end.
 oh who said it 
 q
Observation: oh who said it
rtdocs_stable/api.python.langchain.com/en/stable/modules/agents/tools/examples/human_tools.html