Skip to content

Commit 823d8f7

Browse files
Merge pull request #270124 from wangyuantao/yuantw/fun
Azure OpenAI On Your Data - function calls
2 parents c887a49 + 7e86c40 commit 823d8f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

articles/ai-services/openai/concepts/use-your-data.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,13 @@ You can send a streaming request using the `stream` parameter, allowing data to
460460

461461
When you chat with a model, providing a history of the chat will help the model return higher quality results. You don't need to include the `context` property of the assistant messages in your API requests for better response quality. See [the API reference documentation](../references/on-your-data.md#examples) for examples.
462462

463+
#### Function Calling
464+
465+
Some Azure OpenAI models allow you to define [tools and tool_choice parameters](../how-to/function-calling.md) to enable function calling. You can set up function calling through [REST API](../reference.md#chat-completions) `/chat/completions`. If both `tools` and [data sources](../references/on-your-data.md#request-body) are in the request, the following policy is applied.
466+
1. If `tool_choice` is `none`, the tools are ignored, and only the data sources are used to generate the answer.
467+
1. Otherwise, if `tool_choice` is not specified, or specified as `auto` or an object, the data sources are ignored, and the response will contain the selected functions name and the arguments, if any. Even if the model decides no function is selected, the data sources are still ignored.
468+
469+
If the policy above doesn't meet your need, please consider other options, for example: [prompt flow](/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow) or [Assistants API](../how-to/assistant.md).
463470

464471
## Token usage estimation for Azure OpenAI On Your Data
465472

0 commit comments

Comments
 (0)