LangChain Python

learn LangChain (python)


  • Agents - use an LLM to determine which actions to take and in what order. An action can either be using a tool and observing its output, or returning to the user.

the llm is used to select the tool to use

langchain/agents/ - _call method has main logic langchain/agents/ langchain/agents/mrkl/ langchain/agents/**/* - these contain all the prompts for different agents


pipenv shell
export OPENAI_API_KEY=...
export SERPAPI_API_KEY=...
jupyter lab
# visit `main.ipynb`