langchain
langchain copied to clipboard
How to override prompt for JSON Agent
How can I override the prompt used in JSON Agent (https://github.com/hwchase17/langchain/blob/master/langchain/agents/agent_toolkits/json/prompt.py)
Also, how can I print/log what information/text is being sent on every execution?
When you call create_json_agent()
there are parameters you can pass in for the prefix and suffix.
my_prefix = "prefix here"
my_suffix = "suffix here"
agent = create_json_agent(
llm=llm,
prefix=my_prefix,
suffix=my_suffix,
verbose=True # verbose will print more detailed output
)
There are also verbosity settings you can set on your model, including different options for different chain types.