Skip to content

Commit 6bc2752

Browse files
DOlianaDenis Oliana
andauthored
describe DATASOURCE_TYPE & enable prompt flow even when AZURE_OPENAI_STREAM=true (#991)
Co-authored-by: Denis Oliana <denis.oliana@microsoft.com>
1 parent fda2173 commit 6bc2752

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Please see the [section below](#add-an-identity-provider) for important informat
2929
1. Copy `.env.sample` to a new file called `.env` and configure the settings as described in the [Environment variables](#environment-variables) section.
3030

3131
These variables are required:
32-
- `AZURE_OPENAI_RESOURCE`
32+
- `AZURE_OPENAI_RESOURCE` or `AZURE_OPENAI_ENDPOINT`
3333
- `AZURE_OPENAI_MODEL`
3434
- `AZURE_OPENAI_KEY` (optional if using Entra ID)
3535

@@ -245,7 +245,7 @@ Note: settings starting with `AZURE_SEARCH` are only needed when using Azure Ope
245245
|AZURE_OPENAI_STOP_SEQUENCE||Up to 4 sequences where the API will stop generating further tokens. Represent these as a string joined with "|", e.g. `"stop1|stop2|stop3"`|
246246
|AZURE_OPENAI_SYSTEM_MESSAGE|You are an AI assistant that helps people find information.|A brief description of the role and tone the model should use|
247247
|AZURE_OPENAI_PREVIEW_API_VERSION|2024-02-15-preview|API version when using Azure OpenAI on your data|
248-
|AZURE_OPENAI_STREAM|True|Whether or not to use streaming for the response|
248+
|AZURE_OPENAI_STREAM|True|Whether or not to use streaming for the response. Note: Setting this to true prevents the use of prompt flow.|
249249
|AZURE_OPENAI_EMBEDDING_NAME||The name of your embedding model deployment if using vector search.
250250
|UI_TITLE|Contoso| Chat title (left-top) and page title (HTML)
251251
|UI_LOGO|| Logo (left-top). Defaults to Contoso logo. Configure the URL to your logo image to modify.
@@ -262,6 +262,8 @@ Note: settings starting with `AZURE_SEARCH` are only needed when using Azure Ope
262262
|PROMPTFLOW_REQUEST_FIELD_NAME|query|Default field name to construct Promptflow request. Note: chat_history is auto constucted based on the interaction, if your API expects other mandatory field you will need to change the request parameters under `promptflow_request` function.|
263263
|PROMPTFLOW_RESPONSE_FIELD_NAME|reply|Default field name to process the response from Promptflow request.|
264264
|PROMPTFLOW_CITATIONS_FIELD_NAME|documents|Default field name to process the citations output from Promptflow request.|
265+
|DATASOURCE_TYPE||Type of data source to use for using the 'on-your-data' api. Can be `AzureCognitiveSearch`, `AzureCosmosDB`, `Elasticsearch`, `Pinecone`, `AzureMLIndex`, `AzureSqlServer` or `None` |
266+
265267

266268
## Contributing
267269

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async def generate():
353353

354354
async def conversation_internal(request_body, request_headers):
355355
try:
356-
if app_settings.azure_openai.stream:
356+
if app_settings.azure_openai.stream and not app_settings.base_settings.use_promptflow:
357357
result = await stream_chat_request(request_body, request_headers)
358358
response = await make_response(format_as_ndjson(result))
359359
response.timeout = None

0 commit comments

Comments
 (0)