Open ganjigajanan opened 1 week ago
Hi @ganjigajanan,
I have tried in the similar way passing the generation_config
while declaring the model and it works for me as expected, can you take a look at the gist try and let me know if still the error persists.
model = genai.GenerativeModel(
model_name="gemini-1.5-pro-latest",
generation_config={"response_mime_type": "application/json", "response_schema": TextSummary},
)
Thanks
Description of the bug:
Hello, I'm trying to recreate the example at: https://github.com/google-gemini/cookbook/blob/main/examples/json_capabilities/Text_Summarization.ipynb. After specifying the classes and creating the
generation_config
, while invoking thegenai.GenerativeModel
model withgeneration_config
results in aKeyError
.Actual vs expected behavior:
No response
Any other information you'd like to share?
No response