Skip to content

Commit

Permalink
Update workflows, docs, typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Oct 2, 2024
1 parent 99474e8 commit 88d4d59
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .azdo/pipelines/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ steps:
AZURE_ADLS_GEN2_FILESYSTEM: $(AZURE_ADLS_GEN2_FILESYSTEM)
DEPLOYMENT_TARGET: $(DEPLOYMENT_TARGET)
AZURE_CONTAINER_APPS_WORKLOAD_PROFILE: $(AZURE_CONTAINER_APPS_WORKLOAD_PROFILE)

USE_CHAT_HISTORY_BROWSER: $(USE_CHAT_HISTORY_BROWSER)
- task: AzureCLI@2
displayName: Deploy Application
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
AZURE_ADLS_GEN2_FILESYSTEM: ${{ vars.AZURE_ADLS_GEN2_FILESYSTEM }}
DEPLOYMENT_TARGET: ${{ vars.DEPLOYMENT_TARGET }}
AZURE_CONTAINER_APPS_WORKLOAD_PROFILE: ${{ vars.AZURE_CONTAINER_APPS_WORKLOAD_PROFILE }}

USE_CHAT_HISTORY_BROWSER: ${{ vars.USE_CHAT_HISTORY_BROWSER }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ If you followed the steps above to install the pre-commit hooks, then you can ju
## Adding new azd environment variables

When adding new azd environment variables, please remember to update:

1. App Service's [azure.yaml](./azure.yaml)
1. [ADO pipeline](.azdo/pipelines/azure-dev.yml).
1. [Github workflows](.github/workflows/azure-dev.yml)
3 changes: 2 additions & 1 deletion app/backend/core/sessionhelper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import uuid
from typing import Union


def create_session_id(config_chat_history_browser_enabled: bool) -> str | None:
def create_session_id(config_chat_history_browser_enabled: bool) -> Union[str, None]:
if config_chat_history_browser_enabled:
return str(uuid.uuid4())
return None
1 change: 1 addition & 0 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ pipeline:
- AZURE_ADLS_GEN2_FILESYSTEM
- DEPLOYMENT_TARGET
- AZURE_CONTAINER_APPS_WORKLOAD_PROFILE
- USE_CHAT_HISTORY_BROWSER
secrets:
- AZURE_SERVER_APP_SECRET
- AZURE_CLIENT_APP_SECRET
Expand Down
11 changes: 11 additions & 0 deletions docs/deploy_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ You should typically enable these features before running `azd up`. Once you've
* [Using GPT-4](#using-gpt-4)
* [Using text-embedding-3 models](#using-text-embedding-3-models)
* [Enabling GPT-4 Turbo with Vision](#enabling-gpt-4-turbo-with-vision)
* [Enabling chat history](#enabling-chat-history)
* [Enabling language picker](#enabling-language-picker)
* [Enabling speech input/output](#enabling-speech-inputoutput)
* [Enabling Integrated Vectorization](#enabling-integrated-vectorization)
Expand Down Expand Up @@ -142,6 +143,16 @@ If you have already deployed:

This section covers the integration of GPT-4 Vision with Azure AI Search. Learn how to enhance your search capabilities with the power of image and text indexing, enabling advanced search functionalities over diverse document types. For a detailed guide on setup and usage, visit our [Enabling GPT-4 Turbo with Vision](gpt4v.md) page.

## Enabling chat history

This feature allows users to view the chat history of their conversation, stored in the browser using [IndexedDB](https://developer.mozilla.org/docs/Web/API/IndexedDB_API). That means the chat history will be available only on the device where the chat was initiated. To enable browser-stored chat history, run:

```shell
azd env set USE_CHAT_HISTORY_BROWSER true
```

In the future, we plan to add support for optionally storing chat history in a server-side storage such as Cosmos DB.

## Enabling language picker

You can optionally enable the language picker to allow users to switch between different languages. Currently, it supports English, Spanish, French, and Japanese.
Expand Down

0 comments on commit 88d4d59

Please sign in to comment.