mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 06:33:47 +00:00
Fixed a streaming bug (#250)
This commit is contained in:
1 parent
187663bbf2
commit
258bc7a338
9 files changed
+46
-55
No files matched your search
@@ -83,13 +83,13 @@ public class ProviderGoogle(ILogger logger) : BaseProvider("https://generativela
|
||||
return request;
|
||||
}
|
||||
|
||||
// Send the request using exponential backoff:
|
||||
using var responseData = await this.SendRequest(RequestBuilder, token);
|
||||
if(responseData.IsFailedAfterAllRetries)
|
||||
{
|
||||
this.logger.LogError($"Google chat completion failed: {responseData.ErrorMessage}");
|
||||
yield break;
|
||||
}
|
||||
// Send the request using exponential backoff:
|
||||
var responseData = await this.SendRequest(RequestBuilder, token);
|
||||
if(responseData.IsFailedAfterAllRetries)
|
||||
{
|
||||
this.logger.LogError($"Google chat completion failed: {responseData.ErrorMessage}");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Open the response stream:
|
||||
var geminiStream = await responseData.Response!.Content.ReadAsStreamAsync(token);
|
||||
|
||||
Reference in new issue
Block a user