Skip to content

Commit c979af4

Browse files
committed
Merge branch 'openai-bindings' of https://github.com/ggailey777/azure-docs-pr into openai-bindings
2 parents a6309d4 + c68d483 commit c979af4

6 files changed

+117
-137
lines changed

articles/azure-functions/functions-bindings-openai-assistant-trigger.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Azure OpenAI assistant trigger for Azure Functions
2+
title: Azure OpenAI Assistant Trigger for Azure Functions
33
description: Learn how to use the Azure OpenAI assistant trigger to execute code based on custom chat bots and skills in Azure Functions.
44
ms.topic: reference
55
ms.date: 05/07/2024
66
zone_pivot_groups: programming-languages-set-functions
77
---
88

9-
# Azure OpenAI assistant trigger for Azure Functions
9+
# Azure OpenAI Assistant Trigger for Azure Functions
1010

1111
[!INCLUDE [preview-support](../../includes/functions-openai-support-limitations.md)]
1212

@@ -35,22 +35,20 @@ This example demonstrates how to create an assistant that adds a new todo task t
3535

3636
:::code language="csharp" source="~/functions-openai-extension/samples/assistant/csharp-ooproc/AssistantSkills.cs" range="31-43" :::
3737

38-
### [In-process](#tab/in-process)
38+
<!-- ### [In-process](#tab/in-process)
3939
40-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
40+
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
4141

4242
---
4343

4444
::: zone-end
4545
::: zone pivot="programming-language-java"
46-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
47-
<!---uncomment when code example is available:
48-
{{This comes from the example code comment}}
4946

50-
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
47+
This example demonstrates how to create an assistant that adds a new todo task to a database. The trigger has a static description of `Create a new todo task` used by the model. The function itself takes a string, which represents a new task to add. When executed, the function adds the task as a new todo item in a custom item store and returns a response from the store.
48+
49+
50+
:::code language="java" source="~/functions-openai-extension/samples/assistant/java/src/main/java/com/azfs/AssistantSkills.java" range="27-43":::
5151

52-
{{Add more examples if available}}
53-
-->
5452
::: zone-end
5553
::: zone pivot="programming-language-javascript"
5654
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
@@ -70,20 +68,19 @@ This example demonstrates how to create an assistant that adds a new todo task t
7068

7169
::: zone-end
7270
::: zone pivot="programming-language-powershell"
73-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
74-
<!---uncomment when code example is available:
75-
{{This comes from the example code comment}}
7671

77-
Here's the _function.json_ file for {{example}}:
72+
This example demonstrates how to create an assistant that adds a new todo task to a database. The trigger has a static description of `Create a new todo task` used by the model. The function itself takes a string, which represents a new task to add. When executed, the function adds the task as a new todo item in a custom item store and returns a response from the store.
73+
74+
Here's the _function.json_ file for Add Todo:
7875

79-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
76+
:::code language="json" source="~/functions-openai-extension/samples/assistant/powershell/AddTodo/function.json" :::
8077

