Skip to content

Commit

Permalink
Merge branch 'main' into add-aws-s3-cred-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
dluc authored Jan 8, 2025
2 parents 18595db + 6c3f50a commit b5e49a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PackageVersion Include="MongoDB.Driver.GridFS" Version="2.30.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OllamaSharp" Version="4.0.11" />
<PackageVersion Include="OllamaSharp" Version="4.0.17" />
<PackageVersion Include="PdfPig" Version="0.1.9" />
<PackageVersion Include="Polly.Core" Version="8.5.0" />
<PackageVersion Include="RabbitMQ.Client" Version="6.8.1" />
Expand Down
8 changes: 7 additions & 1 deletion clients/dotnet/WebClient/MemoryWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,13 @@ public async IAsyncEnumerable<MemoryAnswer> AskStreamingAsync(
using StringContent content = new(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json");

var url = Constants.HttpAskEndpoint.CleanUrlPath();
HttpResponseMessage response = await this._client.PostAsync(url, content, cancellationToken).ConfigureAwait(false);
using var requestMessage = new HttpRequestMessage(HttpMethod.Post, url);
requestMessage.Content = content;
HttpCompletionOption completionOption = useStreaming
? HttpCompletionOption.ResponseHeadersRead
: HttpCompletionOption.ResponseContentRead;

HttpResponseMessage response = await this._client.SendAsync(requestMessage, completionOption, cancellationToken).ConfigureAwait(false);
response.EnsureSuccessStatusCode();

if (useStreaming)
Expand Down

0 comments on commit b5e49a9

Please sign in to comment.