Skip to content

Commit

Permalink
Describe openAIApiKey in more detail. Fixes #318 (#340)
Browse files Browse the repository at this point in the history
Improve the experience when running `azd up` by providing more context
on how to use the openAIApiKey parameter.

## Purpose
When following the
[Deployment](https://github.com/Azure-Samples/azure-search-openai-demo-csharp?tab=readme-ov-file#deployment)
instructions and running `azd up`, the user gets prompted to enter a
parameter without much context:
```
? Enter a value for the 'openAIApiKey' infrastructure parameter: [? for help]
```
In #318 [FBoucher](https://github.com/FBoucher) mentioned that the
parameter is optional and can be left empty. Sadly the hint doesn't say
that:
```
Hint: OpenAI API Key
```

## Does this introduce a breaking change?
<!-- Mark one with an "x". -->
```
[ ] Yes
[x] No
```

## Pull Request Type
What kind of change does this Pull Request introduce?

<!-- Please check the one that applies to this PR using "x". -->
```
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
```

## How to Test
- Get the code
```
git clone https://github.com/EdwinOtten/azure-search-openai-demo-csharp.git
cd [local directory]
git checkout feature/azd-up-improve-experience
```

- Test the code
- Follow the existing [Getting
Started](https://github.com/Azure-Samples/azure-search-openai-demo-csharp?tab=readme-ov-file#getting-started)
guide.

## What to Check
Verify that the following are valid:
- The hint for the openAIApiKey now says:
- _OpenAI API Key, leave empty to provision a new Azure OpenAI instance_
  • Loading branch information
EdwinOtten authored Aug 26, 2024
1 parent 63a490e commit d722ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ param webImageName string = ''
@description('Use Azure OpenAI service')
param useAOAI bool

@description('OpenAI API Key')
@description('OpenAI API Key, leave empty to provision a new Azure OpenAI instance')
param openAIApiKey string

@description('OpenAI Model')
Expand Down

0 comments on commit d722ba4

Please sign in to comment.