dotnet-gemini-sdk icon indicating copy to clipboard operation
dotnet-gemini-sdk copied to clipboard

How to use Model to generate content

Open ahsan-wolf opened this issue 1 year ago • 0 comments

I have get the model using this line

var model =await _geminiClient.GetModel("gemini-1.5-flash");

but how to use this model to generate content like in documentation mentioned.

import google.generativeai as genai

model = genai.GenerativeModel("gemini-1.5-flash") response = model.generate_content("Write a story about a magic backpack.") print(response.text)

i didnt find GenerateContent method

ahsan-wolf avatar Dec 03 '24 13:12 ahsan-wolf