Installation
Project Initialization
- Create a new folder and switch to it in the terminal
- Run
azd login
[!NOTE] if you are using a non-Microsoft account, and if running CodeSpaces in the browser, you will need to run:
azd login --tenant <your tenant id> --use-device-code=false
You may receive an error with message
localhost refused to connect
after logging in. If so:- Copy the URL.
- Run
curl '<pasted url>'
(URL in quotes) in a new Visual Studio Code terminal.
In the original terminal, the login should now succeed.
- Run
azd init -t azure-search-openai-demo
- For the target location, the regions that currently support the models used in this sample are East US or South Central US. For an up-to-date list of regions and models, check here
-
Execute the following command:
azd up
- This will provision Azure resources and deploy this sample to those resources, including building the search index based on the files found in the ./data folder.- After the application has been successfully deployed you will see a URL printed to the console. Click that URL to interact with the application in your browser.
It will look like the following:
NOTE: It may take a minute for the application to be fully deployed. If you see a “Python Developer” welcome screen, then wait a minute and refresh the page.
Once in the web app:
- Try different topics in chat or Q&A context. For chat, try follow up questions, clarifications, ask to simplify or elaborate on answer, etc.
- Explore citations and sources
- Click on “settings” to try different options, tweak prompts, etc.