In this guide, we will work through each component of Genie by building a virtual assistant for searching restaurants using Yelp API. We will synthesize a large training set, train a contextual semantic parser, and deploy the model to have a fully working assistant. The manifest and backend code to query Yelp are provided.
To help you start using and developing Genie, we need to install Genie SDK (Genie Skill Development Kit). Genie SDK depends on node 18
and Python 3.7
.
You need to restart the terminal after the installation to allow tools to be loaded properly.
First, let us run the installation script to install node 18.12.1
via nvm and other necessary dependencies.
git clone https://github.com/stanford-oval/genie-sdk
cd genie-sdk
chmod 777 install_deps.sh
chmod 777 install_components.sh
./install_deps.sh
Source the profile file.
source ~/.bashrc
source ~/.zshrc
To install and use GenieNLP, you will need Python 3.7
.
We highly recommend to create and use a virtual environment either from Python's virtualenv or conda to install GenieNLP.
You can refer to the Python3.7 installation guide on the installation of Python 3.7
on Linux machines.
Run the following command to install GenieNLP.
pip3 install genienlp==0.7.0a4.
Run the following command to install GenieNLP.
pip3 install genienlp==0.7.0a4.
If you have Rosetta2, you can start the Python installation by using brew x86:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
If brew prompts you for adding certain commands to path, please do so.
Then, run the command below to install Python 3.7.
arch -x86_64 brew install python@3.7
Now, install genienlp
by running:
pip3.7 install genienlp==0.7.0a4
Inside your genie-sdk/
directory, run the following command to install Genie components.
./install_components.sh
Three main components and their dependencies will be installed:
Native voice interaction with Genie is only supported on Linux. You can follow the installation guide from Genie Client to enable that.
If you plan to synthesize your own training data and train your own model, at least 30GB of RAM is required.