Skip to content

Commit

Permalink
Merge branch 'main' into sse
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenkirstaetter authored Apr 15, 2024
2 parents 8717f60 + 57828e7 commit 9e22759
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Mscc.GenerativeAI" Version="0.5.4" />
<PackageReference Include="Mscc.GenerativeAI" Version="1.1.3" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion samples/Console.Minimal.Prompt/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
}

// Create a new instance of the GenerativeModel class.
var model = new GenerativeModel(apiKey);
var genai = new GoogleAI(apiKey);
var model = genai.GenerativeModel();

// Create a loop to keep the program running until the user exits entering the Escape key.
var hint = " (Press Escape to exit)";
Expand Down
3 changes: 2 additions & 1 deletion samples/Web.Minimal.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

app.MapGet("/", async (IGenerativeModelService service) =>
{
var result = await service.GenerateContent("Write about the history of Mauritius.");
var model = service.CreateInstance();
var result = await model.GenerateContent("Write about the history of Mauritius.");
return result.Text;
});

Expand Down
2 changes: 1 addition & 1 deletion samples/Web.Minimal.Api/Web.Minimal.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="Mscc.GenerativeAI.Web" Version="0.5.0" />
<PackageReference Include="Mscc.GenerativeAI.Web" Version="1.1.3" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
Expand Down
2 changes: 1 addition & 1 deletion samples/Web.Mvc/Web.Mvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Mscc.GenerativeAI.Web" Version="0.5.0" />
<PackageReference Include="Mscc.GenerativeAI.Web" Version="1.1.3" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Mscc.GenerativeAI/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- improve response in SSE format
- update samples to latest NuGet package

### Fixed

Expand Down

0 comments on commit 9e22759

Please sign in to comment.