mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 22:49:07 +00:00
23 lines
661 B
C#
23 lines
661 B
C#
|
namespace AIStudio.Tools;
|
||
|
|
||
|
/// <summary>
|
||
|
/// The result of a rate-limited HTTP stream.
|
||
|
/// </summary>
|
||
|
/// <param name="IsFailedAfterAllRetries">True, when the stream failed after all retries.</param>
|
||
|
/// <param name="ErrorMessage">The error message which we might show to the user.</param>
|
||
|
/// <param name="Response">The response from the server.</param>
|
||
|
public readonly record struct HttpRateLimitedStreamResult(
|
||
|
bool IsSuccessful,
|
||
|
bool IsFailedAfterAllRetries,
|
||
|
string ErrorMessage,
|
||
|
HttpResponseMessage? Response) : IDisposable
|
||
|
{
|
||
|
#region IDisposable
|
||
|
|
||
|
public void Dispose()
|
||
|
{
|
||
|
this.Response?.Dispose();
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
}
|