generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

Web package documentation is not right?

Open Brandon689 opened this issue 1 year ago • 2 comments

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

Brandon689 avatar Aug 09 '24 12:08 Brandon689

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.

Brandon689 avatar Aug 09 '24 12:08 Brandon689

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

jochenkirstaetter avatar Aug 12 '24 13:08 jochenkirstaetter

@gemini-cli /triage

jochenkirstaetter avatar Aug 08 '25 14:08 jochenkirstaetter

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

jochenkirstaetter avatar Aug 19 '25 06:08 jochenkirstaetter