Skip to content

Commit 2b5a1e6

Browse files
990970: AI-Samples documentation
1 parent 16e1d56 commit 2b5a1e6

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

blazor/smart-ai-solutions/ai-samples/kanban/sentiment-analysis.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,6 @@ If the AI service fails to return a valid response, the Kanban will display an e
520520
- **Network Issues**: Check connectivity to the AI service endpoint, especially for self-hosted Ollama instances.
521521
- **Large Prompts**: Processing large text inputs may cause timeouts. Consider reducing the prompt size or optimizing the request for efficiency.
522522

523-
## Performance Considerations
524-
525-
When handling large text content, ensure the Ollama server has sufficient resources (CPU/GPU) to process requests efficiently. For long-form content or batch operations, consider splitting the input into smaller segments to avoid performance bottlenecks. Test the application with your specific use case to determine optimal performance.
526-
527523
## Sample Code
528524

529525
A complete working example is available in the [Syncfusion Blazor AI Samples GitHub repository](https://github.com/syncfusion/smart-ai-samples).

blazor/smart-ai-solutions/ai-samples/kanban/smart-task-suggestion.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,6 @@ If the AI service fails to return a valid response, the Kanban will display an e
573573
- **Network Issues**: Check connectivity to the AI service endpoint, especially for self-hosted Ollama instances.
574574
- **Large Prompts**: Processing large text inputs may cause timeouts. Consider reducing the prompt size or optimizing the request for efficiency.
575575

576-
## Performance Considerations
577-
578-
When handling large text content, ensure the Ollama server has sufficient resources (CPU/GPU) to process requests efficiently. For long-form content or batch operations, consider splitting the input into smaller segments to avoid performance bottlenecks. Test the application with your specific use case to determine optimal performance.
579-
580576
## Sample Code
581577

582578
A complete working example is available in the [Syncfusion Blazor AI Samples GitHub repository](https://github.com/syncfusion/smart-ai-samples).

blazor/smart-ai-solutions/ai-samples/rich-text-editor/writting-assistance.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,17 @@ await builder.Build().RunAsync();
228228
{% endhighlight %}
229229
{% endtabs %}
230230

231-
## Razor Component
231+
## AI-powered Rich Text Editor in Blazor
232232

233-
This section implements the Syncfusion Blazor Rich Text Editor with AI-powered content assistance features such as rephrase, correct grammar, summarize, elaborate, and translate.
233+
The Syncfusion Blazor Rich Text Editor can integrate AI features to help users create better content. It supports grammar correction, rephrasing for clarity, summarizing long text, elaborating short text, and translating content into different languages. These features work by sending selected text to an AI service and updating the editor with improved content.
234+
235+
### How AI Works in Rich Text Editor
236+
237+
When a user selects text and chooses an AI option, the editor captures the text and opens a dialog. The dialog shows the original text and a placeholder for AI-generated content. The selected text and chosen action are sent to the AI service, which processes the request and returns the result. Users can then regenerate, copy, or replace the content in the editor.
238+
239+
### UI Implementation in Razor (`Home.razor`)
240+
241+
The Razor file sets up the Rich Text Editor with custom toolbar items for AI actions. It includes an AI Assistant dropdown for options like Rephrase, Summarize, and Translate, and a dialog to display AI suggestions. Additional UI elements like chips for tone and dropdowns for language selection make the experience interactive.
234242

235243
(`Home.razor`)
236244

@@ -388,6 +396,10 @@ This section implements the Syncfusion Blazor Rich Text Editor with AI-powered c
388396

389397
```
390398

399+
### Backend Logic in C# (`Home.razor.cs`)
400+
401+
The C# file manages dialog visibility, button states, and AI calls. When an option is selected, `DialogueOpen()` captures the selected text and opens the dialog. `UpdateAISuggestionsData()` sends the query to the AI service and updates the UI with the result. Users can regenerate or replace content easily.
402+
391403
`Home.razor.cs`
392404

393405
```csharp
@@ -687,6 +699,10 @@ namespace AISamples.Components.Pages
687699

688700
```
689701

702+
## Workflow Summary
703+
704+
Select text → Choose AI action → Dialog opens → AI processes → Updated content displayed → User copies or replaces content.
705+
690706
## Error Handling and Troubleshooting
691707

692708
If the AI service fails to return a valid response, the Rich Text Editor will display an error message ("Oops! Please try again!"). Common issues include:
@@ -696,10 +712,6 @@ If the AI service fails to return a valid response, the Rich Text Editor will di
696712
- **Network Issues**: Check connectivity to the AI service endpoint, especially for self-hosted Ollama instances.
697713
- **Large Prompts**: Processing large text inputs may cause timeouts. Consider reducing the prompt size or optimizing the request for efficiency.
698714

699-
## Performance Considerations
700-
701-
When handling large text content, ensure the Ollama server has sufficient resources (CPU/GPU) to process requests efficiently. For long-form content or batch operations, consider splitting the input into smaller segments to avoid performance bottlenecks. Test the application with your specific use case to determine optimal performance.
702-
703715
## Sample Code
704716

705717
A complete working example is available in the [Syncfusion Blazor AI Samples GitHub repository](https://github.com/syncfusion/smart-ai-samples).

0 commit comments

Comments
 (0)