Skip to content

Commit d693a9d

Browse files
committed
Remove extra thinking sample
1 parent 085263a commit d693a9d

3 files changed

Lines changed: 18 additions & 56 deletions

File tree

‎genai/text_generation/thinking_textgen_interactions_with_txt.py‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,29 @@
1616
def create_interaction() -> str:
1717
# [START googlegenaisdk_interactions_thinking_textgen_with_txt]
1818
from google import genai
19+
from google.genai.interactions import GenerationConfig
1920

2021
client = genai.Client()
2122
interaction = client.interactions.create(
22-
model="gemini-3.1-pro-preview",
23+
model="gemini-4-argon",
2324
input="solve x^2 + 4x + 4 = 0",
25+
generation_config=GenerationConfig(
26+
thinking_level="high",
27+
thinking_summaries="auto",
28+
),
2429
)
30+
31+
# Print the model's thoughts if available
32+
for step in interaction.steps:
33+
if step.type == "thought" and step.summary:
34+
print("--- Thoughts ---")
35+
for item in step.summary:
36+
if hasattr(item, "text"):
37+
print(item.text)
38+
else:
39+
print(item)
40+
41+
print("--- Answer ---")
2542
print(interaction.output_text)
2643
# Example Response:
2744
# Okay, let's solve the quadratic equation x² + 4x + 4 = 0.

‎genai/thinking/test_thinking_examples.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import thinking_budget_with_txt
1717
import thinking_includethoughts_with_txt
18-
import thinking_interactions_with_txt
1918
import thinking_with_txt
2019

2120
os.environ["GOOGLE_GENAI_USE_ENTERPRISE"] = "True"
@@ -34,8 +33,3 @@ def test_thinking_includethoughts_with_txt() -> None:
3433

3534
def test_thinking_with_txt() -> None:
3635
assert thinking_with_txt.generate_content()
37-
38-
39-
40-
def test_thinking_interactions_with_txt() -> None:
41-
assert thinking_interactions_with_txt.create_interaction()

‎genai/thinking/thinking_interactions_with_txt.py‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)