Skip to content

Commit 2a95d68

Browse files
committed
chore: run autoformat had more files
1 parent 6d7cf83 commit 2a95d68

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

contributing/samples/gepa/experiment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from tau_bench.types import EnvRunResult
4444
from tau_bench.types import RunConfig
4545
import tau_bench_agent as tau_bench_agent_lib
46-
4746
import utils
4847

4948

contributing/samples/gepa/run_experiment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from absl import flags
2626
import experiment
2727
from google.genai import types
28-
2928
import utils
3029

3130
_OUTPUT_DIR = flags.DEFINE_string(

src/google/adk/models/anthropic_llm.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class _ToolUseAccumulator:
6262
args_json: str
6363

6464

65-
class _ThinkingAccumulator(BaseModel):
65+
@dataclasses.dataclass
66+
class _ThinkingAccumulator:
6667
"""Accumulates streamed thinking content block data."""
6768

6869
thinking: str = ""
@@ -572,12 +573,12 @@ async def _generate_content_streaming(
572573
)
573574
for idx in all_indices:
574575
if idx in thinking_blocks:
575-
acc = thinking_blocks[idx]
576+
thinking_acc = thinking_blocks[idx]
576577
all_parts.append(
577578
types.Part(
578-
text=acc.thinking,
579+
text=thinking_acc.thinking,
579580
thought=True,
580-
thought_signature=acc.signature.encode("utf-8"),
581+
thought_signature=thinking_acc.signature.encode("utf-8"),
581582
)
582583
)
583584
if idx in redacted_thinking_blocks:
@@ -591,10 +592,10 @@ async def _generate_content_streaming(
591592
if idx in text_blocks:
592593
all_parts.append(types.Part.from_text(text=text_blocks[idx]))
593594
if idx in tool_use_blocks:
594-
acc = tool_use_blocks[idx]
595-
args = json.loads(acc.args_json) if acc.args_json else {}
596-
part = types.Part.from_function_call(name=acc.name, args=args)
597-
part.function_call.id = acc.id
595+
tool_use_acc = tool_use_blocks[idx]
596+
args = json.loads(tool_use_acc.args_json) if tool_use_acc.args_json else {}
597+
part = types.Part.from_function_call(name=tool_use_acc.name, args=args)
598+
part.function_call.id = tool_use_acc.id
598599
all_parts.append(part)
599600

600601
yield LlmResponse(

0 commit comments

Comments
 (0)