microsoft / PubSec-Info-Assistant

Information Assistant, built with Azure OpenAI Service, Industry Accelerator
MIT License
263 stars 519 forks source link

How to upgrade from gpt-35-turbo-16k to gpt-4o #744

Open rashodqaim opened 3 weeks ago

rashodqaim commented 3 weeks ago

I have a simple question, I am trying to upgrade the IA tool from gpt-35-turbo-16k to gpt-4o, without creating a whole new IA tool. There is already a lot of data inside the tool and people using it, so I don't want to deploy a new IA tool add the information back in and give everyone access to it again. The CodeSpace I use to create this is shut down as well. Documentation on how to this upgrade would be perfect.

dayland commented 2 weeks ago

Switching out GPT models is fairly easy to do on a running IA system. It involves the following steps:

  1. Log into the Azure Portal
  2. Navigate to the IA web app App Service (infoasst-web-xxxxx).
  3. Open the Environment Variables or Configuration blade (depends on the Azure Portal version)
  4. Update the following settings with the new values you want to target
    • AZURE_OPENAI_CHATGPT_DEPLOYMENT (required)
    • You only need to update the following if you provided these in your local.env
      • AZURE_OPENAI_CHATGPT_MODEL_NAME
      • AZURE_OPENAI_CHATGPT_MODEL_VERSION
  5. Save the settings changes.
  6. Navigate back to the Overview blade and Restart the App Service.

Once the App Service has restarted the web app should be up and using your new model deployment.

NOTE: You will need to manually deploy the "gpt-4o" model to your instance of Azure OpenAI. IA does not currently support deploying gpt-4o model directly.

Fipeek commented 2 weeks ago

I think I have follow-up question for this ticket. Yesterday I tried to change the open AI service that I use in the infoasst-web app service. I changed the env variables:

However after the restart I'm getting application error, also on the other hand I noticed that my Azure AI service and previous (created by initial deployment) Azure Open AI service is using the same Endpoint URL.

My question is why am I getting the error after updating the env variables

rayxfelipe commented 2 weeks ago

I am also seeing errors and inconsistencies when updating env variables.

dayland commented 2 weeks ago

If your Azure OpenAI instance is in another resource group, you may need to assign permissions to read properties from it.

Assign the role "Cognitive Services OpenAI User" to the service principal named "infoasst_mgmt_access_xxxx" that matches your Info Assistant deployment on the resource group where AOAI is or directly on the AOAI instance.

Fipeek commented 2 weeks ago

My OpenAI instance is in the same resource group but it's another instance (not the initial one created by the make deploy script)