-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff54e74
commit c49113d
Showing
23 changed files
with
256 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<MudPaper Class="pa-6" Elevation="3"> | ||
<MudStack Spacing="4" Class="full-width"> | ||
<MudIcon Icon="@Icons.Material.Filled.Error" Color="Color.Error" Size="Size.Large" /> | ||
<MudText Typo="Typo.h6"> | ||
Error | ||
</MudText> | ||
<MudText Typo="Typo.subtitle2"> | ||
@((MarkupString)Error) | ||
</MudText> | ||
<div class="d-flex justify-end pt-4"> | ||
<MudFab Size="Size.Medium" Color="Color.Info" | ||
EndIcon="@Icons.Material.Filled.Replay" | ||
OnClick="@OnRetryClickedAsync" Label="Retry" /> | ||
</div> | ||
</MudStack> | ||
</MudPaper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) David Pine. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Azure.OpenAI.Client.Components; | ||
|
||
public sealed partial class AnswerError | ||
{ | ||
[Parameter, EditorRequired] public required UserQuestion Question { get; set; } | ||
[Parameter, EditorRequired] public required string Error { get; set; } | ||
[Parameter, EditorRequired] public required EventCallback<UserQuestion> OnRetryClicked { get; set; } | ||
|
||
private async Task OnRetryClickedAsync() | ||
{ | ||
if (OnRetryClicked.HasDelegate) | ||
{ | ||
await OnRetryClicked.InvokeAsync(Question); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) David Pine. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Azure.OpenAI.Client.Models; | ||
|
||
public readonly record struct GeneratedAnswer( | ||
string? Answer = null, | ||
string? Error = null) | ||
{ | ||
[JsonIgnore] | ||
public bool ContainsError => string.IsNullOrWhiteSpace(Error) is false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.