8178
For more information about *function.json* file properties, see the [Configuration](#configuration) section.
8279

83-
{{This comes from the example code comment}}
8480

85-
:::code language="powershell" source="~/functions-openai-extension/samples/{{link to the correct sample.ps1}}" :::
86-
-->
81+
:::code language="powershell" source="~/functions-openai-extension/samples/assistant/powershell/AddTodo/run.ps1" :::
82+
83+
8784
::: zone-end
8885
::: zone pivot="programming-language-python"
8986

@@ -175,8 +172,8 @@ When `parameterDescriptionJson` JSON value isn't provided, it's autogenerated. F
175172

176173
+ [Assistant samples](https://github.com/Azure/azure-functions-openai-extension/tree/main/samples/assistant)
177174
+ [Azure OpenAI extension](functions-bindings-openai.md)
178-
+ [Azure OpenAI assistant query input binding ](functions-bindings-openai-assistantcreate-output.md)
179-
+ [Azure OpenAI assistant create output binding ](functions-bindings-openai-assistantcreate-output.md)
180-
+ [Azure OpenAI assistant post input binding ](functions-bindings-openai-assistantpost-input.md)
175+
+ [Azure OpenAI assistant query input binding](functions-bindings-openai-assistantcreate-output.md)
176+
+ [Azure OpenAI assistant create output binding](functions-bindings-openai-assistantcreate-output.md)
177+
+ [Azure OpenAI assistant post input binding](functions-bindings-openai-assistantpost-input.md)
181178

182179

articles/azure-functions/functions-bindings-openai-assistantcreate-output.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Azure OpenAI assistant create output binding for Azure Functions
2+
title: Azure OpenAI Assistant Create Output Binding for Azure Functions
33
description: Learn how to use the Azure OpenAI assistant create output binding to create Azure OpenAI assistants from your function code executions.
44
ms.topic: reference
55
ms.date: 05/07/2024
66
zone_pivot_groups: programming-languages-set-functions
77
---
88

9-
# Azure OpenAI assistant create output binding for Azure Functions
9+
# Azure OpenAI Assistant Create Output Binding for Azure Functions
1010

1111
[!INCLUDE [preview-support](../../includes/functions-openai-support-limitations.md)]
1212

@@ -35,22 +35,21 @@ This example demonstrates the creation process, where the HTTP PUT function that
3535

3636
:::code language="csharp" source="~/functions-openai-extension/samples/assistant/csharp-ooproc/AssistantApis.cs" range="20-45":::
3737

38-
### [In-process](#tab/in-process)
38+
<!-- ### [In-process](#tab/in-process)
3939
40-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
40+
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
4141

4242
---
4343

4444
::: zone-end
4545
::: zone pivot="programming-language-java"
46-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
47-
<!---uncomment when code example is available:
48-
{{This comes from the example code comment}}
46+
<!-- [!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
47+
48+
This example demonstrates the creation process, where the HTTP PUT function that creates a new assistant chat bot with the specified ID. The response to the prompt is returned in the HTTP response.
49+
50+
:::code language="java" source="~/functions-openai-extension/samples/assistant/java/src/main/java/com/azfs/AssistantApis.java" range="33-58":::
4951

50-
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
5152

52-
{{Add more examples if available}}
53-
-->
5453
::: zone-end
5554
::: zone pivot="programming-language-javascript"
5655
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
@@ -71,19 +70,19 @@ This example demonstrates the creation process, where the HTTP PUT function that
7170

7271
::: zone-end
7372
::: zone pivot="programming-language-powershell"
74-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
75-
<!---uncomment when code example is available:
76-
{{This comes from the example code comment}}
73+
<!-- [!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
7774

78-
Here's the _function.json_ file for {{example}}:
75+
This example demonstrates the creation process, where the HTTP PUT function that creates a new assistant chat bot with the specified ID. The response to the prompt is returned in the HTTP response.
76+
77+
Here's the _function.json_ file for Create Assistant:
7978

80-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
79+
:::code language="json" source="~/functions-openai-extension/samples/assistant/powershell/CreateAssistant/function.json" :::
8180

8281
For more information about *function.json* file properties, see the [Configuration](#configuration) section.
8382

8483
{{This comes from the example code comment}}
85-
:::code language="powershell" source="~/functions-openai-extension/samples/{{link to the correct sample.ps1}}" :::
86-
-->
84+
:::code language="powershell" source="~/functions-openai-extension/samples/assistant/powershell/CreateAssistant/run.ps1" :::
85+
8786
::: zone-end
8887
::: zone pivot="programming-language-python"
8988
This example demonstrates the creation process, where the HTTP PUT function that creates a new assistant chat bot with the specified ID. The response to the prompt is returned in the HTTP response.
@@ -161,5 +160,5 @@ See the [Example section](#example) for complete examples.
161160
+ [Assistant samples](https://github.com/Azure/azure-functions-openai-extension/tree/main/samples/assistant)
162161
+ [Azure OpenAI extension](functions-bindings-openai.md)
163162
+ [Azure OpenAI assistant trigger](functions-bindings-openai-assistant-trigger.md)
164-
+ [Azure OpenAI assistant query input binding ](functions-bindings-openai-assistantcreate-output.md)
165-
+ [Azure OpenAI assistant post input binding ](functions-bindings-openai-assistantpost-input.md)
163+
+ [Azure OpenAI assistant query input binding](functions-bindings-openai-assistantcreate-output.md)
164+
+ [Azure OpenAI assistant post input binding](functions-bindings-openai-assistantpost-input.md)

articles/azure-functions/functions-bindings-openai-assistantpost-input.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Azure OpenAI assistant post input binding for Azure Functions
2+
title: Azure OpenAI Assistant Post Input Binding for Azure Functions
33
description: Learn how to use the Azure OpenAI assistant post input binding to query chat bots during function execution in Azure Functions.
44
ms.topic: reference
55
ms.date: 05/07/2024
66
zone_pivot_groups: programming-languages-set-functions
77
---
88

9-
# Azure OpenAI assistant post input binding for Azure Functions
9+
# Azure OpenAI Assistant Post Input Binding for Azure Functions
1010

1111
[!INCLUDE [preview-support](../../includes/functions-openai-support-limitations.md)]
1212

@@ -34,23 +34,20 @@ A C# function can be created using one of the following C# modes:
3434
This example demonstrates the creation process, where the HTTP POST function that sends user prompts to the assistant chat bot. The response to the prompt is returned in the HTTP response.
3535

3636
:::code language="csharp" source="~/functions-openai-extension/samples/assistant/csharp-ooproc/AssistantApis.cs" range="58-78":::
37-
37+
<!--
3838
### [In-process](#tab/in-process)
3939
40-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
40+
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
4141

4242
---
4343

4444
::: zone-end
4545
::: zone pivot="programming-language-java"
46-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
47-
<!---uncomment when code example is available:
48-
{{This comes from the example code comment}}
4946

50-
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
47+
This example demonstrates the creation process, where the HTTP POST function that sends user prompts to the assistant chat bot. The response to the prompt is returned in the HTTP response.
48+
49+
:::code language="java" source="~/functions-openai-extension/samples/assistant/java/src/main/java/com/azfs/AssistantApis.java" range="83-103":::
5150

52-
{{Add more examples if available}}
53-
-->
5451
::: zone-end
5552
::: zone pivot="programming-language-javascript"
5653
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
@@ -70,20 +67,17 @@ This example demonstrates the creation process, where the HTTP POST function tha
7067

7168
::: zone-end
7269
::: zone pivot="programming-language-powershell"
73-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
74-
<!---uncomment when code example is available:
75-
{{This comes from the example code comment}}
7670

77-
Here's the _function.json_ file for {{example}}:
71+
This example demonstrates the creation process, where the HTTP POST function that sends user prompts to the assistant chat bot. The response to the prompt is returned in the HTTP response.
72+
73+
Here's the _function.json_ file for post user query:
7874

79-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
75+
:::code language="json" source="~/functions-openai-extension/samples/assistant/powershell/PostUserQuery/function.json" :::
8076

8177
For more information about *function.json* file properties, see the [Configuration](#configuration) section.
8278

83-
{{This comes from the example code comment}}
79+
:::code language="powershell" source="~/functions-openai-extension/samples/assistant/powershell/PostUserQuery/run.ps1" :::
8480

85-
:::code language="powershell" source="~/functions-openai-extension/samples/{{link to the correct sample.ps1}}" :::
86-
-->
8781
::: zone-end
8882
::: zone pivot="programming-language-python"
8983
This example demonstrates the creation process, where the HTTP POST function that sends user prompts to the assistant chat bot. The response to the prompt is returned in the HTTP response.
@@ -162,5 +156,5 @@ See the [Example section](#example) for complete examples.
162156
+ [Assistant samples](https://github.com/Azure/azure-functions-openai-extension/tree/main/samples/assistant)
163157
+ [Azure OpenAI extension](functions-bindings-openai.md)
164158
+ [Azure OpenAI assistant trigger](functions-bindings-openai-assistant-trigger.md)
165-
+ [Azure OpenAI assistant query input binding ](functions-bindings-openai-assistantcreate-output.md)
166-
+ [Azure OpenAI assistant create output binding ](functions-bindings-openai-assistantcreate-output.md)
159+
+ [Azure OpenAI assistant query input binding](functions-bindings-openai-assistantcreate-output.md)
160+
+ [Azure OpenAI assistant create output binding](functions-bindings-openai-assistantcreate-output.md)

articles/azure-functions/functions-bindings-openai-assistantquery-input.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Azure OpenAI assistant query input binding for Azure Functions
2+
title: Azure OpenAI Assistant Query Input Binding for Azure Functions
33
description: Learn how to use the Azure OpenAI assistant query input binding to access Azure OpenAI Assistants APIs during function execution in Azure Functions.
44
ms.topic: reference
55
ms.date: 05/14/2024
66
zone_pivot_groups: programming-languages-set-functions
77
---
88

9-
# Azure OpenAI assistant query input binding for Azure Functions
9+
# Azure OpenAI Assistant Query Input Binding for Azure Functions
1010

1111
[!INCLUDE [preview-support](../../includes/functions-openai-support-limitations.md)]
1212

@@ -35,22 +35,21 @@ This example demonstrates the creation process, where the HTTP GET function that
3535

3636
:::code language="csharp" source="~/functions-openai-extension/samples/assistant/csharp-ooproc/AssistantApis.cs" range="74-83":::
3737

38-
### [In-process](#tab/in-process)
38+
<!-- ### [In-process](#tab/in-process)
3939
40-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
40+
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)] -->
4141

4242
---
4343

4444
::: zone-end
4545
::: zone pivot="programming-language-java"
46-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
47-
<!---uncomment when code example is available:
48-
{{This comes from the example code comment}}
4946

50-
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
47+
This example demonstrates the creation process, where the HTTP GET function that queries the conversation history of the assistant chat bot. The response to the prompt is returned in the HTTP response.
48+
49+
50+
:::code language="java" source="~/functions-openai-extension/samples/assistant/java/src/main/java/com/azfs/AssistantApis.java" range="63-78":::
51+
5152

52-
{{Add more examples if available}}
53-
-->
5453
::: zone-end
5554
::: zone pivot="programming-language-javascript"
5655
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
@@ -67,24 +66,22 @@ This example demonstrates the creation process, where the HTTP GET function that
6766

6867
This example demonstrates the creation process, where the HTTP GET function that queries the conversation history of the assistant chat bot. The response to the prompt is returned in the HTTP response.
6968

70-
:::code language="typescript" source="~/functions-openai-extension/samples/assistant/nodejs/src/functions/assistantApis.ts" range="53-67":::
69+
:::code language="typescript" source="~/functions-openai-extension/samples/assistant/nodejs/src/functions/assistantApis.ts" range="57-71":::
7170

7271
::: zone-end
7372
::: zone pivot="programming-language-powershell"
74-
[!INCLUDE [functions-examples-not-available-note](../../includes/functions-examples-not-available-note.md)]
75-
<!---uncomment when code example is available:
76-
{{This comes from the example code comment}}
7773

78-
Here's the _function.json_ file for {{example}}:
74+
This example demonstrates the creation process, where the HTTP GET function that queries the conversation history of the assistant chat bot. The response to the prompt is returned in the HTTP response.
7975

80-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
76+
77+
Here's the _function.json_ file for Get Chat State:
78+
79+
:::code language="json" source="~/functions-openai-extension/samples/assistant/powershell/GetChatState/function.json" :::
8180

8281
For more information about *function.json* file properties, see the [Configuration](#configuration) section.
8382

84-
{{This comes from the example code comment}}
83+
:::code language="powershell" source="~/functions-openai-extension/samples/assistant/powershell/GetChatState/run.ps1" :::
8584

86-
:::code language="powershell" source="~/functions-openai-extension/samples/{{link to the correct sample.ps1}}" :::
87-
-->
8885
::: zone-end
8986
::: zone pivot="programming-language-python"
9087
This example demonstrates the creation process, where the HTTP GET function that queries the conversation history of the assistant chat bot. The response to the prompt is returned in the HTTP response.

0 commit comments

Comments
 (0)