Open
Description
Description
There's currently no example of how one would deploy a basic copilot or a copilot connected to a custom OAI model.
Example Details
- Proposed Name: 201-Copilot (and possibly a second 201-Copilot-OAI)
- Estimated complexity/effort: Moderate
- Related resources/data sources: powerplatform_data_record
Potential Terraform Configuration
# Sample Terraform config that describes how the new resource might look.
# NOTE this HCL only includes the key resource creations and omits various datasource blocks that would also be required for metadata exchange between steps.
# 1. Deploy custom model Azure resource, either private or public (this one is private)
# Based on https://github.com/Azure/terraform-azurerm-openai
resource "openai" "custom_model" {
source = "todo"
resource_group_name = "todo"
location = "todo"
private_endpoiunt = { todo }
deployment = {
"gpt-35-turbo" = {
name = "gpt-35-turbo"
model_format = "OpenAI"
model_name = "gpt-35-turbo"
model_version = "0301"
scale_type = "Standard"
},
}
depends_on = [
azurerm_resource_group.this
]
}
# 1.5 Update/validate Tenant and Power Platform Environment settings
# Several settings need to be updated in a default environment before a Copilot can be successfully deployed and configured. Existing powerplatform_environment* and powerplatform_application* resources should be able to handle this.
# 2. Create a new connection
# TBD on how we end up doing this but we know we need to hit
# https://{your_environment_details_here}.environment.api.powerplatform.com/connectivity/connectors/shared_azureopenai/connections/{your_connection_guid_here}?api-version={preferred_API_version_here}
# with the existing PPTP SP permissions PLUS the PowerApps.Apps.Play delegated permission. Payload properties are a connectionParameters object and an environment object.
# 3. Create a DV record for a new copilot
resource "powerplatform_data_record" "copilot_creation_record" {
environment_id = var.environment_id
table_logical_name = "bot"
columns = {
name = "Example Copilot Deployment"
configuration =
"{
"$kind": "BotConfiguration",
"gPTSettings": {
"$kind": "GPTSettings",
"defaultSchemaName": "crc93_powerPlatformConnectionViewer.gpt.default"
},
"aISettings": {
"$kind": "AISettings",
"useModelKnowledge": true
}
}
}"
}
Definition of Done
- Example in the /examples/quickstarts folder
- Example documentation in README.md.tmpl
- Updated auto-generated provider docs with
make quickstarts
- Confirmation that you have manually tested this
Contributions
Do you plan to raise a PR to address this issue? YES