commit 9b86eb0eeb54231a25ec93cdfdc68e2134feb2d9 Author: Eugene Yurtsev Date: Tue Apr 8 13:37:03 2025 -0400 x diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..e69de29 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..0d44bfb --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +TAVILY_API_KEY=... + +# To separate your traces from other application +LANGSMITH_PROJECT=react-agent + +# The following depend on your selected configuration + +## LLM choice: +ANTHROPIC_API_KEY=.... +FIREWORKS_API_KEY=... +OPENAI_API_KEY=... diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000..f09af43 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,44 @@ +# This workflow will run integration tests for the current project once per day + +name: Integration Tests + +on: + schedule: + - cron: "37 14 * * *" # Run at 7:37 AM Pacific Time (14:37 UTC) every day + workflow_dispatch: # Allows triggering the workflow manually in GitHub UI + +# If another scheduled run starts while this workflow is still running, +# cancel the earlier run in favor of the next run. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + integration-tests: + name: Integration Tests + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.11", "3.12"] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + uv pip install -r pyproject.toml + uv pip install -U pytest-asyncio vcrpy + - name: Run integration tests + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} + LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }} + LANGSMITH_TRACING: true + LANGSMITH_TEST_CACHE: tests/cassettes + run: | + uv run pytest tests/integration_tests diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..055407c --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,57 @@ +# This workflow will run unit tests for the current project + +name: CI + +on: + push: + branches: ["main"] + pull_request: + workflow_dispatch: # Allows triggering the workflow manually in GitHub UI + +# If another push to the same PR or branch happens while this workflow is still running, +# cancel the earlier run in favor of the next run. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + unit-tests: + name: Unit Tests + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.11", "3.12"] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + uv pip install -r pyproject.toml + - name: Lint with ruff + run: | + uv pip install ruff + uv run ruff check . + - name: Lint with mypy + run: | + uv pip install mypy + uv run mypy --strict src/ + - name: Check README spelling + uses: codespell-project/actions-codespell@v2 + with: + ignore_words_file: .codespellignore + path: README.md + - name: Check code spelling + uses: codespell-project/actions-codespell@v2 + with: + ignore_words_file: .codespellignore + path: src/ + - name: Run tests with pytest + run: | + uv pip install pytest + uv run pytest tests/unit_tests diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4d0cd22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,165 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +uv.lock + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +.langgraph_api diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..57d0481 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 LangChain + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e629494 --- /dev/null +++ b/Makefile @@ -0,0 +1,64 @@ +.PHONY: all format lint test tests test_watch integration_tests docker_tests help extended_tests + +# Default target executed when no arguments are given to make. +all: help + +# Define a variable for the test file path. +TEST_FILE ?= tests/unit_tests/ + +test: + python -m pytest $(TEST_FILE) + +test_watch: + python -m ptw --snapshot-update --now . -- -vv tests/unit_tests + +test_profile: + python -m pytest -vv tests/unit_tests/ --profile-svg + +extended_tests: + python -m pytest --only-extended $(TEST_FILE) + + +###################### +# LINTING AND FORMATTING +###################### + +# Define a variable for Python and notebook files. +PYTHON_FILES=src/ +MYPY_CACHE=.mypy_cache +lint format: PYTHON_FILES=. +lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d main | grep -E '\.py$$|\.ipynb$$') +lint_package: PYTHON_FILES=src +lint_tests: PYTHON_FILES=tests +lint_tests: MYPY_CACHE=.mypy_cache_test + +lint lint_diff lint_package lint_tests: + python -m ruff check . + [ "$(PYTHON_FILES)" = "" ] || python -m ruff format $(PYTHON_FILES) --diff + [ "$(PYTHON_FILES)" = "" ] || python -m ruff check --select I $(PYTHON_FILES) + [ "$(PYTHON_FILES)" = "" ] || python -m mypy --strict $(PYTHON_FILES) + [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && python -m mypy --strict $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) + +format format_diff: + ruff format $(PYTHON_FILES) + ruff check --select I --fix $(PYTHON_FILES) + +spell_check: + codespell --toml pyproject.toml + +spell_fix: + codespell --toml pyproject.toml -w + +###################### +# HELP +###################### + +help: + @echo '----' + @echo 'format - run code formatters' + @echo 'lint - run linters' + @echo 'test - run unit tests' + @echo 'tests - run unit tests' + @echo 'test TEST_FILE= - run all tests in file' + @echo 'test_watch - run unit tests in watch mode' + diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad089ae --- /dev/null +++ b/README.md @@ -0,0 +1,241 @@ +# LangGraph ReAct Agent Template + +[![CI](https://github.com/langchain-ai/react-agent/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/langchain-ai/react-agent/actions/workflows/unit-tests.yml) +[![Integration Tests](https://github.com/langchain-ai/react-agent/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/langchain-ai/react-agent/actions/workflows/integration-tests.yml) +[![Open in - LangGraph Studio](https://img.shields.io/badge/Open_in-LangGraph_Studio-00324d.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NS4zMzMiIGhlaWdodD0iODUuMzMzIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZD0iTTEzIDcuOGMtNi4zIDMuMS03LjEgNi4zLTYuOCAyNS43LjQgMjQuNi4zIDI0LjUgMjUuOSAyNC41QzU3LjUgNTggNTggNTcuNSA1OCAzMi4zIDU4IDcuMyA1Ni43IDYgMzIgNmMtMTIuOCAwLTE2LjEuMy0xOSAxLjhtMzcuNiAxNi42YzIuOCAyLjggMy40IDQuMiAzLjQgNy42cy0uNiA0LjgtMy40IDcuNkw0Ny4yIDQzSDE2LjhsLTMuNC0zLjRjLTQuOC00LjgtNC44LTEwLjQgMC0xNS4ybDMuNC0zLjRoMzAuNHoiLz48cGF0aCBkPSJNMTguOSAyNS42Yy0xLjEgMS4zLTEgMS43LjQgMi41LjkuNiAxLjcgMS44IDEuNyAyLjcgMCAxIC43IDIuOCAxLjYgNC4xIDEuNCAxLjkgMS40IDIuNS4zIDMuMi0xIC42LS42LjkgMS40LjkgMS41IDAgMi43LS41IDIuNy0xIDAtLjYgMS4xLS44IDIuNi0uNGwyLjYuNy0xLjgtMi45Yy01LjktOS4zLTkuNC0xMi4zLTExLjUtOS44TTM5IDI2YzAgMS4xLS45IDIuNS0yIDMuMi0yLjQgMS41LTIuNiAzLjQtLjUgNC4yLjguMyAyIDEuNyAyLjUgMy4xLjYgMS41IDEuNCAyLjMgMiAyIDEuNS0uOSAxLjItMy41LS40LTMuNS0yLjEgMC0yLjgtMi44LS44LTMuMyAxLjYtLjQgMS42LS41IDAtLjYtMS4xLS4xLTEuNS0uNi0xLjItMS42LjctMS43IDMuMy0yLjEgMy41LS41LjEuNS4yIDEuNi4zIDIuMiAwIC43LjkgMS40IDEuOSAxLjYgMi4xLjQgMi4zLTIuMy4yLTMuMi0uOC0uMy0yLTEuNy0yLjUtMy4xLTEuMS0zLTMtMy4zLTMtLjUiLz48L3N2Zz4=)](https://langgraph-studio.vercel.app/templates/open?githubUrl=https://github.com/langchain-ai/react-agent) + +This template showcases a [ReAct agent](https://arxiv.org/abs/2210.03629) implemented using [LangGraph](https://github.com/langchain-ai/langgraph), designed for [LangGraph Studio](https://github.com/langchain-ai/langgraph-studio). ReAct agents are uncomplicated, prototypical agents that can be flexibly extended to many tools. + +![Graph view in LangGraph studio UI](./static/studio_ui.png) + +The core logic, defined in `src/react_agent/graph.py`, demonstrates a flexible ReAct agent that iteratively reasons about user queries and executes actions, showcasing the power of this approach for complex problem-solving tasks. + +## What it does + +The ReAct agent: + +1. Takes a user **query** as input +2. Reasons about the query and decides on an action +3. Executes the chosen action using available tools +4. Observes the result of the action +5. Repeats steps 2-4 until it can provide a final answer + +By default, it's set up with a basic set of tools, but can be easily extended with custom tools to suit various use cases. + +## Getting Started + +Assuming you have already [installed LangGraph Studio](https://github.com/langchain-ai/langgraph-studio?tab=readme-ov-file#download), to set up: + +1. Create a `.env` file. + +```bash +cp .env.example .env +``` + +2. Define required API keys in your `.env` file. + +The primary [search tool](./src/react_agent/tools.py) [^1] used is [Tavily](https://tavily.com/). Create an API key [here](https://app.tavily.com/sign-in). + + + +### Setup Model + +The defaults values for `model` are shown below: + +```yaml +model: anthropic/claude-3-5-sonnet-20240620 +``` + +Follow the instructions below to get set up, or pick one of the additional options. + +#### Anthropic + +To use Anthropic's chat models: + +1. Sign up for an [Anthropic API key](https://console.anthropic.com/) if you haven't already. +2. Once you have your API key, add it to your `.env` file: + +``` +ANTHROPIC_API_KEY=your-api-key +``` +#### OpenAI + +To use OpenAI's chat models: + +1. Sign up for an [OpenAI API key](https://platform.openai.com/signup). +2. Once you have your API key, add it to your `.env` file: +``` +OPENAI_API_KEY=your-api-key +``` + + + + + + + + +3. Customize whatever you'd like in the code. +4. Open the folder LangGraph Studio! + +## How to customize + +1. **Add new tools**: Extend the agent's capabilities by adding new tools in [tools.py](./src/react_agent/tools.py). These can be any Python functions that perform specific tasks. +2. **Select a different model**: We default to Anthropic's Claude 3 Sonnet. You can select a compatible chat model using `provider/model-name` via configuration. Example: `openai/gpt-4-turbo-preview`. +3. **Customize the prompt**: We provide a default system prompt in [prompts.py](./src/react_agent/prompts.py). You can easily update this via configuration in the studio. + +You can also quickly extend this template by: + +- Modifying the agent's reasoning process in [graph.py](./src/react_agent/graph.py). +- Adjusting the ReAct loop or adding additional steps to the agent's decision-making process. + +## Development + +While iterating on your graph, you can edit past state and rerun your app from past states to debug specific nodes. Local changes will be automatically applied via hot reload. Try adding an interrupt before the agent calls tools, updating the default system message in `src/react_agent/configuration.py` to take on a persona, or adding additional nodes and edges! + +Follow up requests will be appended to the same thread. You can create an entirely new thread, clearing previous history, using the `+` button in the top right. + +You can find the latest (under construction) docs on [LangGraph](https://github.com/langchain-ai/langgraph) here, including examples and other references. Using those guides can help you pick the right patterns to adapt here for your use case. + +LangGraph Studio also integrates with [LangSmith](https://smith.langchain.com/) for more in-depth tracing and collaboration with teammates. + +[^1]: https://python.langchain.com/docs/concepts/#tools + + \ No newline at end of file diff --git a/langgraph.json b/langgraph.json new file mode 100644 index 0000000..0775511 --- /dev/null +++ b/langgraph.json @@ -0,0 +1,10 @@ +{ + "dependencies": ["."], + "graphs": { + "agent": "./src/react_agent/graph.py:graph" + }, + "http": { + "disable_mcp": false + }, + "env": ".env" +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d23884b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,67 @@ +[project] +name = "react-agent" +version = "0.0.1" +description = "Starter template for making a custom Reasoning and Action agent (using tool calling) in LangGraph." +authors = [ + { name = "William Fu-Hinthorn", email = "13333726+hinthornw@users.noreply.github.com" }, +] +readme = "README.md" +license = { text = "MIT" } +requires-python = ">=3.11,<4.0" +dependencies = [ + "langgraph>=0.2.6", + "langchain-openai>=0.1.22", + "langchain-anthropic>=0.1.23", + "langchain>=0.2.14", + "langchain-fireworks>=0.1.7", + "python-dotenv>=1.0.1", + "langchain-community>=0.2.17", + "tavily-python>=0.4.0", +] + + +[project.optional-dependencies] +dev = ["mypy>=1.11.1", "ruff>=0.6.1"] + +[build-system] +requires = ["setuptools>=73.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["langgraph.templates.react_agent", "react_agent"] +[tool.setuptools.package-dir] +"langgraph.templates.react_agent" = "src/react_agent" +"react_agent" = "src/react_agent" + + +[tool.setuptools.package-data] +"*" = ["py.typed"] + +[tool.ruff] +lint.select = [ + "E", # pycodestyle + "F", # pyflakes + "I", # isort + "D", # pydocstyle + "D401", # First line should be in imperative mood + "T201", + "UP", +] +lint.ignore = [ + "UP006", + "UP007", + # We actually do want to import from typing_extensions + "UP035", + # Relax the convention by _not_ requiring documentation for every function parameter. + "D417", + "E501", +] +[tool.ruff.lint.per-file-ignores] +"tests/*" = ["D", "UP"] +[tool.ruff.lint.pydocstyle] +convention = "google" + +[dependency-groups] +dev = [ + "langgraph-cli[inmem]>=0.1.71", +] diff --git a/src/react_agent/__init__.py b/src/react_agent/__init__.py new file mode 100644 index 0000000..8123c94 --- /dev/null +++ b/src/react_agent/__init__.py @@ -0,0 +1,9 @@ +"""React Agent. + +This module defines a custom reasoning and action agent graph. +It invokes tools in a simple loop. +""" + +from react_agent.graph import graph + +__all__ = ["graph"] diff --git a/src/react_agent/configuration.py b/src/react_agent/configuration.py new file mode 100644 index 0000000..6848ed3 --- /dev/null +++ b/src/react_agent/configuration.py @@ -0,0 +1,48 @@ +"""Define the configurable parameters for the agent.""" + +from __future__ import annotations + +from dataclasses import dataclass, field, fields +from typing import Annotated, Optional + +from langchain_core.runnables import RunnableConfig, ensure_config + +from react_agent import prompts + + +@dataclass(kw_only=True) +class Configuration: + """The configuration for the agent.""" + + system_prompt: str = field( + default=prompts.SYSTEM_PROMPT, + metadata={ + "description": "The system prompt to use for the agent's interactions. " + "This prompt sets the context and behavior for the agent." + }, + ) + + model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field( + default="anthropic/claude-3-5-sonnet-20240620", + metadata={ + "description": "The name of the language model to use for the agent's main interactions. " + "Should be in the form: provider/model-name." + }, + ) + + max_search_results: int = field( + default=10, + metadata={ + "description": "The maximum number of search results to return for each search query." + }, + ) + + @classmethod + def from_runnable_config( + cls, config: Optional[RunnableConfig] = None + ) -> Configuration: + """Create a Configuration instance from a RunnableConfig object.""" + config = ensure_config(config) + configurable = config.get("configurable") or {} + _fields = {f.name for f in fields(cls) if f.init} + return cls(**{k: v for k, v in configurable.items() if k in _fields}) diff --git a/src/react_agent/graph.py b/src/react_agent/graph.py new file mode 100644 index 0000000..94b5531 --- /dev/null +++ b/src/react_agent/graph.py @@ -0,0 +1,123 @@ +"""Define a custom Reasoning and Action agent. + +Works with a chat model with tool calling support. +""" + +from datetime import datetime, timezone +from typing import Dict, List, Literal, cast + +from langchain_core.messages import AIMessage +from langchain_core.runnables import RunnableConfig +from langgraph.graph import StateGraph +from langgraph.prebuilt import ToolNode + +from react_agent.configuration import Configuration +from react_agent.state import InputState, State +from react_agent.tools import TOOLS +from react_agent.utils import load_chat_model + +# Define the function that calls the model + + +async def call_model( + state: State, config: RunnableConfig +) -> Dict[str, List[AIMessage]]: + """Call the LLM powering our "agent". + + This function prepares the prompt, initializes the model, and processes the response. + + Args: + state (State): The current state of the conversation. + config (RunnableConfig): Configuration for the model run. + + Returns: + dict: A dictionary containing the model's response message. + """ + configuration = Configuration.from_runnable_config(config) + + # Initialize the model with tool binding. Change the model or add more tools here. + model = load_chat_model(configuration.model).bind_tools(TOOLS) + + # Format the system prompt. Customize this to change the agent's behavior. + system_message = configuration.system_prompt.format( + system_time=datetime.now(tz=timezone.utc).isoformat() + ) + + # Get the model's response + response = cast( + AIMessage, + await model.ainvoke( + [{"role": "system", "content": system_message}, *state.messages], config + ), + ) + + # Handle the case when it's the last step and the model still wants to use a tool + if state.is_last_step and response.tool_calls: + return { + "messages": [ + AIMessage( + id=response.id, + content="Sorry, I could not find an answer to your question in the specified number of steps.", + ) + ] + } + + # Return the model's response as a list to be added to existing messages + return {"messages": [response]} + + +# Define a new graph + +builder = StateGraph(State, input=InputState, config_schema=Configuration) + +# Define the two nodes we will cycle between +builder.add_node(call_model) +builder.add_node("tools", ToolNode(TOOLS)) + +# Set the entrypoint as `call_model` +# This means that this node is the first one called +builder.add_edge("__start__", "call_model") + + +def route_model_output(state: State) -> Literal["__end__", "tools"]: + """Determine the next node based on the model's output. + + This function checks if the model's last message contains tool calls. + + Args: + state (State): The current state of the conversation. + + Returns: + str: The name of the next node to call ("__end__" or "tools"). + """ + last_message = state.messages[-1] + if not isinstance(last_message, AIMessage): + raise ValueError( + f"Expected AIMessage in output edges, but got {type(last_message).__name__}" + ) + # If there is no tool call, then we finish + if not last_message.tool_calls: + return "__end__" + # Otherwise we execute the requested actions + return "tools" + + +# Add a conditional edge to determine the next step after `call_model` +builder.add_conditional_edges( + "call_model", + # After call_model finishes running, the next node(s) are scheduled + # based on the output from route_model_output + route_model_output, +) + +# Add a normal edge from `tools` to `call_model` +# This creates a cycle: after using tools, we always return to the model +builder.add_edge("tools", "call_model") + +# Compile the builder into an executable graph +# You can customize this by adding interrupt points for state updates +graph = builder.compile( + interrupt_before=[], # Add node names here to update state before they're called + interrupt_after=[], # Add node names here to update state after they're called +) +graph.name = "ReAct Agent" # This customizes the name in LangSmith diff --git a/src/react_agent/prompts.py b/src/react_agent/prompts.py new file mode 100644 index 0000000..b7d8d46 --- /dev/null +++ b/src/react_agent/prompts.py @@ -0,0 +1,5 @@ +"""Default prompts used by the agent.""" + +SYSTEM_PROMPT = """You are a helpful AI assistant. + +System time: {system_time}""" diff --git a/src/react_agent/state.py b/src/react_agent/state.py new file mode 100644 index 0000000..703bcf9 --- /dev/null +++ b/src/react_agent/state.py @@ -0,0 +1,60 @@ +"""Define the state structures for the agent.""" + +from __future__ import annotations + +from dataclasses import dataclass, field +from typing import Sequence + +from langchain_core.messages import AnyMessage +from langgraph.graph import add_messages +from langgraph.managed import IsLastStep +from typing_extensions import Annotated + + +@dataclass +class InputState: + """Defines the input state for the agent, representing a narrower interface to the outside world. + + This class is used to define the initial state and structure of incoming data. + """ + + messages: Annotated[Sequence[AnyMessage], add_messages] = field( + default_factory=list + ) + """ + Messages tracking the primary execution state of the agent. + + Typically accumulates a pattern of: + 1. HumanMessage - user input + 2. AIMessage with .tool_calls - agent picking tool(s) to use to collect information + 3. ToolMessage(s) - the responses (or errors) from the executed tools + 4. AIMessage without .tool_calls - agent responding in unstructured format to the user + 5. HumanMessage - user responds with the next conversational turn + + Steps 2-5 may repeat as needed. + + The `add_messages` annotation ensures that new messages are merged with existing ones, + updating by ID to maintain an "append-only" state unless a message with the same ID is provided. + """ + + +@dataclass +class State(InputState): + """Represents the complete state of the agent, extending InputState with additional attributes. + + This class can be used to store any information needed throughout the agent's lifecycle. + """ + + is_last_step: IsLastStep = field(default=False) + """ + Indicates whether the current step is the last one before the graph raises an error. + + This is a 'managed' variable, controlled by the state machine rather than user code. + It is set to 'True' when the step count reaches recursion_limit - 1. + """ + + # Additional attributes can be added here as needed. + # Common examples include: + # retrieved_documents: List[Document] = field(default_factory=list) + # extracted_entities: Dict[str, Any] = field(default_factory=dict) + # api_connections: Dict[str, Any] = field(default_factory=dict) diff --git a/src/react_agent/tools.py b/src/react_agent/tools.py new file mode 100644 index 0000000..95fa8e0 --- /dev/null +++ b/src/react_agent/tools.py @@ -0,0 +1,34 @@ +"""This module provides example tools for web scraping and search functionality. + +It includes a basic Tavily search function (as an example) + +These tools are intended as free examples to get started. For production use, +consider implementing more robust and specialized tools tailored to your needs. +""" + +from typing import Any, Callable, List, Optional, cast + +from langchain_community.tools.tavily_search import TavilySearchResults +from langchain_core.runnables import RunnableConfig +from langchain_core.tools import InjectedToolArg +from typing_extensions import Annotated + +from react_agent.configuration import Configuration + + +async def search( + query: str, *, config: Annotated[RunnableConfig, InjectedToolArg] +) -> Optional[list[dict[str, Any]]]: + """Search for general web results. + + This function performs a search using the Tavily search engine, which is designed + to provide comprehensive, accurate, and trusted results. It's particularly useful + for answering questions about current events. + """ + configuration = Configuration.from_runnable_config(config) + wrapped = TavilySearchResults(max_results=configuration.max_search_results) + result = await wrapped.ainvoke({"query": query}) + return cast(list[dict[str, Any]], result) + + +TOOLS: List[Callable[..., Any]] = [search] diff --git a/src/react_agent/utils.py b/src/react_agent/utils.py new file mode 100644 index 0000000..d17b53f --- /dev/null +++ b/src/react_agent/utils.py @@ -0,0 +1,27 @@ +"""Utility & helper functions.""" + +from langchain.chat_models import init_chat_model +from langchain_core.language_models import BaseChatModel +from langchain_core.messages import BaseMessage + + +def get_message_text(msg: BaseMessage) -> str: + """Get the text content of a message.""" + content = msg.content + if isinstance(content, str): + return content + elif isinstance(content, dict): + return content.get("text", "") + else: + txts = [c if isinstance(c, str) else (c.get("text") or "") for c in content] + return "".join(txts).strip() + + +def load_chat_model(fully_specified_name: str) -> BaseChatModel: + """Load a chat model from a fully specified name. + + Args: + fully_specified_name (str): String in the format 'provider/model'. + """ + provider, model = fully_specified_name.split("/", maxsplit=1) + return init_chat_model(model, model_provider=provider) diff --git a/static/studio_ui.png b/static/studio_ui.png new file mode 100644 index 0000000..808d3c8 Binary files /dev/null and b/static/studio_ui.png differ diff --git a/tests/cassettes/103fe67e-a040-4e4e-aadb-b20a7057f904.yaml b/tests/cassettes/103fe67e-a040-4e4e-aadb-b20a7057f904.yaml new file mode 100644 index 0000000..1d80331 --- /dev/null +++ b/tests/cassettes/103fe67e-a040-4e4e-aadb-b20a7057f904.yaml @@ -0,0 +1,2053 @@ +interactions: +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:50:53.832822+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA2yRS0vEQAzHv0rIxctUuqurOEdXXRQPooIvpIzb9KFtsjuTUevS7y6tiAqeQh6/ + /PPYYJ2jxTaUWTrZf32Wp9Jf3h2+Fa/z+4/F1dFiskCD2q1oqKIQXElo0EszBFwIdVDHigZbyalB + i8vGxZySnWSWBGEmTabpdDfdm6ZocCmsxIr2YfPdVOl9wEdj8VrAcXgjD51ED+tIQWthcE8SFbQi + KCRyTh6kgHPH5bxyNRs43WoaYKIcVCCQ88sKCvEj0UpQiKtEJcmdEtRciG/d0HcbzkmhJcgFtHI6 + Mp3EbezNz4QiTRbDsPd4rMGPWTo5XB/NbiYXz2fkZrfHxye+q9pFiQbZtQP3NcZA8Soq2g2uI/kO + Lf63A/b9o8Ggsso8uSD8V3lMBFpH4iWh5dg0BuP4Drv5UshUXogD2t2dPYMS9XfsYNr3nwAAAP// + AwCzkxon7QEAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ab88f99c4cb1-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:51:31 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:51:29Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:51:31Z' + request-id: + - req_019JrRXeYjgQXtSjyp85fdHe + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: null + headers: {} + method: POST + uri: https://api.tavily.com/search + response: + body: + string: '{"query":"founder of LangChain","follow_up_questions":null,"answer":null,"images":[],"results":[{"title":"Speaker + Harrison Chase - ELC","url":"https://sfelc.com/speaker/harrison-chase","content":"Harrison + Chase is the CEO and co-founder of LangChain, a company formed around the + open source Python/Typescript packages that aim to make it easy to develop + Language Model applications. Prior to starting LangChain, he led the ML team + at Robust Intelligence (an MLOps company focused on testing and validation + of machine learning models), led the","score":0.99967754,"raw_content":null},{"title":"Harrison + Chase - The AI Conference","url":"https://aiconference.com/speakers/harrison-chase/","content":"Harrison + Chase is the co-founder and CEO of LangChain, a company formed around the + open-source Python/Typescript packages that aim to make it easy to develop + Language Model applications. Prior to starting LangChain, he led the ML team + at Robust Intelligence (an MLOps company focused on testing and validation + of machine learning models), led the","score":0.9995908,"raw_content":null},{"title":"Harrison + Chase | TEDAI San Francisco","url":"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/","content":"Harrison + Chase, a Harvard graduate in statistics and computer science, co-founded LangChain + to streamline the development of Language Model applications with open-source + Python/Typescript packages. Chase''s experience includes heading the Machine + Learning team at Robust Intelligence, focusing on the testing and validation + of machine learning models, and leading the entity linking team at Kensho","score":0.9994746,"raw_content":null},{"title":"Harrison + Chase, Author at TechCrunch","url":"https://techcrunch.com/author/harrison-chase/","content":"Harrison + Chase is the CEO and co-founder of LangChain, a company formed around the + open source Python/Typescript packages that aim to make it easy to develop + Language Model applications","score":0.9994185,"raw_content":null},{"title":"LangChain''s + Harrison Chase on Building the Orchestration Layer for AI ...","url":"https://www.sequoiacap.com/podcast/training-data-harrison-chase/","content":"Sonya + Huang: Hi, and welcome to training data. We have with us today Harrison Chase, + founder and CEO of LangChain. Harrison is a legend in the agent ecosystem, + as the product visionary who first connected LLMs with tools and actions. + And LangChain is the most popular agent building framework in the AI space.","score":0.99876,"raw_content":null},{"title":"Harrison + Chase, LangChain CEO - Interview - YouTube","url":"https://www.youtube.com/watch?v=7D8bw_4hTdo","content":"Join + us for an insightful interview with Harrison Chase, the CEO and co-founder + of Langchain, as he provides a comprehensive overview of Langchain''s innovati","score":0.99854493,"raw_content":null},{"title":"Harrison + Chase - Forbes","url":"https://www.forbes.com/profile/harrison-chase/","content":"Harrison + Chase only cofounded LangChain in late 2022, but the company caught instant + attention for enabling anyone to build apps powered by large language models + like GPT-4 in as little as two","score":0.9977743,"raw_content":null},{"title":"LangChain + - Wikipedia","url":"https://en.wikipedia.org/wiki/LangChain","content":"In + October 2023 LangChain introduced LangServe, a deployment tool designed to + facilitate the transition from LCEL (LangChain Expression Language) prototypes + to production-ready applications.[5]\nIntegrations[edit]\nAs of March 2023, + LangChain included integrations with systems including Amazon, Google, and + Microsoft Azure cloud storage; API wrappers for news, movie information, and + weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot + learning prompt generation support; finding and summarizing \"todo\" tasks + in code; Google Drive documents, spreadsheets, and presentations summarization, + extraction, and creation; Google Search and Microsoft Bing web search; OpenAI, + Anthropic, and Hugging Face language models; iFixit repair guides and wikis + search and summarization; MapReduce for question answering, combining documents, + and question generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and + pymupdf for PDF file text extraction and manipulation; Python and JavaScript + code generation, analysis, and debugging; Milvus vector database[6] to store + and retrieve vector embeddings; Weaviate vector database[7] to cache embedding + and data objects; Redis cache database storage; Python RequestsWrapper and + other methods for API requests; SQL and NoSQL databases including JSON support; + Streamlit, including for logging; text mapping for k-nearest neighbors search; + time zone conversion and calendar operations; tracing and recording stack + symbols in threaded and asynchronous subprocess runs; and the Wolfram Alpha + website and SDK.[8] As a language model integration framework, LangChain''s + use-cases largely overlap with those of language models in general, including + document analysis and summarization, chatbots, and code analysis.[2]\nHistory[edit]\nLangChain + was launched in October 2022 as an open source project by Harrison Chase, + while working at machine learning startup Robust Intelligence. In April 2023, + LangChain had incorporated and the new startup raised over $20 million in + funding at a valuation of at least $200 million from venture firm Sequoia + Capital, a week after announcing a $10 million seed investment from Benchmark.[3][4]\n + The project quickly garnered popularity, with improvements from hundreds of + contributors on GitHub, trending discussions on Twitter, lively activity on + the project''s Discord server, many YouTube tutorials, and meetups in San + Francisco and London. As of April 2023, it can read from more than 50 document + types and data sources.[9]\nReferences[edit]\nExternal links[edit]","score":0.99694854,"raw_content":null},{"title":"Harrison + Chase - CEO of LangChain - Analytics India Magazine","url":"https://analyticsindiamag.com/people/harrison-chase/","content":"By + AIM The dynamic co-founder and CEO of LangChain, Harrison Chase is simplifying + the creation of applications powered by LLMs. With a background in statistics + and computer science from Harvard University, Chase has carved a niche in + the AI landscape. AIM Brand Solutions, a marketing division within AIM, specializes + in creating diverse content such as documentaries, public artworks, podcasts, + videos, articles, and more to effectively tell compelling stories. AIM Research + produces a series of annual reports on AI & Data Science covering every aspect + of the industry. Discover how Cypher 2024 expands to the USA, bridging AI + innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms","score":0.99491996,"raw_content":null},{"title":"Key + Insights from Harrison Chase''s Talk on Building Next-Level AI Agents","url":"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents","content":"Harrison + Chase, founder of LangChain, shared insights on the evolution of AI agents + and their applications during Sequoia Capital''s AI Ascent. ... Saves you + a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises","score":0.9941801,"raw_content":null}],"response_time":2.54}' + headers: + Connection: + - keep-alive + Content-Length: + - '7474' + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:51:34 GMT + Server: + - nginx + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + your question about the founder of LangChain, I''ll need to search for the most + up-to-date information. Let me do that for you.", "type": "text"}, {"type": + "tool_use", "name": "search", "input": {"query": "founder of LangChain"}, "id": + "toolu_01BqD5W1PjJea5XEEFryhmGg"}]}, {"role": "user", "content": [{"type": "tool_result", + "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", \"content\": + \"Harrison Chase is the CEO and co-founder of LangChain, a company formed around + the open source Python/Typescript packages that aim to make it easy to develop + Language Model applications. Prior to starting LangChain, he led the ML team + at Robust Intelligence (an MLOps company focused on testing and validation of + machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01BqD5W1PjJea5XEEFryhmGg", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:50:59.620569+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RUXW/cRgz8K8QiQF90wln+SHtvjlvERh2kqG2gaFMYvBUlbW7FlXe55wiG/3vB + 9Z0/EvRJgEQOZ4ZDPRjXmpUZU3+7PLg8/P1Kmq83H9PPza9Xf/2d+vPh5hdTGZkn0ipKCXsylYnB + 6wtMySVBFlOZMbTkzcpYj7mlxeHieJECM8miWTZHy5NmaSpjAwuxmNU/D3tQoW/aXh4rcz0gb2AO + GboQ9RnhLlMSF7iGC7DIwOEephi2rqVSeO9kAMddiCNqHeA6ZAEZCLqQuaUIoYNL5P5sQMf1F/7C + 1//zEVyCc4zRpcBwNmCiGj6FSJAmsq5zFr2fV4pwUH9XqK0604bFHhm5hbPfPv84vqnhfE+gfT2d + waMQNMumqeG6oI0T8gz3mCB0nbNOGYDHzHagVjs+WwlriqUJMAEyhIl4kUKOltSqr2SlzD2sd1wH + rYM12k0flYXiJEFxSZxNhbhOzkIRknXElqCLYVTNW4wt3LDbUkxO5gJ8VMMH6opRglEc9y+qKhgI + PLXFnU9oB8cEl4SRtUwIR0CBP8M6J4ELFvLe9TqxAnzW3wWbE7UQGETjwH0huUXv2qethw7GHbjf + g5dMpsLwuH7l8112duNn6NExtTCFKXuMTmb1QWmeXujkMbOTuSqT1jOcTtF5tfmw2m36iduALUR0 + Si+5nktMWKDL3Druyx5nSGRzVAFbivCuWcLovFfejveVagOqpPysCEXFJNGOl5ayiSu6y8EhnOHk + BH0FaQhR/AzYSckeh8y2wMK7g5fmRCU2W0oyktJUsA/EdhgxbopXJzXclACXsPyUlENLMQ1uql65 + qCFakw0jAe49hC7iSPchbsoBt7QlH6bCYpq8s0VZginck7qx1ijHnsAj9xl72q0MvNsQfPzjenFU + GP14ajZwcm0Bwbe2uz5HerXINKFmadJcWuXon9e8o1d8CB1ICP4p/M8q9KZRYMQNgRMgTI4iSIAi + sfx6vqdejieS3vHpxRvZtXn8tzJJwnQbCVNgszLE7a3kyGb3IdFd1vCbFWfvK5PLH3f1YBxPWW4l + bIiTWTXL98eVCVnevHx/8vj4HwAAAP//AwBvXpD30gUAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22abad2aef4caf-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:51:40 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:51:35Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:51:40Z' + request-id: + - req_012BB17DG6rpcEU1xAbh9Zao + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:51:11.433533+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SRTWvcQAyG/4rQpZdxcHY3XuJLCYX0a3tJCz2EYiYeeT2tLXktTRuz+L8Xe1vS + noQ+3lcP0hljwBJ7PVb59ef44Xtzc/+UBp8Oxce3t9vdcf+ADm0aaJkiVX8kdDhKtxS8alTzbOiw + l0Adllh3PgXKttlNpsJMlm3yzS4vNjk6rIWN2LB8PP81NXpe5Gso8YuAZ/1FI1gbFU6J1KIw+LpO + ozfqJgfvX3UdMFEAE1DyY91CI4uCoBc1SENmkgVvBJEbGXt/8XiSZHDwfHzT+sjgOUA0hUYSBxqv + 4EAGPUEQsNbb6jlJusLZvdCKdFXS5Qbr4ZY8Vfn13VTc3/XF/vT88PPdp9ooNBoEHbLvF90Fc1Hx + kAzLM54SjROW+LUViLrC/wEBaV4oX+M8f3OoJkM1klfh/ynWhtIpEdeEJaeuc5jWN5Xny7bK5Aex + YrnbFg4l2b+12/08/wYAAP//AwBjKTr0BQIAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22abf709c34cb4-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:51:49 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:51:47Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:51:49Z' + request-id: + - req_01QtVfENAkfspCf9KVLM7Emk + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "Who is the founder + of LangChain?"}, "id": "toolu_01Ay6FAm67qxRvHMctedfsdo"}]}, {"role": "user", + "content": [{"type": "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01Ay6FAm67qxRvHMctedfsdo", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:51:14.324904+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RVbW/bNhD+KwdiQDZA9lynaQd9a4IWyZBi6dq9AMsQnKmzxJoiFd7RrhD0vw9H + 2Z6XoZ8MUHfH5+3oJ+MaU5ue24fFi9uP169//u2PO/rzarndvXt9+/nt9t3GVEbGgbSKmLElU5kU + vR4gs2PBIKYyfWzIm9pYj7mh2fnsYsYxBJLZcrF8uXi1XJjK2BiEgpj6r6fDUKEv2l5+anOJTA3E + ANIRMGGyHSTi7IUruAGLAWwMa9dQED8CBt5RgjHmBI+ZWFwMgKuYpQxYxxwaShDXcIuhverQhfl9 + uA/XmJLjGOCqQyZw/O1y+BRhRdDHRDAkso6pgu7YY+Ps0Iahgau3vzxrv6ZEgImAY0+woRGG6ILw + HuYzJDrj2Fwr1BdzeKcXoHKrn9cfrz9pAxfAoxAsF8vlHD4VlP2AYYQdMqxj6qkBTNoHcaAw45iT + JbgbpYvhx0/jQB9tcoPAgHaDLTGgKz0CPW5caMEJELKjBBKhoS35OBQEGVuC95oFwGHwzhbcXFRf + zuES7aYtN9f/ao/KaoupgTZhkxX6zkkHCKtjuZJiQXEsznLRSUlloQRsHQVL5Y7zOdwl2rqYGejL + QKl8quGS1uogCyZRAke1ipmemuLme7SdCwS3hClomRD2SvvXuMoscBOEvHetzqwAj7quo82H4GoK + Q1sQbtG7yTgNRb8f7g/Dy8pM0rycw4fs7AbaFHfS1SduPuq5H6FFF6iBIQ7ZY3IyqiQK+s2N4uhz + cDLO4XKEN0NyXt0/r+Czwu5jkI4B16qWEwaPOdiu2id44tBhAwmd0mDXBrd2FoPAOofmwEfjs0Wf + pyjELSX4brlYQO+8d3FarYs53PQDWvlfVh1DQ2yTW2m/2n5vPLU0matQsKUgQDbyyEL9vdGwQucY + 9MHRKqtPit07mFp6ljmG729v3/MPU34kRj9FBe2UwhNZO2RYkdWljIHUH0XQR5aDxBOc2So7XxRY + J+xpF9OGT5TnAffJezWH3x2XJS18zxjaiH6CcrKcrCvDkgh7r3HQQfsN6pX+/vn4xiJVJxuI1hKz + W3kqOiHsnL5DCUNbCO2nUppEWGV2gZipILCJdNHe3MyGuKOkljzf1yPoM4aEg2sgOaYT8i40mSWN + wF3cWdTJ//X8jGFbNCkAtEvzXeD3Q0yCwU7SF6ekmx4YAlVZq4p2vhjtD5pMWzM9yCcK6AW0Xjt9 + C2Ruvv5dGZY4PCRCjsHUhkLzIDkFs//A9Jh1j00dsveVyeW/rX4yLgxZHiRuKLCpl4ufFpWJWU4P + zy8WX7/+AwAA//8DAHBCV3w8BwAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ac0918734cb2-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:51:56 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:51:49Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:51:56Z' + request-id: + - req_01BLNX4GjFRn5bwxxBo3hd3r + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:51:55.561440+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RRS2vbQBD+K8NcclkFxY6dZG+NIaTgXNxgU0oRa2lkCa9mJO1sY2P034vklrSn + YR7fg28uWBdosQmHLL3b0fHwbb85Plb1utsudt8X2+enFRrUc0vjFYXgDoQGe/HjwIVQB3WsaLCR + gjxazL2LBSXzZJEEYSZNZunsPl3OUjSYCyuxov1x+UuqdBrhU7H4LuA4fFAPWtUBukhBa2FweR57 + p+TPBr7eeA9MVIAKBHJ9XkEpI4KgkaAQ20QlKZwS1FxK37grx16iwtrxYVW5msFxAbUGKCVyQf0t + rEmhISgEtHI6cZ4l3uJgPt2K+CyGMYMpuLGPWXr3Rt1m177+enj5svp4OZVv283+tESD7JoRd7U5 + oriNivaCXaT+jBb/qIOUn9ZwGH4aDCpt1pMLwv8rT4tAXSTOCS1H7w3G6TX2clXIVI7EAe39fGlQ + ov47e5oPw28AAAD//wMAEu0ZMPkBAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ad0acd1032b3-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:52:33 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:52:31Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:52:33Z' + request-id: + - req_01GSwnbYyFo11udBwAygsuuc + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "founder of LangChain"}, + "id": "toolu_01MeqRWpHv7FACwFxfMVRbx6"}]}, {"role": "user", "content": [{"type": + "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01MeqRWpHv7FACwFxfMVRbx6", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:51:58.213993+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RU0W7cNhD8lQWfWkCnXs6Jg96bY7SIURtxE/epVxh71EraHLWUyeW5guF/L1Z3 + bmynfRJEcmdmZ4d8cNy4tRtyd7t8c/3b5erns7yKfHp18iXSr1+73zO7yuk0kp2inLEjV7kUgy1g + zpwVRV3lhthQcGvnA5aGFieLd4scRUgXq+Xq7fJ0tXSV81GURN36z4cnUKW/rXz+rN0HzNRAFNCe + IBMm30OiXILmCi7Ao8CY4p4bgikWuGftAb0vCZWApY1pQOUogNtYdEZpY5GGEsQWLlG68x5Z1hvZ + yM3/bAJn+IgpcY4C5z1mquEqJoI8kueWPYYwzQhv6lcHrdQ4fVw8IaM0cP7LpxcM9UZWNXx8om+e + cwsE62W1XK2qufiAN4woE9wV9rswQYcs1ACquWnttjEBawYWiXtU3hPgOKaIvgeNcHYBDe0pxHEg + 0XojJ/Uzznu0Qla2xiBgEd8begYUiCPJIseSPJn1X8mrifzkNW4pzTrhvudAr60w1PuYdiwdoALC + gL5nIQiESWw1KyYtI5ih1MDnuC1Z4UKUQuCOxFO9kbf1Ea83PbBFv+uS2WYqsqJyVvZ5tspsKkoJ + smcrhzbFwXTtMTXwh/CeUmad6o28q+E6cUzmzqzDBP1rSQW96TyYf3XUffmkWwkHa+k/BFfmhe+h + jb48JZnyDG4C9xi4OQQ0tt8bMt+hXFu0vk0HecimcsAdASsQ5sn+jwOdRRfsCK6s2sYe2M8clsUU + S9e/GOL1pH2Un26mkbJPPCqM6HfYUa7h5lnWzO9jzjJ3MgdfFDShnxvgwyU9u7CKoQjrNPdodYk8 + 8d4qy3Z+IBgDtEUa63Ieyp5ESyLwOLLaJqchQ+AdwRe6K5ERzo9bBvqBxPcDpt1szveXzkfJ3FCy + 2IJExW0gaLkzim9Cycc8ZaWhgtFG7kvAFKb59vR8iKsd9/Zw+WMkUkevPM7ww+XlVf7x8PxojOEQ + v4MxubJRvYgTIIxxNDJoEw408xjptnCYPTm7AOxINNfu8a/KZY3jbSLMUdzakTS3WpK440amu2Jh + c2spIVSuzK/y+sGxjEVvNe5Isluvlu9PKxeLvlh8f/L4+A8AAAD//wMAo1MaSPYFAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ad1b7c4d4cb1-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:52:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:52:33Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:52:39Z' + request-id: + - req_01E8yQY8oXhidTwTxeWKdjiW + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:52:42.318107+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SRXWvbUAyG/4rQzW6Oi5O2SeObQgspgzBW2tLBGObUVuJDbSk50mkSgv/7sLPR + 7Uro4331IJ0w1Fhgp5syn9w8r252+7iY3YfV9+nbkibd+8ccHdpxS8MUqfoNocMo7VDwqkHNs6HD + TmpqscCq9amm7DK7zlSYybJpPr3KZ9McHVbCRmxY/Dz9NTU6DPIxFPgs4Fn3FMGaoLBLpBaEwVdV + it6oPTr4+qVtgYlqMAElH6sG1jIoCDpRg7TNTLLaG0HgtcTOnz3eJBmsPG/uGx8YPNcQTGEtiWuK + F7Aig46gFrDG2+h5lHSBvfukFWnLpMMNxsMNeSrzyeQ1/rh7OsQFx2931/v54+HhZblEh+y7QXfG + HFS8TYbFCXeJ4hELfG0Ego7wf0BA1p+Ut9j3vxyqybaM5FX4f4qxobRLxBVhwaltHabxTcXpvK00 + eSdWLK4uZw4l2b+1xbzvfwMAAP//AwB9NM36BQIAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ae2f5dec4cb6-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:53:20 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:53:18Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:53:20Z' + request-id: + - req_01DsVqmPigsQsHqctV3yYFQ5 + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "Who is the founder + of LangChain?"}, "id": "toolu_011WrXBSxr9nrNB5w7QxGUFF"}]}, {"role": "user", + "content": [{"type": "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_011WrXBSxr9nrNB5w7QxGUFF", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:52:45.186170+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA2RV0W4bRwz8FWIRoC1wUhXZSdp7i402NuCgbpunNoVB7VF3jPZ210uuHNXIvxc8 + SbGcPgnYI4fDIYd6dNy51o3S3y1e3sa/7h/ecL6X128+XXU3//rxLJ27xukuk0WRCPbkGldSsAcU + YVGM6ho3po6Ca50PWDuanc1ezSTFSDpbLpbni9fLhWucT1Epqmv/fjyCKn229OmndRco1EGKoAOB + EBY/QCGpQaWBa/AYIZe05Y5glyo8sA6A3teCSsBxncqIyikCrlLVCWWdauyoQFrDDcb+ckCO7cf4 + MV5hKSwpwuWAQsDyLBxjB5e//PYsbQ5XVAiwEEgaCTa0g5w4qhzqfQNpGM9rvpzDZZodarTfxvvj + p5M04AjBulsulsu5YSzncIF+0xcLbZ/Yo8FtsXTQF+yq5ez1gdXXcEMTRWVR9jIR9GnMVamAeKbo + aapxZjzHjHEH6+SrtKeErJQ/fF1VDgq4B0+Z4kxSLZ7gdqdDij9+2GUSXzgrZPQb7MlkRgXkETTB + iBsCViAUpmIvHW0ppDwVrNgTvLfNAsw5sJ+GKxPF8zncFtpyqgL0OVOZ2LdwQetkA1IsyrF/It48 + yR2om4b9Hv3AkeCGsEQLVsIRUOGPtKqicB2VQuDekJuTridNDotKMpUxKbcYuNvvX1rDeAAPR/DJ + Invyr+bwe2W/gb6kBx1O5b2397CDHjlSBznlGrCw7mx2RvrttfEYa2TdNfsRm68Kr+qkDqxLGmGo + sSvUiTE5SEpFjPE71qu6mgijV94SdCy+ikzJKcIWy6RqDqjmqD3l13P4tcaOY9/CdYS3uXCwpTxr + 4JNpNaaogwCubZdYBQLW6IfmpLWCPKm2pQIvlgsYOQQTiyOs99CmPZqO9auMqKagqGU8pUw9bilq + LQRrLiP8Sfc1McIlZlYMc/gwsIDHkUCGVDTsDtwQXrx8AhIic8WWREeKuge+oOiHEctm6vzNHK7H + jF7/Z1grkKJwR4U6QBDuI6/ZowFxb9yehoa94ZNPshOlsYFsG+ptusFWqoARttNqSd6Opz9scOnp + Gz8IfH9z815+2M9fUwrydaJHh5xs/v6mPWf/nZiwHRUZODcwoMCKvN21FMmUN95jEj3u4L6DmVl+ + mtW64EgPqWzkpEvJaF6hiKtgQSe7pwl8IbtLp2aGnB4m+VY7CFOn4djp3jAQeEPw7vbD7BxGs7bd + Cptm7I5mmbsv/zRONOW7QigputZR7O60lugOH4Tuq/nYtbGG0Lg6/Ze1j45jrnqnaUNRXLtc/LRo + XKp6+nh2/vOXL/8BAAD//wMABqZyviwHAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22ae419e4532cc-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:53:26 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:53:20Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:53:26Z' + request-id: + - req_01B7UWY6NpA4GBZ9DRu9YWdS + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:53:11.070630+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SRXWvbUAyG/4rQzW6Oi5ukKfPN2AalLWWMURhlDHPso8RebSk+0qHxgv/7sNPR + 7Uro4331IJ2wDVhgr/syv/x6fwxfwup5qId6M1zfbNpqPX5DhzYeaJ4iVb8ndBilmwtetVXzbOiw + l0AdFlh3PgXK1tlVpsJMlq3y1SbfrnJ0WAsbsWHx4/TX1Og4y5dQ4KOAZ32hCNa0CkMitVYYfF2n + 6I260cHdu64DJgpgAko+1g3sZFYQ9KIG6ZCZZMEbQcs7ib0/e1SSDB487z83vmXwHKA1hZ0kDhQv + 4IEMeoIgYI23xXOUdIGTe6MV6cqk8w2Ww815KvPLq5tfcnza7l+q6uNtHKqnT4/H3yM6ZN/PujPm + rOJDMixOOCSKIxb4vRFodYF/BQHZvVF+wGn66VBNDmUkr8L/UywNpSER14QFp65zmJY3FafzttLk + mVix2Ky3DiXZv7X319P0BwAA//8DAHnV818FAgAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22aee2bec36992-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:53:48 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:53:46Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:53:48Z' + request-id: + - req_01Jk8NvFFDybK94i9Qz4cRk5 + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "Who is the founder + of LangChain?"}, "id": "toolu_015FjoxY6gwbbAHrqbYBTxzy"}]}, {"role": "user", + "content": [{"type": "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_015FjoxY6gwbbAHrqbYBTxzy", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:53:13.741829+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RUYW8bNwz9K4RQYBtw9mynKTp/a4NhyZagxZYOGNYhoHW8O8068ipKzg5B/vtA + xUHdDvtkQ0e+9/j4pAcXWrd1o/Z3q/X58JrO1r+vf54vflnvfvpjg+v1+aVrXJ4nsipSxZ5c45JE + O0DVoBk5u8aN0lJ0W+cjlpYWZ4vzhQoz5cVmtXm5erVZucZ54Uyc3fbPh2fQTP9Ye/3Zureo1IIw + 5IFACZMfIJGWmLWBK/DIMCU5hJZglgL3IQ+1NHAnacQchAF3UnI97aRwSwmkg2vk/mLAwNuP/JFv + /+cjBIVLTCmoMFwMqLSEG0kEOpEPXfAY41wR1suvCq3VOL0snpGRW7j48d0XDEtr3izh8llAe8rO + EDETbFabzRJuK9o4Ic9wjwrSdcEHUwARC/uBWkAFZJCJeKFSkiez52/y2bDe+Sw7Sk9wxnu2hPcp + SIIsoBlTDtx/pm++nuhe0t44MiCM6IfABJEwsbXV/jKBWUIt/Cq7ohmuOFOMoSf21MD9QIlgsK62 + mnNzDZlwrGJeLo80gw0BO/T7PpklJl0z5qA5eK0umg0lUwL1waChSzKa3AOmFj5wOFDSkOcKfL48 + sfRTCX4fZ+gxMLUwyVQippBnYzFJb64MfSwc8txUst0Mb6YUovl21hyX+rSGAVtIGCyjGnquieAM + XeE2cF9XNoOSL8lSfKAELzYrGEOMFszAz5VPnh4wlqfISmcnkVCzdXxuqXP+Rp+KBIQLnELG2EAn + Mcp9xYEX68/VSmTuHUjzSKbLut8S+2HEtK/mvFrChxrO6v03aqQtJR3C1JzYZjvZkZeRQJhMn9kw + iuZnCwF74rzYlRDrRF3CkSwxeuKsTmg56MQXtSJhGHFv/0IGQp0tiS0dKMpU2Qv2BDf2lABOUwy+ + +qNwbD/J+fs5D8Lf384TqU9hyjCh32NPWuf87+X0whpass3gl9sLfUl0opq86KyZxgYmuyTe5o0z + dJJgCFrvhZV7e9/88RKlnr6aQOHb6+sb/e74SonEpzCjrzPZ9Qh+OFpNFo8uFuIcMD6LOVpTlymd + aauuH3FODFq6x78ap1mmu0Sowm7riNu7XBK74welT8Uuj9tyibFxpT7m2wcXeCr5LsueWN12s3q9 + apyU/MXhD68fH/8FAAD//wMA0hFTIS0GAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22aef3a88e32c6-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:53:54 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:53:49Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:53:54Z' + request-id: + - req_01HxWKuEjZTokR87xSj3FNGK + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:04.768568+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RRW0/bUAz+K5Zf9nKCQluYdt42hLisSIUxBJpQdEjcNuPEbmMfrVGV/46SbmI8 + Wb58F33eY12hx0ZXRX789fP5nV3Wi+ty3j38/P14Kbtvtzt0aN2GhitSDStCh63EYRBUa7XAhg4b + qSiixzKGVFE2zU4yFWaybJJPZvnpJEeHpbARG/pf+3+kRrsBPhaP9wKB9Q+1YOtaYZtIrRaGUJap + DUaxc3D1KUZgogpMQCm05RqWMiAIGlGDtMlMsioYQc1LaZtw4HiRZDAPvDpbh5ohcAW1KSwlcUXt + EczJoCGoBGwdbOTsJB1h797disQi6ZDBGNzQpyI/nun317Pbxd3DzeLx4ub6/iKdPP1o0CGHZsAd + bA4o3iRDv8dtorZDj3/VQZbv1rDvnx2qyaZoKajwR+VxobRNxCWh5xSjwzS+xu8PCoXJK7Gin01P + HUqy/2dfpn3/BgAA//8DABCOjgv5AQAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b0325b034cb6-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:54:42 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:54:40Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:54:42Z' + request-id: + - req_01SsSvCQgy3vQfuMCiJiaZLM + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "founder of LangChain"}, + "id": "toolu_014sKkCQPRVMPXGMJTGu5YSm"}]}, {"role": "user", "content": [{"type": + "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_014sKkCQPRVMPXGMJTGu5YSm", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:07.180606+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3SUW28bNxCF/8qAKNAWWKmyfEmjt8QIHAN2YjTOS5rCGHFnVxNxhzQvUreG/3sx + lFTbafskLXdn5juHh3ww3JqFGVJ/Nzt6ffplLvdXR/2Hi7f9xYf1uy/fxr8G05g8BtKvKCXsyTQm + eqcLmBKnjJJNYwbfkjMLYx2WlibHk9NJ8iKUJ/PZ/GR2Np+ZxlgvmSSbxe8Ph6aZ/tTy+rMwbzFR + C14grwgSYbQriJSKy6mBS7AoEKLfcEsw+gJbzitg6XwcMLMXwKUvuRZ3vkhLEXwHVyj9+QpZFl/l + q9z+z0vgBO8xRk5e4HyFiaZw7SNBCmS5Y4vOjbXD0fS7D7VUZ1o/OXRGaeH83ccXE6ZaPJ/C+wNA + +3y6gMNMMJ/N54AJUMAHkknyJVpS1d/IZtiu2BFsfVyz9IAZEAa0KxYCRxhFV1PGmEsAJaYWfvPL + kjJcSibnuCexVEmOp3v6lY6DJdp1H5VLWVLGzCmzTVWK9UMomSIky9oAuugHdWGDsYXPwhuKifNY + G59M4Sayj5D9jkWh/lHawEpZ2+rY9Z796sCeCQeV9R/QjYq3K+i8LYeUUKrNFXGDjttdCnz3b1Nq + PlPlO50+8/2+sF27EXpkoRaCD8Vh5DyqC4r45lLVD0U4j02dxAJvQmSne3Xc7Hd+CCgjRGRFS9xL + jYxk6Iq0LH0DLNYV/Qt+QxF+mM9gYOcUuLr5ie6LZ4RzDJzRVdSz6cuArsVvBTofgXN6EZCbMa+8 + /HI7Bko2csgQ0K6xJ42m5oQH3Y8B1wScgTCN+tzShpwPdUrBnuBafQIMwbGtbu48ezV9irr1kril + SC2gBnNgIRXKfYn0zDbsdZmsT2PKNDQQNAtW/XVjFWH1hrD7fMSevsNI8NPV1XX6eXfOs/dul0a0 + T2AvT+KPCTac1NJa8uSdZnxJJDWTPATH3Vg5Q/SWUtLM2Ei4i9Mz9RD8tkpdjuAqozsw7iIFjtcE + Fze3k5NG7dUGnAGttuWlIx2JsFXHIKL0pLP2vlPcKYq0u+z0+cnAjsm1U/P4R2NS9uEuEiYvZmFI + 2rtcopj9i0T3RY+IWUhxrjGl3tOLB8MSSr7Lfk2SzGI+e3XWGF/yi8VfXz8+/g0AAP//AwD0aedG + CAYAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b04158a84cb1-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:54:48 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:54:42Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:54:48Z' + request-id: + - req_01Ty6RLDuDeMCfmVfunAmMKp + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:32.018816+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SRTW8TQQyG/4rlC5fZapO0KZ0LEqAWlB4Q4UMBodWw42QXdu1k7KGNov3vaDeg + wsnyx/v6kX3CNqLHXndVObtpZ6vHu+cPH3/Zdbh7t9ysbjerNTq0457GKVINO0KHSbqxEFRbtcCG + DnuJ1KHHugs5UrEorgoVZrJiXs4vy+W8RIe1sBEb+q+nv6ZGj6N8Ch4/CATWB0pgTatwyKTWCkOo + 65yCUXd08PZZ1wETRTABpZDqBrYyKgh6UYO8L0yKGIyg5a2kPpw9vks2uA+8e9WEliFwhNYUtpI5 + UrqAezLoCaKANcEmz6PkCxzcE61IV2UdbzAdbsxzVc7WdBVvfzRfXu7im0+vZ+v3i2aeNuiQQz/q + zpijivfZ0J/wkCkd0ePnRqDVCf4PCMj2ifIFDsM3h2qyrxIFFf6fYmooHTJxTeg5d53DPL3Jn87b + KpOfxIr+crF0KNn+rd1cD8NvAAAA//8DAPfUzMAFAgAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b0dcbd844caf-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:55:09 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:55:07Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:55:09Z' + request-id: + - req_018TP5XzbuQ82VrDc4fbETo3 + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "Who is the founder + of LangChain?"}, "id": "toolu_01Se5dFjhZBgdHVD1SR3h2rY"}]}, {"role": "user", + "content": [{"type": "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01Se5dFjhZBgdHVD1SR3h2rY", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:34.582739+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA2yUYW8bNwyG/wpxGLANOHuuk3SAv2VGsWZz0CLLgA7rENA6+k61jlQkyq5R9L8P + lJ0sSffpAB1FPnz5Ul8a3zWLZsz93ezVm9vzv8ryfjVf9mfp5mJz8+HD+NvvTdvoIZJFUc7YU9M2 + SYIdYM4+K7I2bTNKR6FZNC5g6WhyNrmYZGEmncxn8/PZ6/msaRsnrMTaLP7+8pBU6bNdr59Fczsg + b+EgBTaSICbZ+c5zDyPB3usAOhBIjJK0sNcDqEAmTG6o8fZ3lKxQ4kRl0qESeN5IGlG98BR+wUwd + CNfI08VEuQTNLVyBQwYnvPEdsYYDIOc9JcNJcF8oW5LFR/7ItwPBRgp3lEA2sELulwN6Bp/hLabk + szAsB8w0reFyasXwEkGV4bPWVK+mL25YDhaFTyVr5TwVamFdjgdOJg/FkTtYvnn3DKKWnE+fUO0x + Q8DCbqAOPMM7p7KmBPPZfA6YARkkEk+ylOTIWD+RU1gfXqLtBx8IBqoZ95K2NhtUQBjRDZ4JAmFi + O82KSUsEhyFQBzeytn6uWCkE3xO7ozRn01PqwThgjW7bJ2vOOLOi+qze5dqokzEWpQTZeUsAmySj + Ie4wdfAn+x2l7PVQE59P4X3yZgo5shjUoyStNWFcpuf1iX31wK6Eo7X1P9CtaVDt5sqDl8wYpgN3 + sMPgu2o2G8k3otQlyZXv4umA7ot323CAHj1TB1FiCZjM4P7o1csr636spm8BVRO6WnQo3CXqspUz + WyW/LiopG9ivXt+WdeVak5OxQsLedxQO0PnsSrYWVKJ3Fr/D5KVkiAHVluYI+noKVwyXMflghjlr + n9qdnaQoCZW6aqQ6I+RDLZrQW/7se/Yb75AVNoVtn1u7GUpdbdlRgu/mMxh9CCZcneofdF/EIywx + esXQmrKlzqYuwKmImrRZ7frj/Qr98xRu/wv8PsNouHVotl/y3PDvDzoI/3R7iJRd8lEhottiTxl0 + MHv70Ww04pbAKxDm+vJ0tKMgsepRsCe4tvECxhi8qybILUSznrNxhsdpJsIw2sQurwB7Yj36e7W6 + hh9WmHp6kfJHiLKnZBo/yV0b/fbtcMLZd8do2PnshTE9NVKOaD5+Bmav5+CPO22hzp7uo8NWq+t8 + enxFwpHUzFe7G3H7bK9AmKyxx5f4ZGXYJBzJsudaa118qNN/VGDafP2nbbJKvEuEWbhZNMTdnZbE + zelHpvtiS9gs/lVeaU6OjlIpuDqyqlbKzCsoLYkvyc9OzStWsjIysDDQUcovLUEWNDY2q60FAAAA + //8DAHryTTDvBgAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b0ec98794caf-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:55:17 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:55:10Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:55:17Z' + request-id: + - req_011iT4S1koK6LtTJefPZgpb9 + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:53.846143+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RRS2vcQAz+K0KXXsbBu5um6dySQCAQckiXPijFTD3y2slYsmc0JO7i/17sbUl7 + Enp8Dz4dsfNosU+HqtxsPrdPfjNcf2A3Svvl5uGXxKtLNKjTQMsVpeQOhAajhGXgUuqSOlY02Iun + gBbr4LKnYle8L5IwkxbbcnteXmxLNFgLK7Gi/X78S6r0usDXYnEv4Di9UARtuwRjpqSdMLi6ztEp + hcnA3bsQgIk8qEAiF+sWGlkQBL0khTwUKoV3StBxI7F3J46fkhXuHR9uWtcxOPbQaYJGMnuKZ3BP + Cj2BF9DW6co5ST7D2by5FQlVTksGa3BLn6tyczt9uv76bV9f7X39eCnj+Hpo+hc0yK5fcCebC4qH + rGiPOGaKE1r8ow7SvFnDef5hMKkMVSSXhP9XXheJxkxcE1rOIRjM62vs8aRQqTwTJ7TnuwuDkvXf + 2cfdPP8GAAD//wMAgzLCHfkBAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b1653bb54cb6-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:55:32 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:55:29Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:55:32Z' + request-id: + - req_01RU57s1YVTHykXPQ2qnPNr4 + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "founder of LangChain"}, + "id": "toolu_01FySBXYTcATdcR8oqqxgfmw"}]}, {"role": "user", "content": [{"type": + "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01FySBXYTcATdcR8oqqxgfmw", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.\n\nSystem time: 2024-11-13T23:54:56.977251+00:00", + "tools": [{"name": "search", "description": "Search for general web results. + This function performs a search using the Tavily search engine, which is designed\nto + provide comprehensive, accurate, and trusted results. It''s particularly useful\nfor + answering questions about current events.", "input_schema": {"properties": {"query": + {"type": "string"}}, "required": ["query"], "type": "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RVbW/bRgz+K4RQYBsge4nTppu/tdnQZEnQbnWHDesQ0CdaYn3iXY48p1rR/z6c + bDd2h30yJB3Jh8/L+VPFTTWvem3vTk6vf/1w+ePpu9D8IYvww0eJv5xd/35d1ZUNkcopUsWWqrpK + wZcXqMpqKFbVVR8a8tW8ch5zQ5OzybOJBhGyyexk9vTkfHZS1ZULYiRWzf/6tG9q9LGUjz/z6iUq + NRAErCNQwuQ6SKTZm9ZwBQ4FYgobbgiGkOGBrQOWVUg9GgcBXIZsY/EqZGkoQVjBDUp70SHL/L28 + l8X/fARWuMSUWIPARYdKU1gEWBL0IRHERI6VauionCwjXJjsG6E0cPHz66OGU7ikRICJQENPsKYB + YmAx3cE8njb2OIZ6Ov36zJeRzSFwAY9GMDuZzaalbjY9XgvBhT6iDFCYogYwlSYQIslEQ06O4M1g + XZDvF0Okty5xNIjo1thS2RUNkHuwAD2uCdiAUIfy3NCGfIjjvIwtwW3xAWCMnt2oiY6QzqbwJnFI + pUYNk7G0jyDrr/acvxcAmMANNSPTtzdghD2gwW9hmdXgSoy855bEUQ0ocHvzOurBni7vnUQ6Div0 + btBzs3VKWEGPrmMh8IRJypHRwwXv0XASYxvAs6zLoT2QaxLtwrjc0+lOng4L2Ut063bLMEvZ1liN + nY4QCsJslEAdF/CwSqEv628wNfBOeENJ2Yax8bNDIe8zu7UfoEUWaiCGmD2mAo23eXlxVbr3WdiG + epuNErjEyzwKsR3VZWkSNVoY2KlHSQtTr9gu87IGdMYbgobVZdWxMggsHthsZ/WfWF1ITT0+SO4p + hazwZ8iLvCSwbCEx+q3y51O4EngRE/vi0LP6yLkupBgSWjFl4W70Ro5j44RcNFRuhVfsUAxWWRqW + du+P1xtK8GR2Aj17X1Rl2R8pEmERPH/RG61IrVYqHktGUjYklhPBilMPb+k+B0a4wMiGfu+HRccK + DnuCD8WBCA9Ea8DVlhQJWdw4F56cPnZXouKCDan1VBYo016SuK7HtB4Jev6flLNCIhda4X/2vJTL + Y8VtwfioNralJbmggxr1NcQSLFds4cesF/2F3C5sqaWvcqrw7c3NrX63NYuF4LcmLQ7YJ/cgpNu7 + 7hjsN1pIbShpx7EeE7AkV+473FsUVgl7eghpPWJaZvZbhQ4uCYjhgRI1sBzAj0j9Huk2leB5TfDq + zWLytAYSXPrS4sDAFsAlKvfgi6vJvhvGqNv7m1DZD+N2uyBNq89/15VaiHeJUINU84qkubOcpNp9 + ULrPJaXVXLL3dZXHP8D5p4olZruzsCbRaj47eX5eVyHb4cuz5+efP/8LAAD//wMAjIY6NGEHAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b178d9d04cb4-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:55:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:55:32Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:55:39Z' + request-id: + - req_015HcqrgirHzeLfD6UpmyE4r + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.", "tools": [{"name": "search", "description": "Search + for general web results. This function performs a search using the Tavily search + engine, which is designed\nto provide comprehensive, accurate, and trusted results. + It''s particularly useful\nfor answering questions about current events.", "input_schema": + {"properties": {"query": {"type": "string"}}, "required": ["query"], "type": + "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SR3WrcQAyFX0Xopjfj4HWzKZm7JrTQsimhBAIpxcza8nqoLe2ONLRm8bsXe1vS + Xgn9nKMP6YyxRY+jHupy8/jxOcfbB9me7qqc08uXd81Ee3Ro05GWKVINB0KHSYalEFSjWmBDh6O0 + NKDHZgi5peJtsS1UmMmKqqyuy5uqRIeNsBEb+m/nv6ZGvxb5Gjw+CQTWn5TA+qhwyqQWhSE0TU7B + aJgcfHozDMBELZiAUkhND50sCoJR1CAfC5OiDUYQuZM0hovHXrLBLvDhvg+RIXAL0RQ6ydxSuoId + GYwErYD1wVbPSfIVzu6VVmSosy43WA+35LkuN7v3U5zuuj1/eHmi/ePnr4ftw31ChxzGRXfBXFR8 + zIb+jKdMaUKPz71A1BX+DwhI90qJ8/zdoZoc60RBhf+HWBtKp0zcEHrOw+Awr1/y58uy2uQHsaK/ + 3lQOJdu/tdubef4NAAD//wMAEAehhwQCAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b64a18a54caf-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:58:52 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:58:49Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:58:52Z' + request-id: + - req_01JfEnoQAvmWG3PFoZTmVtmb + via: + - 1.1 google + status: + code: 200 + message: OK +- request: + body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "Who is the + founder of LangChain?"}, {"role": "assistant", "content": [{"text": "To answer + this question accurately, I''ll need to search for the most up-to-date information + about LangChain and its founder. Let me do that for you.", "type": "text"}, + {"type": "tool_use", "name": "search", "input": {"query": "Who is the founder + of LangChain"}, "id": "toolu_01LAyiyBfbnEZTebPJRg5MCr"}]}, {"role": "user", + "content": [{"type": "tool_result", "content": "[{\"url\": \"https://sfelc.com/speaker/harrison-chase\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://aiconference.com/speakers/harrison-chase/\", + \"content\": \"Harrison Chase is the co-founder and CEO of LangChain, a company + formed around the open-source Python/Typescript packages that aim to make it + easy to develop Language Model applications. Prior to starting LangChain, he + led the ML team at Robust Intelligence (an MLOps company focused on testing + and validation of machine learning models), led the\"}, {\"url\": \"https://tedai-sanfrancisco.ted.com/speakers-1/harrison-chase-/co-founder-and-ceo,-langchain/\", + \"content\": \"Harrison Chase, a Harvard graduate in statistics and computer + science, co-founded LangChain to streamline the development of Language Model + applications with open-source Python/Typescript packages. Chase''s experience + includes heading the Machine Learning team at Robust Intelligence, focusing + on the testing and validation of machine learning models, and leading the entity + linking team at Kensho\"}, {\"url\": \"https://techcrunch.com/author/harrison-chase/\", + \"content\": \"Harrison Chase is the CEO and co-founder of LangChain, a company + formed around the open source Python/Typescript packages that aim to make it + easy to develop Language Model applications\"}, {\"url\": \"https://www.sequoiacap.com/podcast/training-data-harrison-chase/\", + \"content\": \"Sonya Huang: Hi, and welcome to training data. We have with us + today Harrison Chase, founder and CEO of LangChain. Harrison is a legend in + the agent ecosystem, as the product visionary who first connected LLMs with + tools and actions. And LangChain is the most popular agent building framework + in the AI space.\"}, {\"url\": \"https://www.youtube.com/watch?v=7D8bw_4hTdo\", + \"content\": \"Join us for an insightful interview with Harrison Chase, the + CEO and co-founder of Langchain, as he provides a comprehensive overview of + Langchain''s innovati\"}, {\"url\": \"https://www.forbes.com/profile/harrison-chase/\", + \"content\": \"Harrison Chase only cofounded LangChain in late 2022, but the + company caught instant attention for enabling anyone to build apps powered by + large language models like GPT-4 in as little as two\"}, {\"url\": \"https://en.wikipedia.org/wiki/LangChain\", + \"content\": \"In October 2023 LangChain introduced LangServe, a deployment + tool designed to facilitate the transition from LCEL (LangChain Expression Language) + prototypes to production-ready applications.[5]\\nIntegrations[edit]\\nAs of + March 2023, LangChain included integrations with systems including Amazon, Google, + and Microsoft Azure cloud storage; API wrappers for news, movie information, + and weather; Bash for summarization, syntax and semantics checking, and execution + of shell scripts; multiple web scraping subsystems and templates; few-shot learning + prompt generation support; finding and summarizing \\\"todo\\\" tasks in code; + Google Drive documents, spreadsheets, and presentations summarization, extraction, + and creation; Google Search and Microsoft Bing web search; OpenAI, Anthropic, + and Hugging Face language models; iFixit repair guides and wikis search and + summarization; MapReduce for question answering, combining documents, and question + generation; N-gram overlap scoring; PyPDF, pdfminer, fitz, and pymupdf for PDF + file text extraction and manipulation; Python and JavaScript code generation, + analysis, and debugging; Milvus vector database[6] to store and retrieve vector + embeddings; Weaviate vector database[7] to cache embedding and data objects; + Redis cache database storage; Python RequestsWrapper and other methods for API + requests; SQL and NoSQL databases including JSON support; Streamlit, including + for logging; text mapping for k-nearest neighbors search; time zone conversion + and calendar operations; tracing and recording stack symbols in threaded and + asynchronous subprocess runs; and the Wolfram Alpha website and SDK.[8] As a + language model integration framework, LangChain''s use-cases largely overlap + with those of language models in general, including document analysis and summarization, + chatbots, and code analysis.[2]\\nHistory[edit]\\nLangChain was launched in + October 2022 as an open source project by Harrison Chase, while working at machine + learning startup Robust Intelligence. In April 2023, LangChain had incorporated + and the new startup raised over $20 million in funding at a valuation of at + least $200 million from venture firm Sequoia Capital, a week after announcing + a $10 million seed investment from Benchmark.[3][4]\\n The project quickly garnered + popularity, with improvements from hundreds of contributors on GitHub, trending + discussions on Twitter, lively activity on the project''s Discord server, many + YouTube tutorials, and meetups in San Francisco and London. As of April 2023, + it can read from more than 50 document types and data sources.[9]\\nReferences[edit]\\nExternal + links[edit]\"}, {\"url\": \"https://analyticsindiamag.com/people/harrison-chase/\", + \"content\": \"By AIM The dynamic co-founder and CEO of LangChain, Harrison + Chase is simplifying the creation of applications powered by LLMs. With a background + in statistics and computer science from Harvard University, Chase has carved + a niche in the AI landscape. AIM Brand Solutions, a marketing division within + AIM, specializes in creating diverse content such as documentaries, public artworks, + podcasts, videos, articles, and more to effectively tell compelling stories. + AIM Research produces a series of annual reports on AI & Data Science covering + every aspect of the industry. Discover how Cypher 2024 expands to the USA, bridging + AI innovation gaps and tackling the challenges of enterprise AI adoption AIM + India AIM Research AIM Leaders Council 50 Best Data Science Firms\"}, {\"url\": + \"https://www.turingpost.com/p/harrison-chase-langchain-ai-agents\", \"content\": + \"Harrison Chase, founder of LangChain, shared insights on the evolution of + AI agents and their applications during Sequoia Capital''s AI Ascent. ... Saves + you a lot of research time, plus gives a flashback to ML history and insights + into the future. Stay ahead alongside over 73,000 professionals from top AI + labs, ML startups, and enterprises\"}]", "tool_use_id": "toolu_01LAyiyBfbnEZTebPJRg5MCr", + "is_error": false}]}], "model": "claude-3-5-sonnet-20240620", "system": "You + are a helpful AI assistant.", "tools": [{"name": "search", "description": "Search + for general web results. This function performs a search using the Tavily search + engine, which is designed\nto provide comprehensive, accurate, and trusted results. + It''s particularly useful\nfor answering questions about current events.", "input_schema": + {"properties": {"query": {"type": "string"}}, "required": ["query"], "type": + "object"}}]}' + headers: {} + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3RU0W4bRwz8FeIQoC1wEmQ5KVC/2UZQu5DQNEmf6iKg9nh3jPa45yVPqhD03wuu + LEdx26cFdpfkcGbILxU31VU1aPdpcbFu9q8vfnv/y0/j5frx1j7vbldv391UdWWHkfwXqWJHVV3l + FP0CVVkNxaq6GlJDsbqqQsSpodnl7M1MkwjZbLlYvl78uFxUdRWSGIlVV398OSU1+svDy3FV3aBS + A0nAegIlzKGHTDpF0xruIaBASNJyQ2LxACi6pwyHNGV4nEiNkwBu0mQlQZsmaShDamGF0t32yDJ/ + kAf5+D+PwAp3mDNrErjtUWkO65QJdKTALQeM8XDlGS7mLz56qNcMaXbKjNLA7dtfX5ZfzuHuVL45 + ry0Q0QiWi+WyBhY29nKACiiQRpKZpikHgjGnzxQM9j1Hgn3KW5YO0ABhwNCzEETCLH6rhtmmERw6 + NfA+bSY1uBejGLkjCTR/kMv5GY49KoRMaNSAJRhwS8AGhMqU/aahHcU0Ao5j5IBOusKY9pSpgc0B + Vpg7Kgkn7AjW7gyF71ertf5Q6P+QBgJsGvZQjMBilF096aDFYPqk4QuGnc9nmCcVjk+9kwQbDNsu + O7FOphoaq3HQEhnSME5GGTSwtw1tToOX2GFu4HfhHWVlOxwVepc5lWYLfw7suXINvfPbFLnXT3yv + Tnwb4eBS/AfRNbQpTOq/3OFPDTu2HUZuCpFuln9pWGZLX+r0OHHYxgN0yEINjGmcIma2gzfv2K7v + velhErZDDXu23ofHMm+mo2aFgX6SJlOjXvlJWcrqCH9mu5s2BSAG4x1Bwxom1RKcBHaYOU0KY0Rr + Ux4c4us53Atcj5mjO/my/sbhIeUx5WKtopiLgnIoNTKyD79yJ2XUxKCdpGHp5vCxpwNkCsQ73w87 + yvBquYCBY3TSWE5fj1Owwzg904nmTKp5xNeQ0vsHepwSI9ziyIaxBu1TLoultTLAkiYJJS28uvga + rERusR2pDeQ4PdkNSegHzNv5g7w5F8rNuaHgpk9CDsnVGZLaSTTAjsRmm4ljaaLNOJDPtZ5pqSO6 + h7aS9gJtyi6mUDiac7XWo8KWUtRnzZJombhvJ+k7hR27iseQl0hJivF5GCO3h1J+zCmQFo+U1eA1 + r+9np6E/3wS1bwx/Z4PBdycGD+VNpLPl4RZzkBufB1IlBYy8pXn19591pZbGT/kfpSYW5+cpWSml + 5qXEl5QW5SlBJYpTC0tB+UnJKq80J0dHqRRcK1lVK2XmFZSWxJfkZ6fmFStZGRmYmuoo5ZeWIAsa + mxjW1gIAAAD//wMALzV23/YGAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8e22b65b6bda4caf-PHL + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 13 Nov 2024 23:58:59 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2024-11-13T23:58:52Z' + anthropic-ratelimit-tokens-limit: + - '400000' + anthropic-ratelimit-tokens-remaining: + - '400000' + anthropic-ratelimit-tokens-reset: + - '2024-11-13T23:58:59Z' + request-id: + - req_013QF9W14BVn6VHs6PZwfFs7 + via: + - 1.1 google + status: + code: 200 + message: OK +version: 1 diff --git a/tests/integration_tests/__init__.py b/tests/integration_tests/__init__.py new file mode 100644 index 0000000..d02981b --- /dev/null +++ b/tests/integration_tests/__init__.py @@ -0,0 +1 @@ +"""Define any integration tests you want in this directory.""" diff --git a/tests/integration_tests/test_graph.py b/tests/integration_tests/test_graph.py new file mode 100644 index 0000000..cd90afb --- /dev/null +++ b/tests/integration_tests/test_graph.py @@ -0,0 +1,15 @@ +import pytest +from langsmith import unit + +from react_agent import graph + + +@pytest.mark.asyncio +@unit +async def test_react_agent_simple_passthrough() -> None: + res = await graph.ainvoke( + {"messages": [("user", "Who is the founder of LangChain?")]}, + {"configurable": {"system_prompt": "You are a helpful AI assistant."}}, + ) + + assert "harrison" in str(res["messages"][-1].content).lower() diff --git a/tests/unit_tests/__init__.py b/tests/unit_tests/__init__.py new file mode 100644 index 0000000..f2900f2 --- /dev/null +++ b/tests/unit_tests/__init__.py @@ -0,0 +1 @@ +"""Define any unit tests you may want in this directory.""" diff --git a/tests/unit_tests/test_configuration.py b/tests/unit_tests/test_configuration.py new file mode 100644 index 0000000..ab6e72c --- /dev/null +++ b/tests/unit_tests/test_configuration.py @@ -0,0 +1,5 @@ +from react_agent.configuration import Configuration + + +def test_configuration_empty() -> None: + Configuration.from_runnable_config({})