Skip to content

Commit

Permalink
fix cli issue (#53)
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? -->
* ...

## Does this introduce a breaking change?
<!-- Mark one with an "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. -->

Co-authored-by: Frank Liu <[email protected]>
  • Loading branch information
frankliu20 and FrankLiu4138 authored Sep 24, 2024
1 parent 6cd310c commit 93439b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/05_lab_openai/01.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To add AI capablities to the application, you need create an Azure OpenAI accoun
--custom-domain $OPEN_AI_SERVICE_NAME
```

2. Deploy language models in your Azure OpenAI service instance. Use the following commands to deploy two language models `text-embedding-ada-002` and `gpt-4`.
2. Deploy language models in your Azure OpenAI service instance. Use the following commands to deploy two language models `text-embedding-ada-002` and `gpt-4o`.
```bash
az cognitiveservices account deployment create \
--resource-group $RESOURCE_GROUP \
Expand All @@ -40,11 +40,11 @@ To add AI capablities to the application, you need create an Azure OpenAI accoun
az cognitiveservices account deployment create \
--resource-group $RESOURCE_GROUP \
--name $OPEN_AI_SERVICE_NAME \
--deployment-name gpt-4 \
--model-name gpt-4 \
--model-version 0613 \
--deployment-name gpt-4o \
--model-name gpt-4o \
--model-version 2024-05-13 \
--model-format OpenAI \
--sku-name "GlobalBatch" \
--sku-name "GlobalStandard" \
--sku-capacity 1
```

Expand Down
12 changes: 7 additions & 5 deletions docs/05_lab_openai/02.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ Deploy the sample ai servcie `chat-agent`, and explore the power of Azure Open A
```bash

APP_NAME=chat-agent
USER_ID=$(az identity show --resource-group $RESOURCE_GROUP --name $ACA_IDENTITY --query id --output tsv)
UMI_ID=$(az identity show --resource-group $RESOURCE_GROUP --name $ACA_IDENTITY --query id --output tsv)
CLIENT_ID=$(az identity show --resource-group $RESOURCE_GROUP --name $ACA_IDENTITY --query clientId --output tsv)

OPEN_AI_ENDPOINT=$(az cognitiveservices account show --name $OPEN_AI_SERVICE_NAME --resource-group $RESOURCE_GROUP --query properties.endpoint --output tsv)

az containerapp up \
az containerapp create \
--name $APP_NAME \
--resource-group $RESOURCE_GROUP \
--ingress external \
--target-port 8080 \
--environment $ACA_ENVIRONMENT \
--min-replicas 1 \
--artifact ./spring-petclinic-chat-agent/target/spring-petclinic-chat-agent-$VERSION.jar \
--user-assigned $USER_ID \
--env-vars SPRING_AI_AZURE_OPENAI_ENDPOINT=$OPEN_AI_ENDPOINT SPRING_AI_AZURE_OPENAI_CLIENT_ID=$USER_ID
--user-assigned $UMI_ID \
--env-vars SPRING_AI_AZURE_OPENAI_ENDPOINT=$OPEN_AI_ENDPOINT SPRING_AI_AZURE_OPENAI_CLIENT_ID=$CLIENT_ID \
--runtime java
```
```

2. Run the bellow command to get the FQDN off the application.

Expand Down

0 comments on commit 93439b3

Please sign in to comment.