6. Test Code Changes to Prompty¶
Now, let's try to make a change that will be visible in the /api/create_response
route handling.
- Open
src/api/contoso_chat/chat.prompty
- Find the
system:
section of the file - Add
Start every response with "THE ANSWER IS 42!"
to the end - Save the changes.
- Find the
- Return to the browser page for our FastAPI dev server preview.
- Append
/docs
to the URL to get the Swagger UI interactive testing page - Expand the POST section and click
Try it out
- Specify a question:
What camping stove should I get?
- Specify a customer_id: try 1 ("John Smith")
- Specify chat_history: leave it at
[]
for now
- Specify a question:
Note: this is the same question we tried in Step 3. Did you see the difference in the output?
Challenge: Try making other changes to the prompty file or the get_request
function and observe impact.
CONGRATULATIONS. You tested code changes to the Prompty asset, live.