InvalidRequestError with langchain agent with retrieval tool

Hi,
I am trying to build a retriever agent using langchain mainly following their tutorial (Agent with retrieval tool). I have used both the high-level api and built from components. At the very last line , when I call the agent, it gives me this error: InvalidRequestError: ‘protocol details’ does not match ‘[1]{1,64}$’ - ‘functions.0.name’

The last part of code looks like this:
from langchain.agents import AgentExecutor
agent_executor = AgentExecutor(
**agent=agent, **
**tools=tools, **
**memory=memory, **
**verbose=True, **
return_intermediate_steps=True)

result = agent_executor({“input”: “Hi, I’m Bob”})

Can’t find anything on the internet resembling this message. Any help would be appreciated.
*
openai ver. 0.28.1
langchaine 0.0.332
python 3.10 and 3.11 tested
openai models 3.5 turbo and 4
*


  1. a-zA-Z0-9_- ↩︎