Skip to content

Commit

Permalink
Azure OpenAI: sample/snippet update (request options for On Your Data) (
Browse files Browse the repository at this point in the history
Azure#44956)

* Update README.md

The 'options' is needed to use own data and  Search engine:

ChatCompletion completion = chatClient.CompleteChat(
    [
        new UserChatMessage("How to troubleshoot high cpu at user pool level"),
    ], options);

* sample->snippet update

---------

Co-authored-by: Liwei Yin <[email protected]>
  • Loading branch information
2 people authored and tejasm-microsoft committed Jul 22, 2024
1 parent c5a85fe commit fc3d3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sdk/openai/Azure.AI.OpenAI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ options.AddDataSource(new AzureSearchChatDataSource()
ChatCompletion completion = chatClient.CompleteChat(
[
new UserChatMessage("What are the best-selling Contoso products this month?"),
]);
],
options);

AzureChatMessageContext onYourDataContext = completion.GetAzureMessageContext();

Expand Down
3 changes: 2 additions & 1 deletion sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public void OnYourDataSearch()
ChatCompletion completion = chatClient.CompleteChat(
[
new UserChatMessage("What are the best-selling Contoso products this month?"),
]);
],
options);

AzureChatMessageContext onYourDataContext = completion.GetAzureMessageContext();

Expand Down

0 comments on commit fc3d3a0

Please sign in to comment.