Skip to content

Commit 0f35674

Browse files
committed
chore: run autoformat had more files
1 parent 0627133 commit 0f35674

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

contributing/samples/gepa/experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from tau_bench.types import EnvRunResult
4545
from tau_bench.types import RunConfig
4646
import tau_bench_agent as tau_bench_agent_lib
47-
47+
import utils
4848

4949
def run_tau_bench_rollouts(
5050
config: RunConfig,

contributing/samples/gepa/run_experiment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import experiment
2727
import gepa_utils
2828
from google.genai import types
29+
import utils
2930

3031
_OUTPUT_DIR = flags.DEFINE_string(
3132
'output_dir',

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 = ""
@@ -609,12 +610,12 @@ async def _generate_content_streaming(
609610
)
610611
for idx in all_indices:
611612
if idx in thinking_blocks:
612-
acc = thinking_blocks[idx]
613+
thinking_acc = thinking_blocks[idx]
613614
all_parts.append(
614615
types.Part(
615-
text=acc.thinking,
616+
text=thinking_acc.thinking,
616617
thought=True,
617-
thought_signature=acc.signature.encode("utf-8"),
618+
thought_signature=thinking_acc.signature.encode("utf-8"),
618619
)
619620
)
620621
if idx in redacted_thinking_blocks:
@@ -628,10 +629,10 @@ async def _generate_content_streaming(
628629
if idx in text_blocks:
629630
all_parts.append(types.Part.from_text(text=text_blocks[idx]))
630631
if idx in tool_use_blocks:
631-
acc = tool_use_blocks[idx]
632-
args = json.loads(acc.args_json) if acc.args_json else {}
633-
part = types.Part.from_function_call(name=acc.name, args=args)
634-
part.function_call.id = acc.id
632+
tool_use_acc = tool_use_blocks[idx]
633+
args = json.loads(tool_use_acc.args_json) if tool_use_acc.args_json else {}
634+
part = types.Part.from_function_call(name=tool_use_acc.name, args=args)
635+
part.function_call.id = tool_use_acc.id
635636
all_parts.append(part)
636637

637638
yield LlmResponse(

0 commit comments

Comments
 (0)