You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure OpenAI assistant trigger lets you run your code based on custom chat bot or skill request made to an assistant.
16
16
17
17
For information on setup and configuration details of the Azure OpenAI extension, see [Azure OpenAI extensions for Azure Functions](./functions-bindings-openai.md). To learn more about Azure OpenAI assistants, see [Azure OpenAI Assistants API](../ai-services/openai/concepts/assistants.md).
18
-
::: zone pivot="programming-language-javascript,programming-language-typescript"
19
-
> [!NOTE]
20
-
> References and examples are only provided for the [Node.js v4 model](./functions-reference-node.md?pivots=nodejs-model-v4).
21
-
::: zone-end
22
-
::: zone pivot="programming-language-python"
23
-
> [!NOTE]
24
-
> References and examples are only provided for the [Python v2 model](functions-reference-python.md?pivots=python-mode-decorators#development-options).
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.
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
31
+
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.
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.
57
+
58
+
Here's the _function.json_ file for Add Todo:
80
59
81
-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
The Azure OpenAI assistant create output binding allows you to create a new assistant chat bot from your function code execution.
16
16
17
17
For information on setup and configuration details of the Azure OpenAI extension, see [Azure OpenAI extensions for Azure Functions](./functions-bindings-openai.md). To learn more about Azure OpenAI assistants, see [Azure OpenAI Assistants API](../ai-services/openai/concepts/assistants.md).
18
-
::: zone pivot="programming-language-javascript,programming-language-typescript"
19
-
> [!NOTE]
20
-
> References and examples are only provided for the [Node.js v4 model](./functions-reference-node.md?pivots=nodejs-model-v4).
21
-
::: zone-end
22
-
::: zone pivot="programming-language-python"
23
-
> [!NOTE]
24
-
> References and examples are only provided for the [Python v2 model](functions-reference-python.md?pivots=python-mode-decorators#development-options).
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.
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.
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.
79
56
80
-
Here's the _function.json_ file for {{example}}:
57
+
Here's the _function.json_ file for Create Assistant:
81
58
82
-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
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.
@@ -163,5 +140,5 @@ See the [Example section](#example) for complete examples.
The Azure OpenAI assistant post input binding lets you send prompts to assistant chat bots.
16
16
17
-
For information on setup and configuration details of the Azure OpenAI extension, see [Azure OpenAI extensions for Azure Functions](./functions-bindings-openai.md). To learn more about Azure OpenAI assistants, see [Azure OpenAI Assistants API](../ai-services/openai/concepts/assistants.md).
18
-
::: zone pivot="programming-language-javascript,programming-language-typescript"
19
-
> [!NOTE]
20
-
> References and examples are only provided for the [Node.js v4 model](./functions-reference-node.md?pivots=nodejs-model-v4).
21
-
::: zone-end
22
-
::: zone pivot="programming-language-python"
23
-
> [!NOTE]
24
-
> References and examples are only provided for the [Python v2 model](functions-reference-python.md?pivots=python-mode-decorators#development-options).
25
-
::: zone-end
17
+
For information on setup and configuration details of the Azure OpenAI extension, see [Azure OpenAI extensions for Azure Functions](./functions-bindings-openai.md). To learn more about Azure OpenAI assistants, see [Azure OpenAI Assistants API](../ai-services/openai/
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.
:::code language="java" source="~/functions-openai-extension/samples/{{link to the correct sample.java}}" range="{{named is better than range}}":::
31
+
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.
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.
56
+
57
+
Here's the _function.json_ file for post user query:
80
58
81
-
:::code language="json" source="~/functions-openai-extension/samples/{{link to the correct function.json}}" :::
:::code language="powershell" source="~/functions-openai-extension/samples/{{link to the correct sample.ps1}}" :::
88
-
-->
89
65
::: zone-end
90
66
::: zone pivot="programming-language-python"
91
67
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.
@@ -164,5 +140,5 @@ See the [Example section](#example) for complete examples.
0 commit comments