Skip to content

Commit

Permalink
Doc update: Open AI -> OpenAI
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchao1230 committed Jul 5, 2024
1 parent ed8c8a3 commit e2cc32a
Show file tree
Hide file tree
Showing 107 changed files with 394 additions and 394 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
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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 |
Expand Down
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
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/manage-connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/connections/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>'
Expand Down
10 changes: 5 additions & 5 deletions examples/connections/connection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -160,7 +160,7 @@
"metadata": {},
"source": [
"## Update a connection\n",
"### Update an Azure Open AI connection"
"### Update an Azure OpenAI connection"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/flex-flows/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-async-stream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/flex-flows/chat-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/flex-flows/chat-stream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/flex-flows/chat-with-functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/flex-flows/eval-checklist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/flex-flows/eval-code-quality/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
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
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"\n",
"Connection in prompt flow is for managing settings of your application behaviors incl. how to talk to different services (Azure OpenAI for example).\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.\n",
"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.\n",
"\n",
"Please go to [workspace portal](https://ml.azure.com/), click `Prompt flow` -> `Connections` -> `Create`, then follow the instruction to create your own connections. \n",
"Learn more on [connections](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/concept-connections?view=azureml-api-2)."
Expand Down
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
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit e2cc32a

Please sign in to comment.