Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Installation

Project Initialization

  1. Create a new folder and switch to it in the terminal
  2. 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:

    1. Copy the URL.
    2. Run curl '<pasted url>' (URL in quotes) in a new Visual Studio Code terminal.

    In the original terminal, the login should now succeed.

  3. 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
  4. Execute the following command:

  5. 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.
  6. 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: Endpoint

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.