Step 4 - Testing the Code

Now that we've pulled down the code, installed the dependencies, let's test that the echo agent works.

If you're not already, in the terminal, change the directory to demo-1 by using the following command:

cd demo-1

Now we need to start the web server by running this command in the terminal:

python main.py

Where it starts, this is what you should see:

Now that we have our echo agent running, we need to open a new terminal to run our test-api.sh script. Go to the right side of the terminal and click the plus symbol. That will open a new bash terminal.

This will open a new terminal. The new terminal opens at the root of our application. We need to change the directory and navigate back to the demo-1 directory. We do this with the following command:

cd toronto-ai-studio-workshop/demo-1

Now we can run the test-api.sh script. This will test that our endpoint is running. The command to run it is:

./test-api.sh Hello World!

This is what you'll see:

Last updated