diff --git a/docs/docs/integrations/providers/exa.ipynb b/docs/docs/integrations/providers/exa.ipynb index e69de29bb2d1d6..24a9a234663490 100644 --- a/docs/docs/integrations/providers/exa.ipynb +++ b/docs/docs/integrations/providers/exa.ipynb @@ -0,0 +1,125 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exa\n", + "\n", + ">[Exa](https://exa.ai/) is a knowledge API for AI and developers.\n", + ">\n", + "\n", + "## Installation and Setup\n", + "\n", + "`Exa` integration exists in its own [partner package](https://pypi.org/project/langchain-exa/). You can install it with:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Note: you may need to restart the kernel to use updated packages.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " WARNING: The script tqdm.exe is installed in 'c:\\Users\\dell\\.pyenv\\pyenv-win\\versions\\3.9.0\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script distro.exe is installed in 'c:\\Users\\dell\\.pyenv\\pyenv-win\\versions\\3.9.0\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + " WARNING: The script openai.exe is installed in 'c:\\Users\\dell\\.pyenv\\pyenv-win\\versions\\3.9.0\\Scripts' which is not on PATH.\n", + " Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n", + "WARNING: You are using pip version 20.2.3; however, version 24.3.1 is available.\n", + "You should consider upgrading via the 'c:\\Users\\dell\\.pyenv\\pyenv-win\\versions\\3.9.0\\python.exe -m pip install --upgrade pip' command.\n" + ] + } + ], + "source": [ + "%pip install -qU langchain-exa" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In order to use the package, you will also need to set the `EXA_API_KEY` environment variable to your Exa API key.\n", + "\n", + "## Retriever\n", + "\n", + "You can use the [`ExaSearchRetriever`](/docs/integrations/tools/exa_search#using-exasearchretriever) in a standard retrieval pipeline. You can import it as follows.\n", + "\n", + "See a [usage example](/docs/integrations/tools/exa_search).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from langchain_exa import ExaSearchRetriever" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Tools\n", + "\n", + "You can use Exa as an agent tool as described in the [Exa tool calling docs](/docs/integrations/tools/exa_search#using-the-exa-sdk-as-langchain-agent-tools).\n", + "\n", + "See a [usage example](/docs/integrations/tools/exa_search).\n", + "\n", + "### ExaFindSimilarResults\n", + "\n", + "A tool that queries the Metaphor Search API and gets back JSON." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### ExaSearchResults\n", + "\n", + "Exa Search tool." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from langchain_exa.tools import ExaSearchResults" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "3.9.0", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}