Make the OpenAPI agent's verbose print optional (#2666)

This commit is contained in:
Dogan Can Bakir 2023-04-11 20:42:39 +03:00 committed by GitHub
parent 709f26b69e
commit 3623bdb31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,7 @@ def create_openapi_agent(
requests_wrapper: RequestsWrapper,
llm: BaseLanguageModel,
shared_memory: Optional[ReadOnlySharedMemory] = None,
verbose: bool = True,
) -> AgentExecutor:
"""Instantiate API planner and controller for a given spec.
@ -213,4 +214,4 @@ def create_openapi_agent(
llm_chain=LLMChain(llm=llm, prompt=prompt, memory=shared_memory),
allowed_tools=[tool.name for tool in tools],
)
return AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True)
return AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=verbose)