5.7 Test the UI Copilot Chat¶
You are now ready to test the end-to-end copilot chat feature. You must run the FastAPI server and the React SPA locally from VS Code debug sessions. In this next section, you will see how to do this locally for rapid prototyping and testing.
Test with VS Code¶
Visual Studio Code provides the ability to run applications locally, allowing for debugging and rapid testing.
Start the API¶
The UI relies on the Woodgrove Bank API to be running. As you did to test the API via its Swagger UI, follow the steps below to start a debug session for the API in VS Code.
-
In Visual Studio Code Run and Debug panel, select the API Debugger option for your OS from the debug configurations dropdown list.
-
Select the Start Debugging button (or press F5 on your keyboard).
-
Wait for the API application to start completely, indicated by an
Application startup complete.
message in the terminal output.
Start the Portal¶
With the API running, you can start a second debug session in VS Code for the Portal project.
-
Return to the Run and Debug panel in Visual Studio Code and select the Portal Debugger option from the debug configurations dropdown list.
-
Select the Start Debugging button (or press F5 on your keyboard).
-
This should launch the Woodgrove Bank Contract Management Portal in a new browser window (http://localhost:3000/).
-
On the Dashboard page, enter the following message into the chat and send it:
Paste the following prompt in the copilot chat box!
1
What IT vendors are we working with?
-
Next, ask the following question about vendor invoicing accuracy:
Paste the following prompt in the copilot chat box!
1
What vendor has had the most invoicing issues?
The response to the previous question may be accurate, but the copilot did not provide any insights about why this vendor was specified as having the most invoicing issues. You may also have received an error because the copilot lacks guidance on correctly selecting the proper function for augmenting the prompt. In either case, prompt engineering can help improve your copilot's response!
In the next task, you will iterate on your copilot's prompt to refine it and improve the quality and groundedness of the responses it provides.
Leave the API and Portal debug sessions running for the next task.