Web package documentation is not right?
using Mscc.GenerativeAI.Web;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGenerativeAI(builder.Configuration.GetSection("Gemini"));
var app = builder.Build();
app.MapGet("/", async (IGenerativeModelService service) =>
{
var result = await service.GenerateContent("Write about the history of Mauritius.");
return result.Text;
});
app.Run();
IGenerativeModelService doesnt contain any of the definitions of GenerativeModel
Okay so its out of date, the sample is up to date. Also I found you can't have both nuget packages installed, it causes strange errors.
Hi @Brandon689 ,
Thanks for reporting this. Please, what exactly is not right or out of date? Is there any pending issue that I shall look into? Kindly let me know.
Thanks and cheers, JoKi
@gemini-cli /triage
Hi @Brandon689
Thanks again, I finally managed to update the README based on the sample code used in the Web application. Silly mistake on my side.
Cheers