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
We do not guarantee compatibility or correct operation with higher versions. Refer to the following announcement for additional information: [DevExpress.AIIntegration moves to a stable version](https://supportcenter.devexpress.com/ticket/details/t1292705/devexpress-aiintegration-references-stable-versions-of-microsoft-ai-packages).
31
+
We cannot guarantee compatibility or correct execution with newer versions. Refer to the following announcement for additional information: [DevExpress.AIIntegration moves to a stable version](https://supportcenter.devexpress.com/ticket/details/t1292705/devexpress-aiintegration-references-stable-versions-of-microsoft-ai-packages).
This section introduces the key code blocks used in the example and how they work together to deliver a complete AI chat experience.
51
+
This section introduces key code blocks used in the example and how they work together to deliver a complete AI chat experience.
53
52
54
53
### Inference Parameters
55
54
56
-
Inference parameters are runtime settings that control how a model generates an output. You can use them to change creativity, length, or randomness of a response without retraining the model.
55
+
Inference parameters are runtime settings that control how a model generates output. You can use them to change creativity, length, or randomness of a response without retraining the model.
57
56
58
57
This example allows the user to control model [temperature](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.Temperature).
59
58
@@ -84,7 +83,7 @@ This example allows the user to control model [temperature](https://docs.devexpr
84
83
85
84
A [token](https://platform.openai.com/tokenizer) is a basic unit of text that an AI model reads/writes. A token can be a whole word, part of a word, or a punctuation mark.
86
85
87
-
OpenAI [bills](https://openai.com/api/pricing/) you for the total token count. To save money, [set](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MaxTokens) a maximum number of tokens. A token limit also helps you stay within the model's context window, which ensures the AI retains earlier parts of the conversation.
86
+
OpenAI [bills](https://openai.com/api/pricing/) you for the total token count. To save money, [set](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MaxTokens) a maximum number of tokens. A token limit also helps you stay within the model's context window, which ensures AI retains earlier parts of the conversation.
@@ -113,7 +112,7 @@ OpenAI [bills](https://openai.com/api/pricing/) you for the total token count. T
113
112
114
113
To maintain data privacy, remove Personally Identifiable Information (PII) from your prompts. This practice ensures that sensitive details, such as email addresses or credit card numbers, do not reach external servers.
115
114
116
-
Handle the [MessageSent](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MessageSent) event to override the automatic message delivery and preprocess the messages before they are sent to OpenAI.
115
+
Handle the [MessageSent](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MessageSent) event to override the automatic message delivery and preprocess messages before they are sent to OpenAI.
117
116
118
117
```razor
119
118
<DxAIChat MessageSent="@MessageSent">
@@ -141,9 +140,9 @@ After the message is processed, call [SendMessage](https://docs.devexpress.com/B
141
140
142
141
### AI Instructions
143
142
144
-
System prompts define instructions and boundaries for the AI, which restrict the model's focus to a specific role. This prevents the model from "chatting" with the user.
143
+
System prompts define instructions and boundaries for AI, which restrict the model's focus to a specific role. This prevents the model from "chatting" with the user.
145
144
146
-
This example establishes the AI as a proofreader with expert English skills. This specific identity ensures that the model fixes all grammar and punctuation errors and enhance the clarity and flow of the sentences.
145
+
This example establishes AI as the proofreader with expert English skills. This specific identity ensures that the model fixes all grammar and punctuation errors and enhances clarity/sentence flow.
147
146
148
147
```text
149
148
You are a proofreader with excellent English skills. Your tasks:
@@ -213,7 +212,7 @@ Set the [ResponseContentFormat](https://docs.devexpress.com/Blazor/DevExpress.AI
213
212
```
214
213
215
214
> [!IMPORTANT]
216
-
> Always sanitize HTML generated from Markdown to prevent cross-site scripting (XSS). Use a trusted sanitizer (for example, the [HtmlSanitizer](https://www.nuget.org/packages/HtmlSanitizer/) package) to allow only safe tags and attributes before the browser renders content.
215
+
> Always sanitize HTML generated from Markdown to prevent cross-site scripting (XSS) attacks. Use a trusted sanitizer (for example, the [HtmlSanitizer](https://www.nuget.org/packages/HtmlSanitizer/) package) to allow only safe tags and attributes before the browser renders content.
0 commit comments