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
.png)
Copy file name to clipboardExpand all lines: docs/apis/phi-silica.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,22 +135,22 @@ This example shows how to generate a response to a Q&A prompt where the response
135
135
136
136
1. Create a **LanguageModel** object to reference the local language model. *A check has already been performed to ensure the Phi Silica language model is available on the user's device in the previous snippet.
137
137
138
-
1. Asynchronously retrieve the **LanguageModelResponse** in a call to **GenerateResponseWithProgressAsync**. Write it to the console as the response is generated.
138
+
1. Asynchronously retrieve the **LanguageModelResponseResult** in a call to **GenerateResponseAsync**. Write it to the console as the response is generated.
std::cout << "Response so far: " << asyncInfo.GetResults().Response << std::endl;
172
+
std::cout << "Response so far: " << asyncInfo.GetResults().Text << std::endl;
173
173
};
174
174
175
-
auto asyncOp = languageModel.GenerateResponseWithProgressAsync(prompt);
175
+
auto asyncOp = languageModel.GenerateResponseAsync(prompt);
176
176
177
177
asyncOp.Progress(progressHandler);
178
178
@@ -201,7 +201,7 @@ Phi Silica includes the ability to predefine text response formats for use in yo
201
201
| **LanguageModelSkill.Summarize** | Return a summary based on the prompt text. |
202
202
| **LanguageModelSkill.Rewrite** | Rewrite the prompt text response to improve clarity and comprehension. |
203
203
204
-
3. Then we asynchronously retrieve the **LanguageModelResponse** in a call to **GenerateResponseWithProgressAsync** and write it to the console as the response is generated.
204
+
3. Then we asynchronously retrieve the **LanguageModelResponseResult** in a call to **GenerateResponseAsync** and write it to the console as the response is generated.
0 commit comments