Langchain JSON agent (create_json_agent)

I have used JSON agent (langchain.agents) to answer some questions about my JSON file but while creating the json agent with llama-2 LLM , I got the given below Errors.

  1. Does langchain json agent able to support any LLM or only with OpenAI LLm(GPT)?
  2. Why is there formatting exception error.

json_agent_executor = create_json_agent(
llm=llm, toolkit=json_toolkit, verbose=True
)

Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
File “/opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py”, line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “/tmp/ipykernel_34/2881189423.py”, line 4, in
json_agent_executor = create_json_agent(
File “/opt/conda/lib/python3.10/site-packages/langchain/agents/agent_toolkits/json/base.py”, line 42, in create_json_agent
File “/opt/conda/lib/python3.10/site-packages/langchain/agents/agent.py”, line 768, in from_agent_and_tools
:meta private:
File “/opt/conda/lib/python3.10/site-packages/langchain/load/serializable.py”, line 75, in init
File “pydantic/main.py”, line 339, in pydantic.main.BaseModel.init
File “pydantic/main.py”, line 1100, in pydantic.main.validate_model
File “/opt/conda/lib/python3.10/site-packages/langchain/agents/agent.py”, line 779, in validate_tools
" Did not find it, so adding it at the end."
KeyError: ‘tools’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py”, line 2144, in showtraceback
stb = self.InteractiveTB.structured_traceback(
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 1435, in structured_traceback
return FormattedTB.structured_traceback(
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 1326, in structured_traceback
return VerboseTB.structured_traceback(
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 1173, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 1088, in format_exception_as_a_whole
frames.append(self.format_record(record))
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 970, in format_record
frame_info.lines, Colors, self.has_colors, lvals
File “/opt/conda/lib/python3.10/site-packages/IPython/core/ultratb.py”, line 792, in lines
return self._sd.lines
File “/opt/conda/lib/python3.10/site-packages/stack_data/utils.py”, line 145, in cached_property_wrapper
value = obj.dict[self.func.name] = self.func(obj)
File “/opt/conda/lib/python3.10/site-packages/stack_data/core.py”, line 734, in lines
pieces = self.included_pieces
File “/opt/conda/lib/python3.10/site-packages/stack_data/utils.py”, line 145, in cached_property_wrapper
value = obj.dict[self.func.name] = self.func(obj)
File “/opt/conda/lib/python3.10/site-packages/stack_data/core.py”, line 681, in included_pieces
pos = scope_pieces.index(self.executing_piece)
File “/opt/conda/lib/python3.10/site-packages/stack_data/utils.py”, line 145, in cached_property_wrapper
value = obj.dict[self.func.name] = self.func(obj)
File “/opt/conda/lib/python3.10/site-packages/stack_data/core.py”, line 660, in executing_piece
return only(
File “/opt/conda/lib/python3.10/site-packages/executing/executing.py”, line 116, in only
raise NotOneValueFound(‘Expected one value, found 0’)
executing.executing.NotOneValueFound: Expected one value, found 0