File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ def generate_content() -> GenerateContentResponse:
2020 from PIL import Image
2121 from google import genai
2222 from google .genai .types import (
23+ GenerateContentConfig ,
2324 HttpOptions ,
2425 Tool ,
2526 ToolCodeExecution ,
26- GenerateContentConfig ,
2727 )
2828
2929 client = genai .Client (http_options = HttpOptions (api_version = "v1" ))
@@ -45,14 +45,14 @@ def generate_content() -> GenerateContentResponse:
4545 with open ("test_data/640px-Monty_open_door.svg.png" , "rb" ) as image_file :
4646 image_data = Image .open (image_file )
4747
48- response = client .models .generate_content (
49- model = "gemini-2.0-flash-001" ,
50- contents = [image_data , prompt ],
51- config = GenerateContentConfig (
52- tools = [code_execution_tool ],
53- temperature = 0 ,
54- ),
55- )
48+ response = client .models .generate_content (
49+ model = "gemini-2.0-flash-001" ,
50+ contents = [image_data , prompt ],
51+ config = GenerateContentConfig (
52+ tools = [code_execution_tool ],
53+ temperature = 0 ,
54+ ),
55+ )
5656
5757 print ("# Code:" )
5858 for part in response .candidates [0 ].content .parts :
You can’t perform that action at this time.
0 commit comments