Skip to content

Commit

Permalink
Fix deployment by removing redis (#165)
Browse files Browse the repository at this point in the history
## Purpose
<!-- Describe the intention of the changes being proposed. What problem
does it solve or functionality does it add? -->
* ...

Redis is blocking `azd up` to work, so removing redis from bicep
temperorily before figuring out what's going wrong

## Does this introduce a breaking change?
<!-- Mark one with an "x". -->
```
[x] Yes
[ ] 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
[ ] 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 [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
```

* Test the code
<!-- Add steps to run the tests suite and/or manually test -->
```
```

## What to Check
Verify that the following are valid
* ...

## Other Information
<!-- Add any other helpful information that may be needed here. -->
  • Loading branch information
LittleLittleCloud authored Sep 28, 2023
1 parent d74cef4 commit b14d971
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
5 changes: 3 additions & 2 deletions app/backend/Services/ReadRetrieveReadChatService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ standard plan AND dental AND employee benefit.

if (string.IsNullOrEmpty(documentContents))
{
documentContents = "no source available";
documentContents = "no source available.";
}

Console.WriteLine(documentContents);
// step 3
// put together related docs and conversation history to generate answer
var answerChat = chat.CreateNewChat($@"You are a system assistant who helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers");
Expand All @@ -111,7 +112,7 @@ standard plan AND dental AND employee benefit.
You answer needs to be a json object with the following format.
{{
""answer"": // the answer to the question, remember to reference the source for each fact you use in the response. e.g. Apple is a fruit[reference1.pdf]. If no source is provided, put the answer as I don't know.
""answer"": // the answer to the question, add a source reference to the end of each sentence. e.g. Apple is a fruit [reference1.pdf]. If no source available, put the answer as I don't know.
""thoughts"": // brief thoughts on how you came up with the answer, e.g. what sources you used, what you thought about, etc.
}}");

Expand Down
29 changes: 15 additions & 14 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -248,23 +248,24 @@ module web './app/web.bicep' = {
openAiEndpoint: openAi.outputs.endpoint
openAiChatGptDeployment: chatGptDeploymentName
openAiEmbeddingDeployment: embeddingDeploymentName
serviceBinds: [ redis.outputs.serviceBind ]
// serviceBinds: [ redis.outputs.serviceBind ]
serviceBinds: []
}
}

// this launches a redis instance inside of the ACA env
module redis 'core/host/container-app.bicep' = {
name: 'redis'
scope: resourceGroup
params: {
name: 'redis'
location: location
tags: updatedTags
containerAppsEnvironmentName: containerApps.outputs.environmentName
containerRegistryName: containerApps.outputs.registryName
serviceType: 'redis'
}
}
// module redis 'core/host/container-app.bicep' = {
// name: 'redis'
// scope: resourceGroup
// params: {
// name: 'redis'
// location: location
// tags: updatedTags
// containerAppsEnvironmentName: containerApps.outputs.environmentName
// containerRegistryName: containerApps.outputs.registryName
// serviceType: 'redis'
// }
// }

// Monitor application with Azure Monitor
module monitoring 'core/monitor/monitoring.bicep' = {
Expand Down Expand Up @@ -496,7 +497,7 @@ output AZURE_OPENAI_EMBEDDING_DEPLOYMENT string = embeddingDeploymentName
output AZURE_OPENAI_ENDPOINT string = openAi.outputs.endpoint
output AZURE_OPENAI_RESOURCE_GROUP string = openAiResourceGroup.name
output AZURE_OPENAI_SERVICE string = openAi.outputs.name
output AZURE_REDIS_CACHE string = redis.outputs.name
// output AZURE_REDIS_CACHE string = redis.outputs.name
output AZURE_RESOURCE_GROUP string = resourceGroup.name
output AZURE_SEARCH_INDEX string = searchIndexName
output AZURE_SEARCH_SERVICE string = searchService.outputs.name
Expand Down

0 comments on commit b14d971

Please sign in to comment.