Skip to content

Commit

Permalink
docs updates (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyie28 authored Apr 19, 2024
1 parent 9d5702d commit 8cd3463
Show file tree
Hide file tree
Showing 8 changed files with 548 additions and 69 deletions.
518 changes: 518 additions & 0 deletions docs/docs/get-started/quick-tour-notebook/quick-tour.ipynb

Large diffs are not rendered by default.

71 changes: 15 additions & 56 deletions docs/docs/get-started/quick-tour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"id": "57cUBU_kW8YI"
},
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: Quick-tour guide</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/get-started/quick-tour.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
" </div>"
"<h1>LaVague: Quick-tour guide</h1>"
]
},
{
Expand All @@ -21,58 +17,21 @@
"In this quick tour we're going to show you how you can use LaVague to perform actions on web from text instructions 🤯\n",
"\n",
"We'll get you started with our two CLI commands:\n",
"- `lavague [OPTIONS] launch`: Launch an interactive in-browser Gradio demo where you can test out instructing LaVague to perform actions on a website!\n",
"- `lavague [OPTIONS] build`: Get the raw Python code generated by LaVague which you can then execute locally"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Installation\n",
"- `lavague launch`: Launch an interactive in-browser Gradio demo where you can test out instructing LaVague to perform actions on a website!\n",
"- `lavague build`: Get the raw Python code generated by LaVague which you can then execute locally\n",
"\n",
"We can install everything we need to get started with LaVague using our `setup.sh` script.\n",
"**Pre-requisites:**\n",
"- We assume you have already installed LaVague & the necessary dependencies as outlined in our [installation guide](./setting-up-la-vague.md)\n",
"- If you are running the notebook locally, you will need Python (test on python>=3.8) and pip installed\n",
"- Our default demo uses the OpenAI API. You will need to have an OPENAI_API_KEY environment variable set in your local environment\n",
"\n",
"We'll also download the config and instruction files we will use in this demo.\n",
"> For other integrations, see our [integrations](../integrations/home.md) section\n",
"\n",
"> This downloads the webdriver needed to leverage Selenium to interact with the browser, as well as the LaVague package."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Run the LaVague setup script\n",
"!wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/setup.sh\n",
"!sudo bash setup.sh\n",
"\n",
"# Download files needed for demo to current repo\n",
"!wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/examples/configurations/api/openai_api.py\n",
"!wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/examples/instructions/huggingface.yaml"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### OpenAI API key\n",
"\n",
"By default, LaVague uses OpenAI GPT3.5 and an OpenAI light embedder. Please make sure you've set the `OPENAI_API_KEY` environment variable with your OpenAI key, or if you're running this in our Google Colab, set it in the command below."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ['OPENAI_API_KEY'] = # ADD YOUR OPENAI KEY HERE"
"If you prefer to run this example as an end-to-end example with Google Colab, you can follow this link.\n",
"<div id=\"colab_button\\\">\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/get-started/quick-tour-notebook/quick-tour.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Run in Colab\"/></a>\n",
" </div>"
]
},
{
Expand All @@ -82,7 +41,7 @@
"source": [
"### LaVague Launch\n",
"\n",
"Let's now run the `lavague [OPTIONS] launch` command!\n",
"Let's now run the `lavague launch` command!\n",
"\n",
"- The `--instructions` or `-i` option accepts a text file containing: the URL of the website we will interact with & the instructions for the actions we wish to automate\n",
"- The `--config` or `-c` option with a Python file which can be used to set a desired LLM, embedder etc.\n",
Expand Down Expand Up @@ -126,7 +85,7 @@
"source": [
"### LaVague Build\n",
"\n",
"We can use `lavague [OPTIONS] build` command to generate a file containing this automation code without launching an interactive demo."
"We can use `lavague build` command to generate a file containing this automation code without launching an interactive demo."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: Azure OpenAI integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/azure-openai.ipynb\">\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/api/azure-openai.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"</div>"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: HuggingFace API integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/hugging-face-api.ipynb\">\n",
" <h1>LaVague: HuggingFace integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/api/hugging-face.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
" </div>"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: LiteLLM integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/litellm.ipynb\">\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/api/litellm.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"</div>"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: OpenAI integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/openai.ipynb\">\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/api/openai.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"</div>"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"source": [
"<div id=\"colab_button\\\">\n",
" <h1>LaVague: HuggingFace API integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/local-inference.ipynb\">\n",
" <h1>LaVague: DeepSeek Coder integration</h1>\n",
" <a target=\"_blank\\\" href=\"https://colab.research.google.com/github/lavague-ai/lavague/blob/main/docs/docs/integrations/local/local-inference.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
" </div>"
]
Expand Down
14 changes: 8 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ nav:

- 🤝 Integrations:
- Overview: 'docs/integrations/home.md'
- Azure OpenAI: 'docs/integrations/azure-openai.ipynb'
- HuggingFace API: 'docs/integrations/hugging-face-api.ipynb'
- OpenAI: 'docs/integrations/openai.ipynb'
- Local: 'docs/integrations/local-inference.ipynb'
- Litellm: 'docs/integrations/litellm.ipynb'

- Api:
- Azure OpenAI: 'docs/integrations/api/azure-openai.ipynb'
- HuggingFace: 'docs/integrations/hugging-face-api.ipynb'
- OpenAI: 'docs/integrations/openai.ipynb'
- Litellm: 'docs/integrations/litellm.ipynb'
- Local:
- DeepSeek Coder: 'docs/integrations/local-inference.ipynb'

- ⚡ Advanced:
- Architecture: 'docs/get-started/architecture.md'
- Telemetry: 'docs/advanced/telemetry.md'
Expand Down

0 comments on commit 8cd3463

Please sign in to comment.