File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed
modules/python/src/custom_nodes/google_genmedia Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -413,21 +413,14 @@ def generate_content(
413413 ) from e
414414
415415 # Make the API call
416- try :
417- print (
418- f"Making Gemini API call with the following Model : { GeminiModel [model ]} , config { gen_config_obj } "
419- )
420- response = self .client .models .generate_content (
421- model = GeminiModel [model ],
422- contents = contents ,
423- config = gen_config_obj ,
424- )
425- except APIExecutionError as e :
426- raise RuntimeError (f"Gemini API Error: { e } " ) from e
427- except Exception as e :
428- raise RuntimeError (
429- f"An unexpected error occurred during Gemini API call: { e } "
430- ) from e
416+ print (
417+ f"Making Gemini API call with the following Model : { GeminiModel [model ]} , config { gen_config_obj } "
418+ )
419+ response = self .client .models .generate_content (
420+ model = GeminiModel [model ],
421+ contents = contents ,
422+ config = gen_config_obj ,
423+ )
431424
432425 # Process the response
433426 try :
You can’t perform that action at this time.
0 commit comments