Azure / GPT-RAG

Sharing the learning along the way we been gathering to enable Azure OpenAI at enterprise scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/en-us/products/cognitive-services/openai-service
MIT License
773 stars 125 forks source link

Refactor raipolicies.sh to use sed instead of grep for parsing model Information #163

Closed pichuang closed 2 days ago

pichuang commented 3 days ago

Fixed #162

This pull request includes changes to the scripts/rai/raipolicies.sh file. The changes involve replacing grep commands with sed commands for parsing specific fields from a JSON string stored in the model variable. This change enhances the readability and maintainability of the code.

pichuang commented 3 days ago

Correct output

$ azd provision

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: subscription-project-openai (e5c7259b-cf08-4fff-92d4-9a836d986370)
Location: Japan East

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2Fe5c7259b-cf08-4fff-92d4-9a836d986370%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2F20240702-1719897683

  (✓) Done: Resource group: rg-20240702
  (✓) Done: Key Vault: kv0-g6pclrf6ozgf6
  (✓) Done: Application Insights: appins0-g6pclrf6ozgf6
  (✓) Done: App Service plan: appplan0-g6pclrf6ozgf6
  (✓) Done: Storage account: strag0g6pclrf6ozgf6
  (✓) Done: Cognitive Service: ai0-g6pclrf6ozgf6
  (✓) Done: Search service: search0-g6pclrf6ozgf6
  (✓) Done: Storage account: strag0g6pclrf6ozgf6ing
  (✓) Done: Storage account: strag0g6pclrf6ozgf6orc
  (✓) Done: Azure Cosmos DB: dbgpt0-g6pclrf6ozgf6
  (✓) Done: App Service: webgpt0-g6pclrf6ozgf6
  (✓) Done: Function App: fnorch0-g6pclrf6ozgf6
  (✓) Done: Function App: fninges0-g6pclrf6ozgf6
  (✓) Done: Azure OpenAI: oai0-g6pclrf6ozgf6
RAI Script: Setting up AOAI content filters & blocklist

SUCCESS: Your application was provisioned in Azure in 1 minute 42 seconds.
You can view the resources created under the resource group rg-20240702 in Azure Portal:
https://portal.azure.com/#@/resource/subscriptions/e5c7259b-cf08-4fff-92d4-9a836d986370/resourceGroups/rg-20240702/overview