Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions blazor/ai-assistview/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,39 @@ The [AttachmentRemoved](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
}
```

## AttachmentRemoving

The [AttachmentRemoving](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.InteractiveChat.SfAIAssistView.html#Syncfusion_Blazor_InteractiveChat_SfAIAssistView_AttachmentRemoving) event is triggered when an attached file is being removed in the AI AssistView.

```cshtml

@using Syncfusion.Blazor.InteractiveChat
@using Syncfusion.Blazor.Inputs

<div class="aiassist-container" style="height: 350px; width: 650px;">
<SfAIAssistView AttachmentRemoving="AttachmentRemoving" AttachmentSettings="attachmentSettings" PromptRequested="PromptRequest"></SfAIAssistView>
</div>

@code {
private void AttachmentRemoving(AttachmentRemovingEventArgs args)
{
// Your required action here
}
private AssistViewAttachmentSettings attachmentSettings = new AssistViewAttachmentSettings()
{
Enable = true,
SaveUrl = "https://blazor.syncfusion.com/services/production/api/FileUploader/Save",
RemoveUrl = "https://blazor.syncfusion.com/services/production/api/FileUploader/Remove"
};
private async Task PromptRequest(AssistViewPromptRequestedEventArgs args)
{
await Task.Delay(1000);
var defaultResponse = "For real-time prompt processing, connect the AI AssistView component to your preferred AI service, such as OpenAI or Azure Cognitive Services. Ensure you obtain the necessary API credentials to authenticate and enable seamless integration.";
args.Response = defaultResponse;
}
}
```

## AttachmentClick

The [AttachmentClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.InteractiveChat.SfAIAssistView.html#Syncfusion_Blazor_InteractiveChat_SfAIAssistView_AttachmentClick) event is triggered when an attached file is clicked in the AI AssistView.
Expand Down