Skip to content

Commit

Permalink
Doc update: Open AI -> OpenAI (#3509)
Browse files Browse the repository at this point in the history
# Description

Make follow up change with this:
#3351

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
wangchao1230 authored Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f258d2c commit 5585d8d
Showing 106 changed files with 393 additions and 393 deletions.
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_async/node1.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
async def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call async
# sleep for 250ms to simulate OpenAI call async
await asyncio.sleep(0.25)
return "completed"
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_async/node2.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
async def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call async
# sleep for 250ms to simulate OpenAI call async
await asyncio.sleep(0.25)
return "completed"
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_async/node3.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
async def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call async
# sleep for 250ms to simulate OpenAI call async
await asyncio.sleep(0.25)
return "completed"
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_sync/node1.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call
# sleep for 250ms to simulate OpenAI call
time.sleep(0.25)
return "completed"
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_sync/node2.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call
# sleep for 250ms to simulate OpenAI call
time.sleep(0.25)
return "completed"
2 changes: 1 addition & 1 deletion benchmark/promptflow-serve/pf_flows/static_sync/node3.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
@tool
def my_python_tool(chat_history: list, question: str) -> str:

# sleep for 250ms to simulate open ai call
# sleep for 250ms to simulate OpenAI call
time.sleep(0.25)
return "completed"
6 changes: 3 additions & 3 deletions docs/concepts/concept-connections.md
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ Connections are for storing information about how to access external services li
- In your local development environment, the connections are persisted in your local machine with keys encrypted.
- In Azure AI, connections can be configured to be shared across the entire workspace. Secrets associated with connections are securely persisted in the corresponding Azure Key Vault, adhering to robust security and compliance standards.

Prompt flow provides a variety of pre-built connections, including Azure Open AI, Open AI, etc. These pre-built connections enable seamless integration with these resources within the built-in tools. Additionally, you have the flexibility to create custom connection types using key-value pairs, empowering them to tailor the connections to their specific requirements, particularly in Python tools.
Prompt flow provides a variety of pre-built connections, including Azure OpenAI, OpenAI, etc. These pre-built connections enable seamless integration with these resources within the built-in tools. Additionally, you have the flexibility to create custom connection types using key-value pairs, empowering them to tailor the connections to their specific requirements, particularly in Python tools.

| Connection type | Built-in tools |
| ------------------------------------------------------------ | ------------------------------- |
| [Azure Open AI](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service) | LLM or Python |
| [Open AI](https://openai.com/) | LLM or Python |
| [Azure OpenAI](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service) | LLM or Python |
| [OpenAI](https://openai.com/) | LLM or Python |
| [Cognitive Search](https://azure.microsoft.com/en-us/products/search) | Vector DB Lookup or Python |
| [Serp](https://serpapi.com/) | Serp API or Python |
| [Serverless](https://learn.microsoft.com/en-us/azure/ai-studio/concepts/deployments-overview#deploy-models-with-model-as-a-service-maas) | LLM or Python |
2 changes: 1 addition & 1 deletion docs/how-to-guides/develop-a-dag-flow/quick-start.md
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@ We need to set up the connection if we haven't added it before. Once created, th

Firstly we need a connection yaml file `connection.yaml`:

If you are using Azure Open AI, prepare your resource follow with this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
If you are using Azure OpenAI, prepare your resource follow with this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
```yaml
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/AzureOpenAIConnection.schema.json
name: open_ai_connection
4 changes: 2 additions & 2 deletions docs/how-to-guides/manage-connections.md
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ On the VS Code primary sidebar > prompt flow pane. You can find the connections
:sync: CLI
The commands below show how to update existing connections with new values:
```bash
# Update an azure open ai connection with a new api base
# Update an azure OpenAI connection with a new api base
pf connection update -n my_azure_open_ai_connection --set api_base='new_value'
# Update a custom connection
pf connection update -n my_custom_connection --set configs.other_config='new_value'
@@ -120,7 +120,7 @@ pf connection update -n my_custom_connection --set configs.other_config='new_val
:sync: SDK
The code snippet below shows how to update existing connections with new values:
```python
# Update an azure open ai connection with a new api base
# Update an azure OpenAI connection with a new api base
connection = pf.connections.get(name="my_azure_open_ai_connection")
connection.api_base = "new_value"
connection.api_key = "<original-key>" # secrets are required when updating connection using sdk
2 changes: 1 addition & 1 deletion examples/connections/README.md
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ pf connection show --name custom_connection
- To update a connection that in workspace, execute following command. Currently only a few fields(description, display_name) support update:
```bash
# Update an existing connection with --set to override values
# Update an azure open ai connection with a new api base
# Update an azure OpenAI connection with a new api base
pf connection update -n open_ai_connection --set api_base='<your_api_base>'
# Update a custom connection
pf connection update -n custom_connection --set configs.key1='<your_new_key>' secrets.key2='<your_another_key>'
10 changes: 5 additions & 5 deletions examples/connections/connection.ipynb
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@
"source": [
"# Connection Management\n",
"\n",
"Prompt flow provides various prebuilt connections, including Azure Open AI, Open AI, Azure Content Safety, etc. Prebuilt connections enable seamless integration with these resources within the built-in tools. \n",
"Prompt flow provides various prebuilt connections, including Azure OpenAI, OpenAI, Azure Content Safety, etc. Prebuilt connections enable seamless integration with these resources within the built-in tools. \n",
"\n",
"Additionally, users have the flexibility to create custom connection types using key-value pairs, empowering them to tailor the connections to their specific requirements, particularly in Python tools.\n",
"\n",
"Reach more details about connection types [here](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/concept-connections?view=azureml-api-2).\n",
"## Create different type of connections\n",
"We will use Azure Open AI connection and custom connection as example to show how to create connection with promptflow sdk."
"We will use Azure OpenAI connection and custom connection as example to show how to create connection with promptflow sdk."
]
},
{
@@ -57,9 +57,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Create an Azure Open AI connection\n",
"### Create an Azure OpenAI connection\n",
"\n",
"Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
"Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
]
},
{
@@ -160,7 +160,7 @@
"metadata": {},
"source": [
"## Update a connection\n",
"### Update an Azure Open AI connection"
"### Update an Azure OpenAI connection"
]
},
{
4 changes: 2 additions & 2 deletions examples/flex-flows/basic/README.md
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ pip install -r requirements.txt

## Run flow

- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

- Setup environment variables

Ensure you have put your azure open ai endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).
Ensure you have put your azure OpenAI endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).

```bash
cat ../.env
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-async-stream/README.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ See <a href="https://platform.openai.com/docs/api-reference/chat/create#chat/cre
## Run flow
- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Setup connection
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@
"\n",
"Above prompty uses connection `open_ai_connection` inside, we need to set up the connection if we haven't added it before. After created, it's stored in local db and can be used in any flow.\n",
"\n",
"Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
"Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
]
},
{
@@ -99,7 +99,7 @@
" conn = pf.connections.get(name=conn_name)\n",
" print(\"using existing connection\")\n",
"except:\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure Open AI resource.\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure OpenAI resource.\n",
" connection = AzureOpenAIConnection(\n",
" name=conn_name,\n",
" api_key=\"<your_AOAI_key>\",\n",
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-basic/README.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ See <a href="https://platform.openai.com/docs/api-reference/chat/create#chat/cre
## Run flow
- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Setup connection
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@
"\n",
"Above prompty uses connection `open_ai_connection` inside, we need to set up the connection if we haven't added it before. After created, it's stored in local db and can be used in any flow.\n",
"\n",
"Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
"Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
]
},
{
@@ -79,7 +79,7 @@
" conn = pf.connections.get(name=conn_name)\n",
" print(\"using existing connection\")\n",
"except:\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure Open AI resource.\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure OpenAI resource.\n",
" connection = AzureOpenAIConnection(\n",
" name=conn_name,\n",
" api_key=\"<your_AOAI_key>\",\n",
4 changes: 2 additions & 2 deletions examples/flex-flows/chat-minimal/README.md
Original file line number Diff line number Diff line change
@@ -24,11 +24,11 @@ See <a href="https://platform.openai.com/docs/api-reference/chat/create#chat/cre

## Run flow

- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

- Setup environment variables

Ensure you have put your azure open ai endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).
Ensure you have put your azure OpenAI endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).

```bash
cat ../.env
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-stream/README.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ See <a href="https://platform.openai.com/docs/api-reference/chat/create#chat/cre
## Run flow
- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Setup connection
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@
"\n",
"Above prompty uses connection `open_ai_connection` inside, we need to set up the connection if we haven't added it before. After created, it's stored in local db and can be used in any flow.\n",
"\n",
"Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
"Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one."
]
},
{
@@ -99,7 +99,7 @@
" conn = pf.connections.get(name=conn_name)\n",
" print(\"using existing connection\")\n",
"except:\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure Open AI resource.\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure OpenAI resource.\n",
" connection = AzureOpenAIConnection(\n",
" name=conn_name,\n",
" api_key=\"<your_AOAI_key>\",\n",
4 changes: 2 additions & 2 deletions examples/flex-flows/chat-with-functions/README.md
Original file line number Diff line number Diff line change
@@ -22,11 +22,11 @@ pip install -r requirements.txt
## Getting started

### 1 prepare api_key env
- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

- Setup environment variables

Ensure you have put your azure open ai endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).
Ensure you have put your azure OpenAI endpoint key in [.env](../.env) file. You can create one refer to this [example file](../.env.example).

### 2 understand how chat model choose function
```shell
2 changes: 1 addition & 1 deletion examples/flex-flows/eval-checklist/README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ pip install -r requirements.txt

## Run flow

- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

- Setup connection

2 changes: 1 addition & 1 deletion examples/flex-flows/eval-code-quality/README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ pip install -r requirements.txt

## Run flow

- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

- Setup connection

2 changes: 1 addition & 1 deletion examples/flex-flows/eval-criteria-with-langchain/README.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ pip install -r requirements.txt

## Run flow

- Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
- Or prepare your Anthropic resource follow this [instruction](https://python.langchain.com/docs/integrations/platforms/anthropic/) and get your `api_key` if you don't have one.

- Setup connection
2 changes: 1 addition & 1 deletion examples/flows/chat/chat-with-pdf/chat-with-pdf.ipynb
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@
" conn = pf.connections.get(name=conn_name)\n",
" print(\"using existing connection\")\n",
"except:\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure Open AI resource.\n",
" # Follow https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal to create an Azure OpenAI resource.\n",
" connection = AzureOpenAIConnection(\n",
" name=conn_name,\n",
" api_key=\"<user-input>\",\n",
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ In this flow, you will learn

### 0. Setup connection

Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

```bash
# Override keys with --set to avoid yaml file changes
2 changes: 1 addition & 1 deletion examples/flows/evaluation/eval-groundedness/README.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Tools used in this flow:

### 0. Setup connection

Prepare your Azure Open AI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.
Prepare your Azure OpenAI resource follow this [instruction](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal) and get your `api_key` if you don't have one.

```bash
# Override keys with --set to avoid yaml file changes
Loading

0 comments on commit 5585d8d

Please sign in to comment.