Skip to content

Commit 948a5a8

Browse files
authored
Fix an internal test failure (google-gemini#279)
Picked this up when adding missing tests on the internal copy. I think the failure is spurious but this fix is easy enough ¯\_(ツ)_/¯
1 parent 59301fb commit 948a5a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google/generativeai/notebook/text_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def _generate_text(
4141

4242
model_name = model or _DEFAULT_MODEL
4343
gen_model = genai.GenerativeModel(model_name=model_name)
44-
return gen_model.generate_content(prompt, generation_config=gen_config)
44+
gc = genai.types.generation_types.GenerationConfig(**gen_config)
45+
return gen_model.generate_content(prompt, generation_config=gc)
4546

4647
def call_model(
4748
self,

0 commit comments

Comments
 (0)