Skip to content

Commit deb7a5e

Browse files
authored
test(genai-samples): test genai samples
1 parent 8ea35f4 commit deb7a5e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

genai/text_generation/txt_gen.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from google import genai
2+
3+
client = genai.Client(http_options={'api_version': 'v1'})
4+
response = client.models.generate_content(
5+
model="gemini-2.0-flash-001",
6+
contents="How does AI work?"
7+
)
8+
print(response.text)
9+
# Example response:
10+
# Okay, let's break down how AI works. It's a broad field, so I'll focus on the ...
11+
#
12+
# Here's a simplified overview:
13+
# ...

0 commit comments

Comments
 (0)