Skip to content

Commit

Permalink
Remove remnants of planners in scripts (#841)
Browse files Browse the repository at this point in the history
### Motivation and Context
There is some dead code related to planners in scripts

### Description
Remove dead code

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
  • Loading branch information
glahaye authored Mar 6, 2024
1 parent c8ec42d commit d939122
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
2 changes: 0 additions & 2 deletions scripts/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

# Default values
ENV_COMPLETION_MODEL_OPEN_AI="gpt-3.5-turbo"
ENV_PLANNER_MODEL_OPEN_AI="gpt-3.5-turbo"
ENV_COMPLETION_MODEL_AZURE_OPEN_AI="gpt-35-turbo"
ENV_PLANNER_MODEL_AZURE_OPEN_AI="gpt-35-turbo"
ENV_EMBEDDING_MODEL="text-embedding-ada-002"
ENV_ASPNETCORE="Development"
ENV_INSTANCE="https://login.microsoftonline.com"
Expand Down
19 changes: 3 additions & 16 deletions scripts/Configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Configure user secrets, appsettings.Development.json, and webapp/.env for Chat Copilot.
.PARAMETER AIService
The service type used: OpenAI or Azure OpenAI.
The service type used: OpenAI or AzureOpenAI.
.PARAMETER APIKey
The API key for the AI service.
Expand All @@ -17,9 +17,6 @@ The chat completion model to use (e.g., gpt-3.5-turbo or gpt-4).
.PARAMETER EmbeddingModel
The embedding model to use (e.g., text-embedding-ada-002).
.PARAMETER PlannerModel
The chat completion model to use for planning (e.g., gpt-3.5-turbo or gpt-4).
.PARAMETER FrontendClientId
The client (application) ID associated with your frontend's AAD app registration.
Expand Down Expand Up @@ -51,9 +48,6 @@ param(
[Parameter(Mandatory = $false)]
[string]$EmbeddingModel,

[Parameter(Mandatory = $false)]
[string]$PlannerModel,

[Parameter(Mandatory = $false)]
[string] $FrontendClientId,

Expand All @@ -74,21 +68,17 @@ $varScriptFilePath = Join-Path "$PSScriptRoot" 'Variables.ps1'
# Set remaining values from Variables.ps1
if ($AIService -eq $varOpenAI) {
if (!$CompletionModel) {
Write-Host "No completion model provided - Defaulting to $varCompletionModelOpenAI"
$CompletionModel = $varCompletionModelOpenAI
}
if (!$PlannerModel) {
$PlannerModel = $varPlannerModelOpenAI
}

# TO DO: Validate model values if set by command line.
}
elseif ($AIService -eq $varAzureOpenAI) {
if (!$CompletionModel) {
Write-Host "No completion model provided - Defaulting to $varCompletionModelAzureOpenAI"
$CompletionModel = $varCompletionModelAzureOpenAI
}
if (!$PlannerModel) {
$PlannerModel = $varPlannerModelAzureOpenAI
}

# TO DO: Validate model values if set by command line.

Expand Down Expand Up @@ -177,9 +167,6 @@ $appsettingsOverrides = @{
Scopes = $varScopes
}
};
Planner = @{
Model = $PlannerModel
};
KernelMemory = @{
TextGeneratorType = $AIService;
DataIngestion = @{
Expand Down
2 changes: 0 additions & 2 deletions scripts/Variables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

# Default values
$varCompletionModelOpenAI = "gpt-3.5-turbo"
$varPlannerModelOpenAI = "gpt-3.5-turbo"
$varCompletionModelAzureOpenAI = "gpt-35-turbo"
$varPlannerModelAzureOpenAI = "gpt-35-turbo"
$varEmbeddingModel = "text-embedding-ada-002"
$varASPNetCore = "Development"
$varInstance = "https://login.microsoftonline.com"
Expand Down
14 changes: 0 additions & 14 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--plannermodel)
PLANNER_MODEL="$2"
shift
shift
;;
-fc | --frontend-clientid)
FRONTEND_CLIENT_ID="$2"
shift
Expand Down Expand Up @@ -111,17 +106,11 @@ if [ "$AI_SERVICE" = "$ENV_OPEN_AI" ]; then
if [ -z "$COMPLETION_MODEL" ]; then
COMPLETION_MODEL="$ENV_COMPLETION_MODEL_OPEN_AI"
fi
if [ -z "$PLANNER_MODEL" ]; then
PLANNER_MODEL="$ENV_PLANNER_MODEL_OPEN_AI"
fi
# TO DO: Validate model values if set by command line.
else # elif [ "$AI_SERVICE" = "$ENV_AZURE_OPEN_AI" ]; then
if [ -z "$COMPLETION_MODEL" ]; then
COMPLETION_MODEL="$ENV_COMPLETION_MODEL_AZURE_OPEN_AI"
fi
if [ -z "$PLANNER_MODEL" ]; then
PLANNER_MODEL="$ENV_PLANNER_MODEL_AZURE_OPEN_AI"
fi
# TO DO: Validate model values if set by command line.
fi

Expand Down Expand Up @@ -194,9 +183,6 @@ APPSETTINGS_OVERRIDES="{
\"Scopes\": \"${ENV_SCOPES}\"
}
},
\"Planner\": {
\"Model\": \"${PLANNER_MODEL}\"
},
\"KernelMemory\": {
\"TextGeneratorType\": \"${AI_SERVICE}\",
\"DataIngestion\": {
Expand Down

0 comments on commit d939122

Please sign in to comment.